Class: SurveyMonkeyApi::Client
- Inherits:
-
Object
- Object
- SurveyMonkeyApi::Client
- Includes:
- HTTParty, SurveyResponses, Surveys, Users
- Defined in:
- lib/surveymonkey/client.rb,
lib/surveymonkey/client/users.rb,
lib/surveymonkey/client/surveys.rb,
lib/surveymonkey/client/responses.rb
Overview
Client class for api requests
Defined Under Namespace
Modules: SurveyResponses, Surveys, Users
Instance Method Summary collapse
-
#initialize(_args = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from SurveyResponses
#response, #response_with_details, #responses
Methods included from Surveys
#survey, #survey_with_details, #surveys
Methods included from Users
Constructor Details
#initialize(_args = {}) ⇒ Client
Returns a new instance of Client.
17 18 19 20 |
# File 'lib/surveymonkey/client.rb', line 17 def initialize(_args = {}) access_token = ENV['SURVEY_MONKEY_TOKEN'] self.class..merge!(headers: { 'Authorization' => "Bearer #{access_token}", 'Content-Type' => 'application/json' }) end |