destiny_rb 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86b7e316cba77554d4145e6b8b5613a6ed75d49b
4
- data.tar.gz: 098f229c82c3c591a06ebd381a639e4cdf65472d
3
+ metadata.gz: aac2b48b3b626aea46a905659c5bf37e3dd8dcf2
4
+ data.tar.gz: 811ed1e19cb6d98143da578f7bee0ee4b24f0526
5
5
  SHA512:
6
- metadata.gz: 21ac286d930b814ac7c12dc2ce5a6e91102de700d858e361de35c88d3bffb33c515edc8c1db99a2ebc46c338114dd54cc9f6d18b945132212bc1c99ad53e331e
7
- data.tar.gz: 164d6cf51f66f0bc5acd9ac736469d44c0b7d52f105adaf28098462f8f43837d27454a731f7b9dc94b594b665c96d78b8dcfedaf4eb4bb87b0f001e061a67740
6
+ metadata.gz: 2e3e94d98e7fcf8d05333788d9f173deee99dbbcc7baad1e04b98ebbf3bb206f19e077924def38a5e58efc74399d9a28865005eb1086c5e446a769689a79e981
7
+ data.tar.gz: 1d5e272003e345263138b27f32c219b655a5377bce22933086963a66775e5623146a793d0c422643bbaf9bc168da43afab7dae4873f1fb0e63cb04095e806ce6
@@ -34,7 +34,7 @@ module Destiny
34
34
  # If raw = true, returns whole response back from bungie.
35
35
  #
36
36
  def activity_search(activity_hash, raw=false)
37
- raw_data = self.class.get("/Manifest/Activity/#{activity_hash}").parsed_response['Response']['data']['activity']
37
+ raw_data = self.class.get("/Manifest/Activity/#{activity_hash}", headers: @headers).parsed_response['Response']['data']['activity']
38
38
  skulls = []
39
39
  raw_data['skulls'].each do |skull|
40
40
  skulls << skull['displayName']
@@ -184,7 +184,7 @@ module Destiny
184
184
  buckets = buckets(options[:buckets] || 'none')
185
185
  page = options[:page] || 0
186
186
  count = options[:count] || 250
187
- self.class.get("/Explorer/Items/?definitions=#{definitions}&count=#{count}&characterClass=#{character_class}&types=#{types}&subtype=#{sub_type}&order=#{order}&rarity=#{rarity}&buckets=#{buckets}&page=#{page}")
187
+ self.class.get("/Explorer/Items/?definitions=#{definitions}&count=#{count}&characterClass=#{character_class}&types=#{types}&subtype=#{sub_type}&order=#{order}&rarity=#{rarity}&buckets=#{buckets}&page=#{page}", headers: @headers)
188
188
  end
189
189
 
190
190
  end
@@ -2,16 +2,16 @@ module Destiny
2
2
  module Manifest
3
3
 
4
4
  def search_destiny_player(player_name, platform_type)
5
- raw_data = self.class.get("/SearchDestinyPlayer/#{platform_type}/#{player_name}/").parsed_response['Response']['membershipId']
5
+ raw_data = self.class.get("/SearchDestinyPlayer/#{platform_type}/#{player_name}/", headers: @headers).parsed_response['Response']['membershipId']
6
6
  end
7
7
 
8
8
  def get_destiny_account(player_name, platform_type)
9
9
  member_id = self.search_destiny_player(player_name, platform_type)
10
- raw_data = self.class.get("/#{platform_type}/Account/#{member_id}/").parsed_response['Response']['data']
10
+ raw_data = self.class.get("/#{platform_type}/Account/#{member_id}/", headers: @headers).parsed_response['Response']['data']
11
11
  end
12
12
 
13
13
  def get_manifest_item(type_id, item_id)
14
- raw_data = self.class.get("/Manifest/#{type_id}/#{item_id}").parsed_response['Response']['data']['inventoryItem']
14
+ raw_data = self.class.get("/Manifest/#{type_id}/#{item_id}", headers: @headers).parsed_response['Response']['data']['inventoryItem']
15
15
  end
16
16
 
17
17
  # GET information about a place, specifically a planet.
@@ -23,7 +23,7 @@ module Destiny
23
23
  # place_hash: (String)
24
24
  #
25
25
  def place(place_hash)
26
- raw data = self.class.get('/Manifest/Place/#{place_hash}').parsed_response['Response']['data']['place']
26
+ raw data = self.class.get('/Manifest/Place/#{place_hash}', headers: @headers).parsed_response['Response']['data']['place']
27
27
  response = { place_name: raw_data['placeName'], place_desc: raw_data['placeDescription'] }
28
28
  end
29
29
 
@@ -36,7 +36,7 @@ module Destiny
36
36
  # destination_hash: (String)
37
37
  #
38
38
  def destination(destination_hash)
39
- raw_data = self.class.get('/Manifest/Destination/#{destination_hash}').parsed_response['Response']['data']
39
+ raw_data = self.class.get('/Manifest/Destination/#{destination_hash}', headers: @headers).parsed_response['Response']['data']
40
40
  response = { dest_name: raw_data['destinationName'], dest_desc: raw_data['destinationDescription'] }
41
41
  end
42
42
 
@@ -4,7 +4,7 @@ module Destiny
4
4
  # WIP: Pull xur inventory
5
5
  # '/advisors/xur/''
6
6
  def xur(raw=false)
7
- raw_data = self.class.get('/Advisors/Xur/').parsed_response['Response']
7
+ raw_data = self.class.get('/Advisors/Xur/', headers: @headers).parsed_response['Response']
8
8
 
9
9
  if raw
10
10
  raw_data
@@ -23,7 +23,7 @@ module Destiny
23
23
  end
24
24
 
25
25
  def vendor(vendor_hash)
26
- raw_data = self.class.get("/Manifest/Vendor/#{vendor_hash}").parsed_response['Response']['data']['vendor']['summary']
26
+ raw_data = self.class.get("/Manifest/Vendor/#{vendor_hash}", headers: @headers).parsed_response['Response']['data']['vendor']['summary']
27
27
  end
28
28
 
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module Destiny
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: destiny_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pDaily
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-31 00:00:00.000000000 Z
11
+ date: 2015-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty