Class: Surveymonkey::Client
- Inherits:
-
Object
- Object
- Surveymonkey::Client
- Includes:
- HTTParty, Survey
- Defined in:
- lib/surveymonkey_api/client.rb,
lib/surveymonkey_api/client/survey.rb
Overview
Client
Defined Under Namespace
Modules: Survey
Instance Method Summary collapse
-
#initialize(access_token = nil) ⇒ Client
constructor
A new instance of Client.
Methods included from Survey
#all_survey_responses, #survey_details, #survey_folder, #survey_folders, #survey_response, #survey_responses, #surveys
Constructor Details
#initialize(access_token = nil) ⇒ Client
Returns a new instance of Client.
9 10 11 12 |
# File 'lib/surveymonkey_api/client.rb', line 9 def initialize(access_token = nil) @access_token = access_token || ENV['SURVEYMONKEY_API_TOKEN'] self.class..merge!(headers: { 'Authorization' => "bearer #{@access_token}" }) end |