class Destiny::Client
The Destiny::Client
class is the primary class used to interact with the Destiny
API
Attributes
account[RW]
Public Class Methods
new(api_key)
click to toggle source
# File lib/destiny/client.rb, line 9 def initialize(api_key) @client = Hurley::Client.new 'http://www.bungie.net/Platform/' @client.header['X-API-Key'] = api_key end
validate(response)
click to toggle source
# File lib/destiny/client.rb, line 18 def self.validate(response) if response.success? JSON.parse response.body else raise 'There was a problem with the request' end end