Class: Episodic::Platform::TokenResponse

Inherits:
Response
  • Object
show all
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

Methods inherited from Response

#xml

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

#tokenObject

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