Class: MonkeyBusiness::API
- Inherits:
-
Object
- Object
- MonkeyBusiness::API
- Defined in:
- lib/monkey_business.rb
Overview
This is the class the end-user should be interacting with.
Instance Method Summary collapse
- #benchmark_bundles(options = {}) ⇒ Object
- #collectors(options = {}) ⇒ Object
- #contact_fields(options = {}) ⇒ Object
- #contact_lists(options = {}) ⇒ Object
- #contacts(options = {}) ⇒ Object
- #errors(options = {}) ⇒ Object
- #groups(options = {}) ⇒ Object
-
#initialize ⇒ API
constructor
A new instance of API.
- #request(resource_path, options = {}) ⇒ Object
- #survey_categories(options = {}) ⇒ Object
- #survey_templates(options = {}) ⇒ Object
- #surveys(options = {}) ⇒ Object
- #users(options = {}) ⇒ Object
- #webhooks(options = {}) ⇒ Object
Constructor Details
#initialize ⇒ API
Returns a new instance of API.
22 23 24 |
# File 'lib/monkey_business.rb', line 22 def initialize @access_token = ENV['SURVEYMONKEY_ACCESS_TOKEN'] end |
Instance Method Details
#benchmark_bundles(options = {}) ⇒ Object
66 67 68 |
# File 'lib/monkey_business.rb', line 66 def benchmark_bundles( = {}) BenchmarkBundles.new(self, ) end |
#collectors(options = {}) ⇒ Object
58 59 60 |
# File 'lib/monkey_business.rb', line 58 def collectors( = {}) Collectors.new(self, ) end |
#contact_fields(options = {}) ⇒ Object
54 55 56 |
# File 'lib/monkey_business.rb', line 54 def contact_fields( = {}) ContactFields.new(self, ) end |
#contact_lists(options = {}) ⇒ Object
46 47 48 |
# File 'lib/monkey_business.rb', line 46 def contact_lists( = {}) ContactLists.new(self, ) end |
#contacts(options = {}) ⇒ Object
50 51 52 |
# File 'lib/monkey_business.rb', line 50 def contacts( = {}) Contacts.new(self, ) end |
#errors(options = {}) ⇒ Object
70 71 72 |
# File 'lib/monkey_business.rb', line 70 def errors( = {}) Errors.new(self, ) end |
#groups(options = {}) ⇒ Object
42 43 44 |
# File 'lib/monkey_business.rb', line 42 def groups( = {}) Groups.new(self, ) end |
#request(resource_path, options = {}) ⇒ Object
74 75 76 77 78 79 80 |
# File 'lib/monkey_business.rb', line 74 def request(resource_path, = {}) HttpRequest.request( @access_token, BASE_URI + resource_path, ) end |
#survey_categories(options = {}) ⇒ Object
30 31 32 |
# File 'lib/monkey_business.rb', line 30 def survey_categories( = {}) SurveyCategories.new(self, ) end |
#survey_templates(options = {}) ⇒ Object
34 35 36 |
# File 'lib/monkey_business.rb', line 34 def survey_templates( = {}) SurveyTemplates.new(self, ) end |
#surveys(options = {}) ⇒ Object
26 27 28 |
# File 'lib/monkey_business.rb', line 26 def surveys( = {}) Surveys.new(self, ) end |