Class: Perka::PerkaApi::TokenRequest

Inherits:
Flatpack::Client::JsonRequest
  • Object
show all
Defined in:
lib/perka/perka_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api, payload) ⇒ TokenRequest

Returns a new instance of TokenRequest.



81
82
83
84
85
# File 'lib/perka/perka_api.rb', line 81

def initialize(api, payload)
  @payload = payload
  super(api, "POST", "/api/2/auth/token");
  header("Content-Type", "application/x-www-form-urlencoded");
end

Instance Attribute Details

#payloadObject

Returns the value of attribute payload.



79
80
81
# File 'lib/perka/perka_api.rb', line 79

def payload
  @payload
end