Class: MonkeyBusiness::Surveys

Inherits:
ApiResource show all
Defined in:
lib/api/surveys.rb

Overview

Abstraction of the Surveymonkey survey resource and associated methods

Instance Attribute Summary

Attributes inherited from ApiResource

#path

Instance Method Summary collapse

Methods inherited from ApiResource

#initialize, #request

Constructor Details

This class inherits a constructor from MonkeyBusiness::ApiResource

Instance Method Details

#collectors(options = {}) ⇒ Object



23
24
25
26
# File 'lib/api/surveys.rb', line 23

def collectors(options = {})
  fail_without_id
  Collectors.new(@api, @options.merge(options), @path)
end

#details(options = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/api/surveys.rb', line 11

def details(options = {})
  fail_without_id
  @options.merge!(options)
  @path += '/details'
  self
end

#pages(options = {}) ⇒ Object



28
29
30
31
# File 'lib/api/surveys.rb', line 28

def pages(options = {})
  fail_without_id
  Pages.new(@api, @options.merge(options), @path)
end

#responses(options = {}) ⇒ Object



18
19
20
21
# File 'lib/api/surveys.rb', line 18

def responses(options = {})
  fail_without_id
  Responses.new(@api, @options.merge(options), @path)
end