class Agaon::Client

Constants

API_BASE

Attributes

company_href[RW]
email[RW]
password[RW]

Public Class Methods

new(email, password, company_href=nil) click to toggle source
# File lib/agaon/client.rb, line 13
def initialize(email, password, company_href=nil)
  @email = email
  @password = password
  @company_href = company_href
end

Public Instance Methods

current_company() click to toggle source
# File lib/agaon/client.rb, line 26
def current_company
  get_company(@company_href)
end
get_company(href) click to toggle source
# File lib/agaon/client.rb, line 30
def get_company(href)
  response = get(href)
  response.to_hash
end
who_am_i() click to toggle source
# File lib/agaon/client.rb, line 19
def who_am_i
  url = API_BASE + '/whoAmI'

  response = get(url)
  response.to_hash
end