Module: Surveygizmo::Client::Survey

Included in:
Surveygizmo::Client
Defined in:
lib/surveygizmo/client/survey.rb

Overview

Defines methods related to a SurveyGizmo survey Polls, Quizzes, Forms, Registrations are all surveys with simple flags activated to change the behavior of the object

Instance Method Summary collapse

Instance Method Details

#polls(options = {}) ⇒ Object

List all polls, optionally filtered



16
17
18
19
20
# File 'lib/surveygizmo/client/survey.rb', line 16

def polls(options = {})
  options[:filter] ||= []
  options[:filter] <<  { :field => 'subtype', :operator => '=', :value => 'Poll' }
  surveys(options)
end

#survey(id, metaonly = false) ⇒ Object

Returns survey details for a given id



25
26
27
# File 'lib/surveygizmo/client/survey.rb', line 25

def survey(id, metaonly = false)
  get("survey/#{id}", :metaonly => metaonly)
end

#surveys(options = {}) ⇒ Object

List all surveys, optionally filtered



10
11
12
# File 'lib/surveygizmo/client/survey.rb', line 10

def surveys(options = {})
  get('survey', options)
end