Module: Caplinked::REST::Users
- Included in:
- API
- Defined in:
- lib/caplinked/rest/users.rb
Instance Method Summary collapse
- #create_user(options = {}) ⇒ Object
- #delete_user(options = {}) ⇒ Object
- #get_user_info(options = {}) ⇒ Object
- #update_user(options = {}) ⇒ Object
Instance Method Details
#create_user(options = {}) ⇒ Object
5 6 7 8 |
# File 'lib/caplinked/rest/users.rb', line 5 def create_user( = {}) body = .stringify_keys.slice('user') perform_post('/api/v1/users', {}, body.to_json, {'Content-Type' => 'application/json'} ) end |
#delete_user(options = {}) ⇒ Object
19 20 21 22 |
# File 'lib/caplinked/rest/users.rb', line 19 def delete_user( = {}) body = .stringify_keys.slice('user') perform_delete('/api/v1/users', {}, body.to_json, {'Content-Type' => 'application/json'}) end |
#get_user_info(options = {}) ⇒ Object
10 11 12 |
# File 'lib/caplinked/rest/users.rb', line 10 def get_user_info( = {}) perform_get('/api/v1/users/me', nil ) end |
#update_user(options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/caplinked/rest/users.rb', line 14 def update_user( = {}) body = .stringify_keys.slice('user') perform_put('/api/v1/users/me', {}, body.to_json, {'Content-Type' => 'application/json'} ) end |