Class: Plagscan::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/plagscan/token.rb

Overview

PlagScan access token API

Class Method Summary collapse

Class Method Details

.fetch(client_id:, client_secret:) ⇒ Hash

token REST API

Parameters:

Returns:

  • (Hash)

    containing access_token and expires_in



14
15
16
17
18
19
# File 'lib/plagscan/token.rb', line 14

def self.fetch(client_id:, client_secret:)
  Plagscan::Request.json_request(
    'token',
    method: :post, body: { client_id: client_id, client_secret: client_secret }
  )
end