Sha256: c14bfdd9df1bc01e4f2de55ce29eca86ce460bc7dc0ae194b4b713c0df34e230
Contents?: true
Size: 660 Bytes
Versions: 3
Compression:
Stored size: 660 Bytes
Contents
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'bungie_client' require 'redis' # init client client = BungieClient::Client.new( :api_key => '1234', :cache => BungieClient::Cache.new( :ttl => 900, :client => Redis.new, :get => Proc.new { |c, key| c.get key }, :set => Proc.new { |c, key, value, ttl| c.setex key, ttl, value } ) ) # search account s = client.get_response "Destiny/SearchDestinyPlayer/2/RuBAN-GT" p s = s.first if !s.nil? && s.length == 1 # get profile with characters p client.get_response "Destiny/#{s['membershipType']}/Account/#{s['membershipId']}" unless s.nil?
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bungie_client-0.6.0 | examples/client_usage.rb |
bungie_client-0.5.1 | examples/client_usage.rb |
bungie_client-0.5.0 | examples/client_usage.rb |