Module: Knodes::Client::Users

Included in:
Knodes::Client
Defined in:
lib/knodes/client/users.rb

Instance Method Summary collapse

Instance Method Details

#user(options = {}) ⇒ Object



4
5
6
# File 'lib/knodes/client/users.rb', line 4

def user(options={})
response = get("users/#{options[:user_id]}", options.merge(creds))
end

#user_connect(options = {}) ⇒ Object



8
9
10
# File 'lib/knodes/client/users.rb', line 8

def user_connect(options={})
  response = post("users/connect", options.merge(creds))
end

#user_disconnect(options = {}) ⇒ Object



12
13
14
# File 'lib/knodes/client/users.rb', line 12

def user_disconnect(options={})
  response = post("users/disconnect", options.merge(creds))
end

#user_do_index(options = {}) ⇒ Object



35
36
37
38
# File 'lib/knodes/client/users.rb', line 35

def user_do_index(options={})
  response = post("users/#{options[:user_id]}/do_index", options.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(options={})
  response = post("users/notify_active", options.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(options={})
  #do a raw request/response (don't parse), as this method only returns an http status
  response = post("users/notify_inactive", options.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(options={})
  response = get("users/#{options[:user_id]}/ready", options.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(options={})
  response = post("users/#{options[:user_id]}", options.merge(creds))
end