Module: WorkSnaps::API::Users
- Includes:
- Utils
- Included in:
- Client
- Defined in:
- lib/worksnaps/api/users.rb
Constant Summary
Constants included
from Utils
WorkSnaps::API::Utils::DEFAULT_CURSOR
Instance Method Summary
collapse
Instance Method Details
#create_user(user_info) ⇒ Object
9
10
11
|
# File 'lib/worksnaps/api/users.rb', line 9
def create_user(user_info)
object_from_response(WorkSnaps::User, :post, '/api/users.xml', {:user => user_info})
end
|
#current_user ⇒ Object
21
22
23
|
# File 'lib/worksnaps/api/users.rb', line 21
def current_user
object_from_response(WorkSnaps::User, :get, '/api/me.xml')
end
|
#update_user(user_id, user_info) ⇒ Object
13
14
15
|
# File 'lib/worksnaps/api/users.rb', line 13
def update_user(user_id, user_info)
object_from_response(WorkSnaps::User, :put, "/api/users/#{user_id}.xml", {:user => user_info})
end
|
#user(user_id) ⇒ Object
17
18
19
|
# File 'lib/worksnaps/api/users.rb', line 17
def user(user_id)
object_from_response(WorkSnaps::User, :get, "/api/users/#{user_id}.xml")
end
|