Class: Destiny::Client

Inherits:
Object
  • Object
show all
Includes:
Advisors, ItemExplorer, Manifest, ManifestDefinitions, Vendors, HTTParty
Defined in:
lib/destiny_rb/client.rb

Overview

Base API Class

Usage: destiny = DestinyAPI::Base.new(api_token)

Instance Method Summary collapse

Methods included from ItemExplorer

#buckets, #get_exlorer_items, #order, #rarity, #sub_type, #types

Methods included from ManifestDefinitions

#character_class, #enemy_race, #skulls, #type_checker

Methods included from Manifest

#destination, #get_destiny_account, #get_manifest_item, #place, #search_destiny_player

Methods included from Vendors

#vendor, #xur

Methods included from Advisors

#activity_search, #arena, #daily_report, #nightfall, #weekly_strike

Constructor Details

#initialize(api_token) ⇒ Client

Init the Destiny API with Bungie API stored in ENV variable

Usage:

client = Destiny::Client.new('6971067dec36c6597cd57789a62f48f0')

Arguments:

api_token: (String)

Returns:

Destiny client object


37
38
39
# File 'lib/destiny_rb/client.rb', line 37

def initialize(api_token)
  @headers = { 'X-API-Key' => api_token, 'Content-Type' => 'application/json' }
end