Module: Croudia::API::Account
- Included in:
- Client
- Defined in:
- lib/croudia/api/account.rb
Instance Method Summary collapse
-
#update_cover_image(image, params = {}) ⇒ Croudia::User
Update cover image.
-
#update_profile(params) ⇒ Croudia::User
Update profile.
-
#update_profile_image(image, params = {}) ⇒ Croudia::User
Update profile image.
-
#verify_credentials(params = {}) ⇒ Croudia::User
(also: #current_user)
Retrieve the Authenticated User.
Instance Method Details
#update_cover_image(image, params = {}) ⇒ Croudia::User #update_cover_image(params = {}) ⇒ Croudia::User
Update cover image
43 44 45 46 47 |
# File 'lib/croudia/api/account.rb', line 43 def update_cover_image(image, params={}) merge_file!(params, image, :image) resp = post('/account/update_cover_image.json', params) Croudia::User.new(resp) end |
#update_profile(params) ⇒ Croudia::User
Update profile
58 59 60 61 |
# File 'lib/croudia/api/account.rb', line 58 def update_profile(params) resp = post('/account/update_profile.json', params) Croudia::User.new(resp) end |
#update_profile_image(image, params = {}) ⇒ Croudia::User #update_profile_image(params = {}) ⇒ Croudia::User
Update profile image
27 28 29 30 31 |
# File 'lib/croudia/api/account.rb', line 27 def update_profile_image(image, params={}) merge_file!(params, image, :image) resp = post('/account/update_profile_image.json', params) Croudia::User.new(resp) end |
#verify_credentials(params = {}) ⇒ Croudia::User Also known as: current_user
Retrieve the Authenticated User
11 12 13 14 |
# File 'lib/croudia/api/account.rb', line 11 def verify_credentials(params={}) resp = get('/account/verify_credentials.json', params) Croudia::User.new(resp) end |