Class: Episodic::Platform::TokenResponse
- Defined in:
- lib/episodic/platform/analytics_methods.rb
Overview
All token request methods have a similar response structure. This class extends Episodic::Platform::Response
and adds a method to get the token of the generated report.
Instance Method Summary collapse
-
#initialize(response) ⇒ TokenResponse
constructor
Constructor.
-
#token ⇒ Object
Get the token used to request the generated report.
Methods inherited from Response
Constructor Details
#initialize(response) ⇒ TokenResponse
Constructor
Parameters
- response<Episodic::Platform::HTTPResponse>
-
The response object returned from an Episodic Platform API request.
174 175 176 |
# File 'lib/episodic/platform/analytics_methods.rb', line 174 def initialize response super(response, "ForceArray" => false) end |
Instance Method Details
#token ⇒ Object
Get the token used to request the generated report. This token is passed to Episodic::Platform::AnalyticsMethods.get_report
.
182 183 184 |
# File 'lib/episodic/platform/analytics_methods.rb', line 182 def token return @parsed_body["report_token"] end |