Class: Unchained::Client

Inherits:
Object
  • Object
show all
Includes:
Archetypes, Attributes, Factions, MOTD, Patcher, Races, Servers, Request
Defined in:
lib/unchained/client.rb,
lib/unchained/client/motd.rb,
lib/unchained/client/races.rb,
lib/unchained/client/patcher.rb,
lib/unchained/client/servers.rb,
lib/unchained/client/factions.rb,
lib/unchained/client/archetypes.rb,
lib/unchained/client/attributes.rb,
lib/unchained/client/mixins/resource.rb

Defined Under Namespace

Modules: Archetypes, Attributes, Factions, MOTD, Mixins, Patcher, Races, Servers

Instance Method Summary collapse

Methods included from Servers

#servers

Methods included from Patcher

#patcher_alerts, #patcher_hero_contents

Methods included from Races

#races

Methods included from MOTD

#motd

Methods included from Factions

#factions

Methods included from Attributes

#attribute_offsets, #attributes

Methods included from Archetypes

#archetypes

Methods included from Request

#get, #get_resource, #get_resources

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.



18
19
20
21
22
23
# File 'lib/unchained/client.rb', line 18

def initialize(opts={})
  config = Unchained.configuration.merge(opts)
  Unchained::Configuration::KEYS.each do |key|
    send("#{key}=", config[key])
  end
end

Instance Method Details

#base_urlObject



25
26
27
# File 'lib/unchained/client.rb', line 25

def base_url
  'http://api.camelotunchained.com/v1'
end