Class: ShelbyArena::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/shelby_arena.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject (readonly)

Returns the value of attribute api_key.



17
18
19
# File 'lib/shelby_arena.rb', line 17

def api_key
  @api_key
end

.api_secretObject (readonly)

Returns the value of attribute api_secret.



17
18
19
# File 'lib/shelby_arena.rb', line 17

def api_secret
  @api_secret
end

.passwordObject (readonly)

Returns the value of attribute password.



17
18
19
# File 'lib/shelby_arena.rb', line 17

def password
  @password
end

.service_urlObject (readonly)

Returns the value of attribute service_url.



17
18
19
# File 'lib/shelby_arena.rb', line 17

def service_url
  @service_url
end

.session_keyObject (readonly)

Returns the value of attribute session_key.



17
18
19
# File 'lib/shelby_arena.rb', line 17

def session_key
  @session_key
end

.usernameObject (readonly)

Returns the value of attribute username.



17
18
19
# File 'lib/shelby_arena.rb', line 17

def username
  @username
end

Class Method Details

.connect(session_key, api_secret, service_url) ⇒ Object



28
29
30
31
32
33
# File 'lib/shelby_arena.rb', line 28

def self.connect(session_key, api_secret, service_url)
  @session_key = session_key
  @api_secret  = api_secret   
  @service_url = service_url
  true
end

.request_session(username, password, api_key, service_url) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/shelby_arena.rb', line 20

def self.request_session(username, password, api_key, service_url)
  @username    = username
  @password    = password
  @api_key     = api_key   
  @service_url = service_url
  ShelbySession.new(ShelbyArena.request_session)
end