Module: BWAPI::Client::User
- Includes:
- Facebook, InstagramCredentials, Notifications, TwitterCredentials
- Included in:
- BWAPI::Client
- Defined in:
- lib/bwapi/client/user.rb,
lib/bwapi/client/user/facebook.rb,
lib/bwapi/client/user/notifications.rb,
lib/bwapi/client/user/twitter_credentials.rb,
lib/bwapi/client/user/instagram_credentials.rb
Overview
User module for user endpoints and helper methods
Defined Under Namespace
Modules: Facebook, InstagramCredentials, Notifications, TwitterCredentials
Instance Method Summary collapse
-
#api_role ⇒ String
Get users api role.
-
#change_password(opts = {}) ⇒ Object
Change password.
-
#enable_two_factor_auth(opts = {}) ⇒ Object
Enable 2FA for current user.
-
#generate_two_factor_auth(opts = {}) ⇒ Object
Generate 2FA key for the current user.
-
#reset_password(opts = {}) ⇒ Object
Reset password for user.
-
#send_code(opts = {}) ⇒ Object
Send authentication code.
-
#send_reset_password_email(opts = {}) ⇒ Object
Send reset password email.
-
#ui_role ⇒ String
Get users ui role.
-
#update_user(opts = {}) ⇒ Hash
Update the current user.
-
#user ⇒ Hash
Get the current user.
-
#user_spredfast ⇒ Object
Get Spredfast integration for current user.
-
#verify_code(opts = {}) ⇒ Object
Verify OTP code.
Methods included from TwitterCredentials
#delete_twitter_credentials, #twitter_credentials, #update_twitter_credentials
Methods included from Notifications
#create_notification, #notifications, #patch_notification, #update_notification
Methods included from InstagramCredentials
#delete_instagram_credentials, #instagram_credentials, #update_instagram_credentials
Methods included from Facebook
Instance Method Details
#api_role ⇒ String
Get users api role
102 103 104 |
# File 'lib/bwapi/client/user.rb', line 102 def api_role user.apiRole end |
#change_password(opts = {}) ⇒ Object
Change password
TODO: Add parameters documentation
46 47 48 |
# File 'lib/bwapi/client/user.rb', line 46 def change_password(opts = {}) put '/user/changePassword', opts end |
#enable_two_factor_auth(opts = {}) ⇒ Object
Enable 2FA for current user
TODO: Add parameters documentation
74 75 76 |
# File 'lib/bwapi/client/user.rb', line 74 def enable_two_factor_auth(opts = {}) post '/user/enableTwoFactorAuth', opts end |
#generate_two_factor_auth(opts = {}) ⇒ Object
Generate 2FA key for the current user
TODO: Add parameters documentation
67 68 69 |
# File 'lib/bwapi/client/user.rb', line 67 def generate_two_factor_auth(opts = {}) post '/user/generateTwoFactorAuthKey', opts end |
#reset_password(opts = {}) ⇒ Object
Reset password for user
TODO: Add parameters documentation
53 54 55 |
# File 'lib/bwapi/client/user.rb', line 53 def reset_password(opts = {}) post '/user/resetPassword', opts end |
#send_code(opts = {}) ⇒ Object
Send authentication code
TODO: Add parameters documentation
88 89 90 |
# File 'lib/bwapi/client/user.rb', line 88 def send_code(opts = {}) post '/user/sendCode', opts end |
#send_reset_password_email(opts = {}) ⇒ Object
Send reset password email
TODO: Add parameters documentation
60 61 62 |
# File 'lib/bwapi/client/user.rb', line 60 def send_reset_password_email(opts = {}) post '/user/sendResetPasswordEmail', opts end |
#ui_role ⇒ String
Get users ui role
109 110 111 |
# File 'lib/bwapi/client/user.rb', line 109 def ui_role user.uiRole end |
#update_user(opts = {}) ⇒ Hash
Update the current user
39 40 41 |
# File 'lib/bwapi/client/user.rb', line 39 def update_user(opts = {}) put 'user', opts end |
#user ⇒ Hash
Get the current user
13 14 15 |
# File 'lib/bwapi/client/user.rb', line 13 def user get 'user' end |
#user_spredfast ⇒ Object
Get Spredfast integration for current user
TODO: Add parameters documentation
95 96 97 |
# File 'lib/bwapi/client/user.rb', line 95 def user_spredfast get '/user/spredfast' end |
#verify_code(opts = {}) ⇒ Object
Verify OTP code
TODO: Add parameters documentation
81 82 83 |
# File 'lib/bwapi/client/user.rb', line 81 def verify_code(opts = {}) get '/user/verifyCode', opts end |