samplify_api_client

SamplifyAPIClient - the Ruby gem for the Samplify API

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
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build samplify_api_client.gemspec

Then either install the gem locally:

gem install ./samplify_api_client-1.0.0.gem

(for development, run gem install --dev ./samplify_api_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 'samplify_api_client', '~> 1.0.0'

Install from Git

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

gem 'samplify_api_client', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.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 'samplify_api_client'

# Setup authorization
SamplifyAPIClient.configure do |config|
  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SamplifyAPIClient::AttributesApi.new

country_iso_code = 'country_iso_code_example' # String | Country ISO code

language_iso_code = 'language_iso_code_example' # String | Language ISO code

opts = { 
  id: 'id_example', # String | Only return attributes with the given id
  limit: 10, # Integer | Maximum number of attributes to return
  name: 'name_example', # String | Only return attributes with the given name
  offset: 0, # Integer | The first zero-based offset attribute to return
  sort: ['sort_example'], # Array<String> | Sort the attributes by the given key(s)
  text: 'text_example' # String | Only return attributes with the given text
}

begin
  #list attributes
  result = api_instance.attributes_list(country_iso_code, language_iso_code, opts)
  p result
rescue SamplifyAPIClient::ApiError => e
  puts "Exception when calling AttributesApi->attributes_list: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.uat.pe.researchnow.com

Class Method HTTP request Description
SamplifyAPIClient::AttributesApi attributes_list GET /sample/v1/attributes/countryIsoCode/languageIsoCode list attributes
SamplifyAPIClient::AuthApi auth_code POST /auth/v1/token/code code auth
SamplifyAPIClient::AuthApi auth_logout POST /auth/v1/logout logout auth
SamplifyAPIClient::AuthApi auth_password POST /auth/v1/token/password password auth
SamplifyAPIClient::AuthApi auth_refresh POST /auth/v1/token/refresh refresh auth
SamplifyAPIClient::CategoriesApi categories_list GET /sample/v1/categories/surveyTopics list categories
SamplifyAPIClient::CountriesApi countries_list GET /sample/v1/countries list countries
SamplifyAPIClient::DefaultApi swaggerswagger_json GET /swagger.json Download public/swagger/swagger.json
SamplifyAPIClient::DefaultApi swaggerswagger_yaml GET /swagger.yaml Download public/swagger/swagger.yaml
SamplifyAPIClient::EventsApi events_accept POST /sample/v1/events/eventId/accept accept events
SamplifyAPIClient::EventsApi events_get GET /sample/v1/events/eventId get events
SamplifyAPIClient::EventsApi events_list GET /sample/v1/events list events
SamplifyAPIClient::EventsApi events_reject POST /sample/v1/events/eventId/reject reject events
SamplifyAPIClient::EventsApi events_reprice POST /sample/v1/events/lineItems/reprice reprice events
SamplifyAPIClient::FeasibilityApi feasibility_show GET /sample/v1/projects/extProjectId/feasibility show feasibility
SamplifyAPIClient::LineItemsApi line_items_close POST /sample/v1/projects/extProjectId/lineItems/extLineItemId/close close lineItems
SamplifyAPIClient::LineItemsApi line_items_create POST /sample/v1/projects/extProjectId/lineItems create lineItems
SamplifyAPIClient::LineItemsApi line_items_get GET /sample/v1/projects/extProjectId/lineItems/extLineItemId get lineItems
SamplifyAPIClient::LineItemsApi line_items_launch POST /sample/v1/projects/extProjectId/lineItems/extLineItemId/launch launch lineItems
SamplifyAPIClient::LineItemsApi line_items_list_line_items GET /sample/v1/projects/extProjectId/lineItems listLineItems lineItems
SamplifyAPIClient::LineItemsApi line_items_pause POST /sample/v1/projects/extProjectId/lineItems/extLineItemId/pause pause lineItems
SamplifyAPIClient::LineItemsApi line_items_update POST /sample/v1/projects/extProjectId/lineItems/extLineItemId update lineItems
SamplifyAPIClient::ProjectsApi projects_buy POST /sample/v1/projects/extProjectId/buy buy projects
SamplifyAPIClient::ProjectsApi projects_close POST /sample/v1/projects/extProjectId/close close projects
SamplifyAPIClient::ProjectsApi projects_create POST /sample/v1/projects create projects
SamplifyAPIClient::ProjectsApi projects_get GET /sample/v1/projects/extProjectId get projects
SamplifyAPIClient::ProjectsApi projects_get_report GET /sample/v1/projects/extProjectId/report getReport projects
SamplifyAPIClient::ProjectsApi projects_get_reports GET /sample/v1/projects/report getReports projects
SamplifyAPIClient::ProjectsApi projects_get_survey_end_links GET /sample/v1/projects/extProjectId/surveys/surveyId/links getSurveyEndLinks projects
SamplifyAPIClient::ProjectsApi projects_invoices GET /sample/v1/projects/extProjectId/invoices invoices projects
SamplifyAPIClient::ProjectsApi projects_list GET /sample/v1/projects list projects
SamplifyAPIClient::ProjectsApi projects_reconcile POST /sample/v1/projects/extProjectId/reconcile reconcile projects
SamplifyAPIClient::ProjectsApi projects_update POST /sample/v1/projects/extProjectId update projects
SamplifyAPIClient::RespondentApi respondent_entry GET /respondent/entry entry respondent
SamplifyAPIClient::RespondentApi respondent_exit GET /respondent/exit exit respondent
SamplifyAPIClient::UsersApi users_get_user_info GET /sample/v1/users/info getUserInfo users

Documentation for Models

Documentation for Authorization

jwt

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header