Class: KazeClient::LoginRequest
- Inherits:
-
Utils::FinalRequest
- Object
- Request
- Utils::FinalRequest
- KazeClient::LoginRequest
- Defined in:
- lib/kaze_client/request/requests/login_request.rb
Overview
Authenticate a user on the server.
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#login ⇒ String
readonly
The user login.
Attributes inherited from Request
#body, #headers, #method, #query, #url
Instance Method Summary collapse
-
#initialize(login:, password:) ⇒ LoginRequest
constructor
A new instance of LoginRequest.
Methods inherited from Request
Constructor Details
#initialize(login:, password:) ⇒ LoginRequest
Returns a new instance of LoginRequest.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/kaze_client/request/requests/login_request.rb', line 17 def initialize(login:, password:) super(:post, 'api/login') @login = login @password = password @body = { user: { login: @login, password: @password } } end |
Instance Attribute Details
#login ⇒ String (readonly)
Returns The user login.
13 14 15 |
# File 'lib/kaze_client/request/requests/login_request.rb', line 13 def login @login end |