Module: BWAPI::Client::User
- Includes:
- Facebook, InstagramCredentials, Notifications, Tokens, TwitterCredentials
- Included in:
- BWAPI::Client
- Defined in:
- lib/bwapi/client/user.rb,
lib/bwapi/client/user/tokens.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, Tokens, 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 Tokens
#delete_user_token, #user_tokens
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
103 104 105 |
# File 'lib/bwapi/client/user.rb', line 103 def api_role user.apiRole end |
#change_password(opts = {}) ⇒ Object
Change password
TODO: Add parameters documentation
47 48 49 |
# File 'lib/bwapi/client/user.rb', line 47 def change_password(opts = {}) put '/user/changePassword', opts end |
#enable_two_factor_auth(opts = {}) ⇒ Object
Enable 2FA for current user
TODO: Add parameters documentation
75 76 77 |
# File 'lib/bwapi/client/user.rb', line 75 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
68 69 70 |
# File 'lib/bwapi/client/user.rb', line 68 def generate_two_factor_auth(opts = {}) post '/user/generateTwoFactorAuthKey', opts end |
#reset_password(opts = {}) ⇒ Object
Reset password for user
TODO: Add parameters documentation
54 55 56 |
# File 'lib/bwapi/client/user.rb', line 54 def reset_password(opts = {}) post '/user/resetPassword', opts end |
#send_code(opts = {}) ⇒ Object
Send authentication code
TODO: Add parameters documentation
89 90 91 |
# File 'lib/bwapi/client/user.rb', line 89 def send_code(opts = {}) post '/user/sendCode', opts end |
#send_reset_password_email(opts = {}) ⇒ Object
Send reset password email
TODO: Add parameters documentation
61 62 63 |
# File 'lib/bwapi/client/user.rb', line 61 def send_reset_password_email(opts = {}) post '/user/sendResetPasswordEmail', opts end |
#ui_role ⇒ String
Get users ui role
110 111 112 |
# File 'lib/bwapi/client/user.rb', line 110 def ui_role user.uiRole end |
#update_user(opts = {}) ⇒ Hash
Update the current user
40 41 42 |
# File 'lib/bwapi/client/user.rb', line 40 def update_user(opts = {}) put 'user', opts end |
#user ⇒ Hash
Get the current user
14 15 16 |
# File 'lib/bwapi/client/user.rb', line 14 def user get 'user' end |
#user_spredfast ⇒ Object
Get Spredfast integration for current user
TODO: Add parameters documentation
96 97 98 |
# File 'lib/bwapi/client/user.rb', line 96 def user_spredfast get '/user/spredfast' end |
#verify_code(opts = {}) ⇒ Object
Verify OTP code
TODO: Add parameters documentation
82 83 84 |
# File 'lib/bwapi/client/user.rb', line 82 def verify_code(opts = {}) get '/user/verifyCode', opts end |