Class: Close::User

Inherits:
APIResource show all
Defined in:
lib/close/resource/user.rb

Class Method Summary collapse

Methods inherited from APIResource

available_subclasses, class_name, create, #destroy, #dirty?, #initialize, #inspect, list, retrieve, #save, #set, #update, #values

Methods included from APIOperations

#request

Constructor Details

This class inherits a constructor from Close::APIResource

Class Method Details

.availability(params = {}) ⇒ Object



12
13
14
15
# File 'lib/close/resource/user.rb', line 12

def self.availability(params={})
  items = request(:get, "#{resource_url}availability/", params)
  items['data'].map { |item| new({}, item) }
end

.meObject



8
9
10
# File 'lib/close/resource/user.rb', line 8

def self.me
  new({}, request(:get, "#{resource_url}me/"))
end

.resource_urlObject



4
5
6
# File 'lib/close/resource/user.rb', line 4

def self.resource_url
  'api/v1/user/'
end