Module: Ohmage::API::User
- Included in:
- Ohmage::API
- Defined in:
- lib/ohmage/user.rb
Instance Method Summary collapse
-
#user_create(params = {}) ⇒ Object
ohmage user/create call.
- #user_delete(params = {}) ⇒ Object
-
#user_info_read ⇒ Object
ohmage user_info/read call.
-
#user_password(params = {}) ⇒ Object
is this method name odd?.
-
#user_read(params = {}) ⇒ Object
ohmage user/read call.
-
#user_update(params = {}) ⇒ Object
ohmage user/update call.
Instance Method Details
#user_create(params = {}) ⇒ Object
ohmage user/create call
33 34 35 36 37 |
# File 'lib/ohmage/user.rb', line 33 def user_create(params = {}) request = Ohmage::Request.new(self, :post, 'user/create', params) request.perform user_read(user_list: params[:username]) end |
#user_delete(params = {}) ⇒ Object
58 59 60 61 |
# File 'lib/ohmage/user.rb', line 58 def user_delete(params = {}) request = Ohmage::Request.new(self, :post, 'user/delete', params) request.perform end |
#user_info_read ⇒ Object
ohmage user_info/read call
23 24 25 26 |
# File 'lib/ohmage/user.rb', line 23 def user_info_read request = Ohmage::Request.new(self, :post, 'user_info/read', {}) Ohmage::User.new(request.perform[:data]) end |
#user_password(params = {}) ⇒ Object
is this method name odd?
50 51 52 53 54 55 56 |
# File 'lib/ohmage/user.rb', line 50 def user_password(params = {}) # is this method name odd? # this api call demands current user's info. params[:user] = user params[:password] = password request = Ohmage::Request.new(self, :post, 'user/change_password', params) request.perform end |