Class: ClioClient::Api::User

Inherits:
Base
  • Object
show all
Includes:
Findable, Listable
Defined in:
lib/clio_client/api/user.rb

Instance Attribute Summary

Attributes inherited from Base

#session

Instance Method Summary collapse

Methods included from Findable

#find

Methods included from Listable

#first, #list, #next_page

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ClioClient::Api::Base

Instance Method Details

#avatar(id) ⇒ Object



8
9
10
# File 'lib/clio_client/api/user.rb', line 8

def avatar(id)
  session.get("#{end_point_url}/#{id}/avatar")
end

#who_am_iObject



12
13
14
15
16
# File 'lib/clio_client/api/user.rb', line 12

def who_am_i
  resp = session.get("#{end_point_url}/who_am_i")
  [ClioClient::Account.new(resp["account"], session), 
   ClioClient::User.new(resp["user"], session)]
end