Class: DroneApi::Auth
Defined Under Namespace
Classes: Params
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Attributes inherited from Base
#account_id, #client_id, #client_secret, #response_data, #response_status
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(params = {}) ⇒ Auth
constructor
A new instance of Auth.
Methods inherited from Base
#api_path, #env_url, #errors, #is_form_request?, #make_request, #parse_payload, #process_request, #query_params, #request, #request_type, #requires_authentication?, #response, #set_auth_header, #valid?
Constructor Details
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
9 10 11 |
# File 'lib/drone_api/auth.rb', line 9 def token @token end |
Instance Method Details
#execute ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/drone_api/auth.rb', line 21 def execute validate if valid? create_token DroneApi.configuration.current_token = @token end end |