Class: DocFox::AccessToken::GetService
- Inherits:
-
BaseService
- Object
- BaseService
- DocFox::AccessToken::GetService
- Defined in:
- lib/doc_fox/access_token/get_service.rb
Instance Attribute Summary collapse
-
#authentication_service ⇒ Object
readonly
Returns the value of attribute authentication_service.
Instance Method Summary collapse
-
#call ⇒ Object
Get access token.
Instance Attribute Details
#authentication_service ⇒ Object (readonly)
Returns the value of attribute authentication_service.
4 5 6 |
# File 'lib/doc_fox/access_token/get_service.rb', line 4 def authentication_service @authentication_service end |
Instance Method Details
#call ⇒ Object
Get access token.
https://www.docfoxapp.com/api/v2/documentation#tag/Authentication/paths/~1api~1v2~1tokens~1new/get
Examples
service = DocFox::AccessToken::GetService.call
service.token # => '1000.xxxx.yyyy'
service.expires_at # => '2025-01-01T06:00:00.000+02:00'
GET /api/v2/tokens/new
29 30 31 |
# File 'lib/doc_fox/access_token/get_service.rb', line 29 def call connection.get('tokens/new') end |