Class: DocFox::AccessToken::GetService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/doc_fox/access_token/get_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authentication_serviceObject (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

#callObject

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