Module: Destiny::Manifest
- Included in:
- Client
- Defined in:
- lib/destiny_rb/manifest.rb
Instance Method Summary collapse
-
#destination(destination_hash) ⇒ Object
GET information about a destination, specifically a location on a planet.
- #get_destiny_account(player_name, platform_type) ⇒ Object
- #get_manifest_item(type_id, item_id) ⇒ Object
-
#place(place_hash) ⇒ Object
GET information about a place, specifically a planet.
- #search_destiny_player(player_name, platform_type) ⇒ Object
Instance Method Details
#destination(destination_hash) ⇒ Object
GET information about a destination, specifically a location on a planet.
Usage:
client.destination('518553403')
Arguments:
destination_hash: (String)
38 39 40 41 |
# File 'lib/destiny_rb/manifest.rb', line 38 def destination(destination_hash) raw_data = self.class.get('/Manifest/Destination/#{destination_hash}', headers: @headers).parsed_response['Response']['data'] response = { dest_name: raw_data['destinationName'], dest_desc: raw_data['destinationDescription'] } end |
#get_destiny_account(player_name, platform_type) ⇒ Object
8 9 10 11 |
# File 'lib/destiny_rb/manifest.rb', line 8 def get_destiny_account(player_name, platform_type) member_id = self.search_destiny_player(player_name, platform_type) raw_data = self.class.get("/#{platform_type}/Account/#{member_id}/", headers: @headers).parsed_response['Response']['data'] end |
#get_manifest_item(type_id, item_id) ⇒ Object
13 14 15 |
# File 'lib/destiny_rb/manifest.rb', line 13 def get_manifest_item(type_id, item_id) raw_data = self.class.get("/Manifest/#{type_id}/#{item_id}", headers: @headers).parsed_response['Response']['data']['inventoryItem'] end |
#place(place_hash) ⇒ Object
GET information about a place, specifically a planet.
Usage:
client.place('3747705955')
Arguments:
place_hash: (String)
25 26 27 28 |
# File 'lib/destiny_rb/manifest.rb', line 25 def place(place_hash) raw data = self.class.get('/Manifest/Place/#{place_hash}', headers: @headers).parsed_response['Response']['data']['place'] response = { place_name: raw_data['placeName'], place_desc: raw_data['placeDescription'] } end |
#search_destiny_player(player_name, platform_type) ⇒ Object
4 5 6 |
# File 'lib/destiny_rb/manifest.rb', line 4 def search_destiny_player(player_name, platform_type) raw_data = self.class.get("/SearchDestinyPlayer/#{platform_type}/#{player_name}/", headers: @headers).parsed_response['Response']['membershipId'] end |