Class: MonkeyBusiness::API

Inherits:
Object
  • Object
show all
Defined in:
lib/monkey_business.rb

Overview

This is the class the end-user should be interacting with.

Instance Method Summary collapse

Constructor Details

#initializeAPI

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(options = {})
  BenchmarkBundles.new(self, options)
end

#collectors(options = {}) ⇒ Object



58
59
60
# File 'lib/monkey_business.rb', line 58

def collectors(options = {})
  Collectors.new(self, options)
end

#contact_fields(options = {}) ⇒ Object



54
55
56
# File 'lib/monkey_business.rb', line 54

def contact_fields(options = {})
  ContactFields.new(self, options)
end

#contact_lists(options = {}) ⇒ Object



46
47
48
# File 'lib/monkey_business.rb', line 46

def contact_lists(options = {})
  ContactLists.new(self, options)
end

#contacts(options = {}) ⇒ Object



50
51
52
# File 'lib/monkey_business.rb', line 50

def contacts(options = {})
  Contacts.new(self, options)
end

#errors(options = {}) ⇒ Object



70
71
72
# File 'lib/monkey_business.rb', line 70

def errors(options = {})
  Errors.new(self, options)
end

#groups(options = {}) ⇒ Object



42
43
44
# File 'lib/monkey_business.rb', line 42

def groups(options = {})
  Groups.new(self, options)
end

#request(resource_path, options = {}) ⇒ Object



74
75
76
77
78
79
80
# File 'lib/monkey_business.rb', line 74

def request(resource_path, options = {})
  HttpRequest.request(
    @access_token,
    BASE_URI + resource_path,
    options
  )
end

#survey_categories(options = {}) ⇒ Object



30
31
32
# File 'lib/monkey_business.rb', line 30

def survey_categories(options = {})
  SurveyCategories.new(self, options)
end

#survey_templates(options = {}) ⇒ Object



34
35
36
# File 'lib/monkey_business.rb', line 34

def survey_templates(options = {})
  SurveyTemplates.new(self, options)
end

#surveys(options = {}) ⇒ Object



26
27
28
# File 'lib/monkey_business.rb', line 26

def surveys(options = {})
  Surveys.new(self, options)
end

#users(options = {}) ⇒ Object



38
39
40
# File 'lib/monkey_business.rb', line 38

def users(options = {})
  Users.new(self, options)
end

#webhooks(options = {}) ⇒ Object



62
63
64
# File 'lib/monkey_business.rb', line 62

def webhooks(options = {})
  Webhooks.new(self, options)
end