desoleary / survey-monkey-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swagger_client

SwaggerClient - the Ruby gem for the SurveyMonkey API V3 Minimal

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen

How to generate Swagger Client API from Postman Collection Export

Installation

Build a gem

To build the Ruby code into a gem:

gem build swagger_client.gemspec

Then either install the gem locally:

gem install ./swagger_client-1.0.0.gem

(for development, run gem install --dev ./swagger_client-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'swagger_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'swagger_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'swagger_client'

api_instance = SwaggerClient::CollectorsAndInviteMessagesApi.new
opts = { 
  body: SwaggerClient::Model310099766CollectorsBody.new # Model310099766CollectorsBody | 
}

begin
  #Create a survey collector
  api_instance.create_a_survey_collector(opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling CollectorsAndInviteMessagesApi->create_a_survey_collector: #{e}"
end

api_instance = SwaggerClient::CollectorsAndInviteMessagesApi.new
collector_id = 'collector_id_example' # String | 


begin
  #Get a collector by id
  api_instance.get_a_collector_by_id(collector_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling CollectorsAndInviteMessagesApi->get_a_collector_by_id: #{e}"
end

api_instance = SwaggerClient::CollectorsAndInviteMessagesApi.new

begin
  #Get survey collectors
  api_instance.get_survey_collectors
rescue SwaggerClient::ApiError => e
  puts "Exception when calling CollectorsAndInviteMessagesApi->get_survey_collectors: #{e}"
end

api_instance = SwaggerClient::ContactsAndContactListsApi.new
opts = { 
  body: SwaggerClient::V3ContactsBody.new # V3ContactsBody | 
}

begin
  #Create a new contact
  api_instance.create_a_new_contact(opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling ContactsAndContactListsApi->create_a_new_contact: #{e}"
end

api_instance = SwaggerClient::ContactsAndContactListsApi.new
contact_id = 'contact_id_example' # String | 


begin
  #Get a contact
  api_instance.get_a_contact(contact_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling ContactsAndContactListsApi->get_a_contact: #{e}"
end

api_instance = SwaggerClient::ContactsAndContactListsApi.new

begin
  #Get all contacts
  api_instance.get_all_contacts
rescue SwaggerClient::ApiError => e
  puts "Exception when calling ContactsAndContactListsApi->get_all_contacts: #{e}"
end

api_instance = SwaggerClient::ErrorsApi.new

begin
  #Get error by id
  api_instance.get_error_by_id
rescue SwaggerClient::ApiError => e
  puts "Exception when calling ErrorsApi->get_error_by_id: #{e}"
end

api_instance = SwaggerClient::ErrorsApi.new

begin
  #Get list of known errors
  api_instance.get_list_of_known_errors
rescue SwaggerClient::ApiError => e
  puts "Exception when calling ErrorsApi->get_list_of_known_errors: #{e}"
end

api_instance = SwaggerClient::SurveyResponsesApi.new
collector_id = 'collector_id_example' # String | 
opts = { 
  body: SwaggerClient::COLLECTORIDResponsesBody.new # COLLECTORIDResponsesBody | 
}

begin
  #Create a response
  api_instance.create_a_response(collector_id, opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveyResponsesApi->create_a_response: #{e}"
end

api_instance = SwaggerClient::SurveyResponsesApi.new
collector_id = 'collector_id_example' # String | 


begin
  #Get a list of responses by collector id
  api_instance.get_a_list_of_responses_by_collector_id(collector_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveyResponsesApi->get_a_list_of_responses_by_collector_id: #{e}"
end

api_instance = SwaggerClient::SurveyResponsesApi.new
collector_id = 'collector_id_example' # String | 


begin
  #Get a list of responses by collector id
  api_instance.get_a_list_of_responses_by_collector_id1(collector_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveyResponsesApi->get_a_list_of_responses_by_collector_id1: #{e}"
end

api_instance = SwaggerClient::SurveyResponsesApi.new

begin
  # Get a list of responses by survey id
  api_instance.get_a_list_of_responses_by_survey_id
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveyResponsesApi->get_a_list_of_responses_by_survey_id: #{e}"
end

api_instance = SwaggerClient::SurveyResponsesApi.new
collector_id = 'collector_id_example' # String | 
response_id = 'response_id_example' # String | 


begin
  #Get response by collector and response id
  api_instance.get_response_by_collector_and_response_id(collector_id, response_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveyResponsesApi->get_response_by_collector_and_response_id: #{e}"
end

api_instance = SwaggerClient::SurveyResponsesApi.new
response_id = 'response_id_example' # String | 


begin
  #Get response by survey and response id
  api_instance.get_response_by_survey_and_response_id(response_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveyResponsesApi->get_response_by_survey_and_response_id: #{e}"
end

api_instance = SwaggerClient::SurveyResponsesApi.new
collector_id = 'collector_id_example' # String | 
response_id = 'response_id_example' # String | 


begin
  #Get response details
  api_instance.get_response_details(collector_id, response_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveyResponsesApi->get_response_details: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new
page_id = 'page_id_example' # String | 
opts = { 
  body: SwaggerClient::PAGEIDQuestionsBody.new # PAGEIDQuestionsBody | 
}

begin
  #Create a question
  api_instance.create_a_question(page_id, opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->create_a_question: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new
opts = { 
  body: SwaggerClient::V3SurveysBody.new # V3SurveysBody | 
}

begin
  #Create a survey
  result = api_instance.create_a_survey(opts)
  p result
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->create_a_survey: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new
page_id = 'page_id_example' # String | 
question_id = 'question_id_example' # String | 


begin
  #Get a question detail
  api_instance.get_a_question_detail(page_id, question_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->get_a_question_detail: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new

begin
  #Get a survey
  api_instance.get_a_survey
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->get_a_survey: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new

begin
  #Get a survey details
  api_instance.get_a_survey_details
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->get_a_survey_details: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new
page_id = 'page_id_example' # String | 


begin
  #Get list of questions
  api_instance.get_list_of_questions(page_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->get_list_of_questions: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new

begin
  #Get surveys
  api_instance.get_surveys
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->get_surveys: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new
opts = { 
  body: SwaggerClient::Surveys310099766Body.new # Surveys310099766Body | 
}

begin
  #Modify a survey
  api_instance.modify_a_survey(opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->modify_a_survey: #{e}"
end

api_instance = SwaggerClient::SurveysPagesAndQuestionsApi.new
page_id = 'page_id_example' # String | 
question_id = 'question_id_example' # String | 
opts = { 
  body: SwaggerClient::QuestionsQUESTIONIDBody.new # QuestionsQUESTIONIDBody | 
}

begin
  #Update a question
  api_instance.update_a_question(page_id, question_id, opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling SurveysPagesAndQuestionsApi->update_a_question: #{e}"
end

api_instance = SwaggerClient::UsersAndGroupsApi.new

begin
  #Get a group member
  api_instance.get_a_group_member
rescue SwaggerClient::ApiError => e
  puts "Exception when calling UsersAndGroupsApi->get_a_group_member: #{e}"
end

api_instance = SwaggerClient::UsersAndGroupsApi.new

begin
  #Get group members
  api_instance.get_group_members
rescue SwaggerClient::ApiError => e
  puts "Exception when calling UsersAndGroupsApi->get_group_members: #{e}"
end

api_instance = SwaggerClient::UsersAndGroupsApi.new

begin
  #Get user details
  api_instance.get_user_details
rescue SwaggerClient::ApiError => e
  puts "Exception when calling UsersAndGroupsApi->get_user_details: #{e}"
end

api_instance = SwaggerClient::UsersAndGroupsApi.new

begin
  #Get user group
  api_instance.get_user_group
rescue SwaggerClient::ApiError => e
  puts "Exception when calling UsersAndGroupsApi->get_user_group: #{e}"
end

api_instance = SwaggerClient::UsersAndGroupsApi.new

begin
  #Get user group by id
  api_instance.get_user_group_by_id
rescue SwaggerClient::ApiError => e
  puts "Exception when calling UsersAndGroupsApi->get_user_group_by_id: #{e}"
end

api_instance = SwaggerClient::WebhooksApi.new
opts = { 
  body: SwaggerClient::V3WebhooksBody.new # V3WebhooksBody | 
}

begin
  #Create a  webhooks
  api_instance.create_a_webhooks(opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling WebhooksApi->create_a_webhooks: #{e}"
end

api_instance = SwaggerClient::WebhooksApi.new

begin
  #Get a list of webhooks
  api_instance.get_a_list_of_webhooks
rescue SwaggerClient::ApiError => e
  puts "Exception when calling WebhooksApi->get_a_list_of_webhooks: #{e}"
end

api_instance = SwaggerClient::WebhooksApi.new
webhook_id = 'webhook_id_example' # String | 


begin
  #Get a webhook by id
  api_instance.get_a_webhook_by_id(webhook_id)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling WebhooksApi->get_a_webhook_by_id: #{e}"
end

api_instance = SwaggerClient::WebhooksApi.new
webhook_id = 'webhook_id_example' # String | 
opts = { 
  body: SwaggerClient::WebhooksWEBHOOKIDBody1.new # WebhooksWEBHOOKIDBody1 | 
}

begin
  #Modify a webhook
  api_instance.modify_a_webhook(webhook_id, opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling WebhooksApi->modify_a_webhook: #{e}"
end

api_instance = SwaggerClient::WebhooksApi.new
webhook_id = 'webhook_id_example' # String | 
opts = { 
  body: SwaggerClient::WebhooksWEBHOOKIDBody.new # WebhooksWEBHOOKIDBody | 
}

begin
  #Replace a webhook
  api_instance.replace_a_webhook(webhook_id, opts)
rescue SwaggerClient::ApiError => e
  puts "Exception when calling WebhooksApi->replace_a_webhook: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.surveymonkey.net

Class Method HTTP request Description
SwaggerClient::CollectorsAndInviteMessagesApi create_a_survey_collector POST /v3/surveys/310099766/collectors Create a survey collector
SwaggerClient::CollectorsAndInviteMessagesApi get_a_collector_by_id GET /v3/collectors/{COLLECTOR_ID} Get a collector by id
SwaggerClient::CollectorsAndInviteMessagesApi get_survey_collectors GET /v3/surveys/310099766/collectors Get survey collectors
SwaggerClient::ContactsAndContactListsApi create_a_new_contact POST /v3/contacts Create a new contact
SwaggerClient::ContactsAndContactListsApi get_a_contact GET /v3/contacts/{CONTACT_ID} Get a contact
SwaggerClient::ContactsAndContactListsApi get_all_contacts GET /v3/contacts Get all contacts
SwaggerClient::ErrorsApi get_error_by_id GET /v3/errors/ERROR_ID Get error by id
SwaggerClient::ErrorsApi get_list_of_known_errors GET /v3/errors Get list of known errors
SwaggerClient::SurveyResponsesApi create_a_response POST /v3/collectors/{COLLECTOR_ID}/responses Create a response
SwaggerClient::SurveyResponsesApi get_a_list_of_responses_by_collector_id GET /v3/collectors/{COLLECTOR_ID}/responses Get a list of responses by collector id
SwaggerClient::SurveyResponsesApi get_a_list_of_responses_by_collector_id1 GET /v3/collectors/{COLLECTOR_ID}/responses/bulk Get a list of responses by collector id
SwaggerClient::SurveyResponsesApi get_a_list_of_responses_by_survey_id GET /v3/surveys/310099766/responses/bulk Get a list of responses by survey id
SwaggerClient::SurveyResponsesApi get_response_by_collector_and_response_id GET /v3/collectors/{COLLECTOR_ID}/responses/{RESPONSE_ID} Get response by collector and response id
SwaggerClient::SurveyResponsesApi get_response_by_survey_and_response_id GET /v3/survey/310099766/responses/{RESPONSE_ID} Get response by survey and response id
SwaggerClient::SurveyResponsesApi get_response_details GET /v3/collectors/{COLLECTOR_ID}/responses/{RESPONSE_ID}/details Get response details
SwaggerClient::SurveysPagesAndQuestionsApi create_a_question POST /v3/surveys/310099766/pages/{PAGE_ID}/questions Create a question
SwaggerClient::SurveysPagesAndQuestionsApi create_a_survey POST /v3/surveys Create a survey
SwaggerClient::SurveysPagesAndQuestionsApi get_a_question_detail GET /v3/surveys/310099766/pages/{PAGE_ID}/questions/{QUESTION_ID} Get a question detail
SwaggerClient::SurveysPagesAndQuestionsApi get_a_survey GET /v3/surveys/310099766 Get a survey
SwaggerClient::SurveysPagesAndQuestionsApi get_a_survey_details GET /v3/surveys/310099766/details Get a survey details
SwaggerClient::SurveysPagesAndQuestionsApi get_list_of_questions GET /v3/surveys/310099766/pages/{PAGE_ID}/questions Get list of questions
SwaggerClient::SurveysPagesAndQuestionsApi get_surveys GET /v3/surveys Get surveys
SwaggerClient::SurveysPagesAndQuestionsApi modify_a_survey PATCH /v3/surveys/310099766 Modify a survey
SwaggerClient::SurveysPagesAndQuestionsApi update_a_question PATCH /v3/surveys/310099766/pages/{PAGE_ID}/questions/{QUESTION_ID} Update a question
SwaggerClient::UsersAndGroupsApi get_a_group_member GET /v3/groups/GROUP_ID/members/MEMBER_ID Get a group member
SwaggerClient::UsersAndGroupsApi get_group_members GET /v3/groups/GROUP_ID/members Get group members
SwaggerClient::UsersAndGroupsApi get_user_details GET /v3/users/me Get user details
SwaggerClient::UsersAndGroupsApi get_user_group GET /v3/groups Get user group
SwaggerClient::UsersAndGroupsApi get_user_group_by_id GET /v3/groups/GROUP_ID Get user group by id
SwaggerClient::WebhooksApi create_a_webhooks POST /v3/webhooks Create a webhooks
SwaggerClient::WebhooksApi get_a_list_of_webhooks GET /v3/webhooks Get a list of webhooks
SwaggerClient::WebhooksApi get_a_webhook_by_id GET /v3/webhooks/{WEBHOOK_ID} Get a webhook by id
SwaggerClient::WebhooksApi modify_a_webhook PATCH /v3/webhooks/{WEBHOOK_ID} Modify a webhook
SwaggerClient::WebhooksApi replace_a_webhook PUT /v3/webhooks/{WEBHOOK_ID} Replace a webhook

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

About


Languages

Language:Ruby 99.4%Language:Shell 0.6%