module BWAPI::Client::User
User
module for user endpoints and helper methods
Public Instance Methods
Get users api role
@return [String] Users api role
# File lib/bwapi/client/user.rb, line 102 def api_role user.apiRole end
Change password
TODO: Add parameters documentation
# File lib/bwapi/client/user.rb, line 46 def change_password(opts = {}) put '/user/changePassword', opts end
Enable 2FA for current user
TODO: Add parameters documentation
# File lib/bwapi/client/user.rb, line 74 def enable_two_factor_auth(opts = {}) post '/user/enableTwoFactorAuth', opts end
Generate 2FA key for the current user
TODO: Add parameters documentation
# File lib/bwapi/client/user.rb, line 67 def generate_two_factor_auth(opts = {}) post '/user/generateTwoFactorAuthKey', opts end
Reset password for user
TODO: Add parameters documentation
# File lib/bwapi/client/user.rb, line 53 def reset_password(opts = {}) post '/user/resetPassword', opts end
Send authentication code
TODO: Add parameters documentation
# File lib/bwapi/client/user.rb, line 88 def send_code(opts = {}) post '/user/sendCode', opts end
Send reset password email
TODO: Add parameters documentation
# File lib/bwapi/client/user.rb, line 60 def send_reset_password_email(opts = {}) post '/user/sendResetPasswordEmail', opts end
Get users ui role
@return [String] Users ui role
# File lib/bwapi/client/user.rb, line 109 def ui_role user.uiRole end
Update the current user
@param opts [Hash] options Hash of parameters @option opts [Integer] id Id of the user @option opts [Hash] tags The users assigned tags @option opts [String] passwordConfirmation The confirmed password @option opts [Boolean] enabled The status of the user @option opts [String] lastName The last name of the user @option opts [String] phone The users phone number @option opts [String] department The users department @option opts [String] job The users job @option opts [String] messenger The users IM details @option opts [String] password The password of the user @option opts [Integer] clientId The users client id @option opts [String] username The users username @option opts [String] address The users address @option opts [String] uiRole The users ui role @option opts [Array] apiRole The users api role @option opts [String] firstName The users first name @option opts [String] mobile The users mobile number @option opts [Date] creationDate Date the user was created on @return [Hash] Updated user information
# File lib/bwapi/client/user.rb, line 39 def update_user(opts = {}) put 'user', opts end
Get the current user
@return [Hash] User
information
# File lib/bwapi/client/user.rb, line 13 def user get 'user' end
Get Spredfast integration for current user
TODO: Add parameters documentation
# File lib/bwapi/client/user.rb, line 95 def user_spredfast get '/user/spredfast' end
Verify OTP code
TODO: Add parameters documentation
# File lib/bwapi/client/user.rb, line 81 def verify_code(opts = {}) get '/user/verifyCode', opts end