Class: ArmoryApi::Client

Inherits:
Object
  • Object
show all
Includes:
Achievement, Character, Item
Defined in:
lib/armory_api/client.rb,
lib/armory_api/client/item.rb,
lib/armory_api/client/character.rb,
lib/armory_api/client/achievement.rb

Defined Under Namespace

Modules: Achievement, Character, Item

Instance Method Summary collapse

Methods included from Item

#item, #item_set

Methods included from Character

#character

Methods included from Achievement

#achievement

Constructor Details

#initialize(options = {}) ⇒ ArmoryApi::Client

Initializes a new Client object

Parameters:

  • options (Hash) (defaults to: {})


16
17
18
19
20
21
# File 'lib/armory_api/client.rb', line 16

def initialize(options={})
  options = ArmoryApi.options.merge(options)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Method Details

#get(path, params = {}, options = {}) ⇒ Object

Performs an HTTP GET request



24
25
26
# File 'lib/armory_api/client.rb', line 24

def get(path, params={}, options={})
  request(:get, path, params, options)
end