Class: Gista::TokenRequest
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- Gista::TokenRequest
- Defined in:
- lib/gista/token_request.rb
Overview
Request to the Github API to authorize with a username and password and acquire an OAuth token, which can be stored and re-used for password-less authorization.
Constant Summary
Constants inherited from ApiRequest
ApiRequest::CONTENT_TYPE, ApiRequest::OPEN_TIMEOUT, ApiRequest::PORT, ApiRequest::READ_TIMEOUT, ApiRequest::URL
Instance Attribute Summary collapse
-
#credentials ⇒ #username, #password
readonly
An object that contains a username and password.
Instance Method Summary collapse
-
#initialize(credentials) ⇒ TokenRequest
constructor
A new instance of TokenRequest.
Methods inherited from ApiRequest
Constructor Details
#initialize(credentials) ⇒ TokenRequest
Returns a new instance of TokenRequest.
18 19 20 |
# File 'lib/gista/token_request.rb', line 18 def initialize(credentials) @credentials = credentials end |
Instance Attribute Details
#credentials ⇒ #username, #password (readonly)
An object that contains a username and password
16 17 18 |
# File 'lib/gista/token_request.rb', line 16 def credentials @credentials end |