Module: Knodes::Client::Users
- Included in:
- Knodes::Client
- Defined in:
- lib/knodes/client/users.rb
Instance Method Summary collapse
- #user(options = {}) ⇒ Object
- #user_connect(options = {}) ⇒ Object
- #user_disconnect(options = {}) ⇒ Object
- #user_do_index(options = {}) ⇒ Object
- #user_notify_active(options = {}) ⇒ Object
- #user_notify_inactive(options = {}) ⇒ Object
- #user_ready(options = {}) ⇒ Object
- #user_update(options = {}) ⇒ Object
Instance Method Details
#user(options = {}) ⇒ Object
4 5 6 |
# File 'lib/knodes/client/users.rb', line 4 def user(={}) response = get("users/#{options[:user_id]}", .merge(creds)) end |
#user_connect(options = {}) ⇒ Object
8 9 10 |
# File 'lib/knodes/client/users.rb', line 8 def user_connect(={}) response = post("users/connect", .merge(creds)) end |
#user_disconnect(options = {}) ⇒ Object
12 13 14 |
# File 'lib/knodes/client/users.rb', line 12 def user_disconnect(={}) response = post("users/disconnect", .merge(creds)) end |
#user_do_index(options = {}) ⇒ Object
35 36 37 38 |
# File 'lib/knodes/client/users.rb', line 35 def user_do_index(={}) response = post("users/#{options[:user_id]}/do_index", .merge(creds), true) status = response.env[:status] end |
#user_notify_active(options = {}) ⇒ Object
20 21 22 |
# File 'lib/knodes/client/users.rb', line 20 def user_notify_active(={}) response = post("users/notify_active", .merge(creds)) end |
#user_notify_inactive(options = {}) ⇒ Object
24 25 26 27 28 |
# File 'lib/knodes/client/users.rb', line 24 def user_notify_inactive(={}) #do a raw request/response (don't parse), as this method only returns an http status response = post("users/notify_inactive", .merge(creds), true) status = response.env[:status] end |
#user_ready(options = {}) ⇒ Object
30 31 32 33 |
# File 'lib/knodes/client/users.rb', line 30 def user_ready(={}) response = get("users/#{options[:user_id]}/ready", .merge(creds), true) body = response.env[:body] end |
#user_update(options = {}) ⇒ Object
16 17 18 |
# File 'lib/knodes/client/users.rb', line 16 def user_update(={}) response = post("users/#{options[:user_id]}", .merge(creds)) end |