surveygizmo 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
 - data/.rspec +1 -0
 - data/Rakefile +7 -1
 - data/lib/surveygizmo/client.rb +10 -2
 - data/lib/surveygizmo/client/contact.rb +3 -3
 - data/lib/surveygizmo/client/filter.rb +1 -1
 - data/lib/surveygizmo/client/survey.rb +4 -4
 - data/lib/surveygizmo/client/survey_question.rb +25 -0
 - data/lib/surveygizmo/client/survey_response.rb +3 -3
 - data/lib/surveygizmo/client/survey_statistic.rb +24 -0
 - data/lib/surveygizmo/configurable.rb +27 -0
 - data/lib/surveygizmo/configuration.rb +1 -1
 - data/lib/surveygizmo/connection.rb +10 -3
 - data/lib/surveygizmo/request.rb +0 -10
 - data/lib/surveygizmo/version.rb +1 -1
 - data/readme.textile +12 -12
 - data/spec/fixtures/account.json +1 -0
 - data/spec/fixtures/account_user.json +1 -0
 - data/spec/fixtures/account_users.json +1 -0
 - data/spec/fixtures/contact.json +1 -0
 - data/spec/fixtures/contacts.json +1 -0
 - data/spec/fixtures/create_account_user.json +1 -0
 - data/spec/fixtures/delete_account_user.json +1 -0
 - data/spec/fixtures/survey.json +1 -0
 - data/spec/fixtures/survey_campaign.json +1 -0
 - data/spec/fixtures/survey_campaigns.json +1 -0
 - data/spec/fixtures/survey_question.json +33 -0
 - data/spec/fixtures/survey_questions.json +195 -0
 - data/spec/fixtures/survey_response.json +1 -0
 - data/spec/fixtures/survey_responses.json +1 -0
 - data/spec/fixtures/survey_statistic.json +7 -0
 - data/spec/fixtures/survey_statistics.json +92 -0
 - data/spec/fixtures/surveys.json +1 -0
 - data/spec/fixtures/update_account_user.json +1 -0
 - data/spec/helper.rb +51 -0
 - data/spec/surveygizmo/client/account_spec.rb +19 -0
 - data/spec/surveygizmo/client/account_user_spec.rb +83 -0
 - data/spec/surveygizmo/client/contact_spec.rb +31 -0
 - data/spec/surveygizmo/client/filter_spec.rb +22 -0
 - data/spec/surveygizmo/client/survey_campaign_spec.rb +31 -0
 - data/spec/surveygizmo/client/survey_question_spec.rb +31 -0
 - data/spec/surveygizmo/client/survey_response_spec.rb +31 -0
 - data/spec/surveygizmo/client/survey_spec.rb +45 -0
 - data/spec/surveygizmo/client_spec.rb +67 -0
 - data/spec/surveygizmo/survey_statistic_spec.rb +31 -0
 - data/spec/surveygizmo_spec.rb +34 -0
 - data/surveygizmo.gemspec +7 -2
 - metadata +154 -10
 
    
        data/.gitignore
    CHANGED
    
    
    
        data/.rspec
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --color
         
     | 
    
        data/Rakefile
    CHANGED
    
    
    
        data/lib/surveygizmo/client.rb
    CHANGED
    
    | 
         @@ -1,3 +1,5 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'surveygizmo/configurable'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
       1 
3 
     | 
    
         
             
            module Surveygizmo
         
     | 
| 
       2 
4 
     | 
    
         
             
              # Wrapper for the Surveygizmo REST API
         
     | 
| 
       3 
5 
     | 
    
         
             
              #
         
     | 
| 
         @@ -9,19 +11,25 @@ module Surveygizmo 
     | 
|
| 
       9 
11 
     | 
    
         
             
                # Client-namespaced.
         
     | 
| 
       10 
12 
     | 
    
         
             
                require 'surveygizmo/client/account'
         
     | 
| 
       11 
13 
     | 
    
         
             
                require 'surveygizmo/client/account_user'
         
     | 
| 
      
 14 
     | 
    
         
            +
                require 'surveygizmo/client/contact'
         
     | 
| 
       12 
15 
     | 
    
         
             
                require 'surveygizmo/client/filter'
         
     | 
| 
       13 
16 
     | 
    
         
             
                require 'surveygizmo/client/survey'
         
     | 
| 
       14 
17 
     | 
    
         
             
                require 'surveygizmo/client/survey_campaign'
         
     | 
| 
       15 
18 
     | 
    
         
             
                require 'surveygizmo/client/survey_response'
         
     | 
| 
      
 19 
     | 
    
         
            +
                require 'surveygizmo/client/survey_question'
         
     | 
| 
      
 20 
     | 
    
         
            +
                require 'surveygizmo/client/survey_statistic'
         
     | 
| 
       16 
21 
     | 
    
         | 
| 
       17 
22 
     | 
    
         
             
                alias :api_endpoint :endpoint
         
     | 
| 
       18 
23 
     | 
    
         | 
| 
      
 24 
     | 
    
         
            +
                include Surveygizmo::Configurable
         
     | 
| 
       19 
25 
     | 
    
         
             
                include Surveygizmo::Client::Account
         
     | 
| 
       20 
26 
     | 
    
         
             
                include Surveygizmo::Client::AccountUser
         
     | 
| 
      
 27 
     | 
    
         
            +
                include Surveygizmo::Client::Contact
         
     | 
| 
       21 
28 
     | 
    
         
             
                include Surveygizmo::Client::Filter
         
     | 
| 
       22 
29 
     | 
    
         
             
                include Surveygizmo::Client::Survey
         
     | 
| 
       23 
30 
     | 
    
         
             
                include Surveygizmo::Client::SurveyCampaign
         
     | 
| 
       24 
31 
     | 
    
         
             
                include Surveygizmo::Client::SurveyResponse
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
      
 32 
     | 
    
         
            +
                include Surveygizmo::Client::SurveyQuestion
         
     | 
| 
      
 33 
     | 
    
         
            +
                include Surveygizmo::Client::SurveyStatistic
         
     | 
| 
       26 
34 
     | 
    
         
             
              end
         
     | 
| 
       27 
     | 
    
         
            -
            end
         
     | 
| 
      
 35 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -8,7 +8,7 @@ module Surveygizmo 
     | 
|
| 
       8 
8 
     | 
    
         
             
                  # @param survey_id [Integer, String] Specify the survey
         
     | 
| 
       9 
9 
     | 
    
         
             
                  # @param survey_campaign_id [Integer, String] Specify the campaign
         
     | 
| 
       10 
10 
     | 
    
         
             
                  def contacts(survey_id, survey_campaign_id)
         
     | 
| 
       11 
     | 
    
         
            -
                    get("survey/#{survey_id}/surveycampaign")
         
     | 
| 
      
 11 
     | 
    
         
            +
                    get("survey/#{survey_id}/surveycampaign/#{survey_campaign_id}/contact")
         
     | 
| 
       12 
12 
     | 
    
         
             
                  end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                  # Returns contact details for a given id
         
     | 
| 
         @@ -16,11 +16,11 @@ module Surveygizmo 
     | 
|
| 
       16 
16 
     | 
    
         
             
                  # @param survey_campaign_id [Integer, String] Specify the campaign
         
     | 
| 
       17 
17 
     | 
    
         
             
                  # @param id [Integer, String] Specify the user
         
     | 
| 
       18 
18 
     | 
    
         
             
                  def contact(survey_id, survey_campaign_id, id)
         
     | 
| 
       19 
     | 
    
         
            -
                    get("survey/#{survey_id}/surveycampaign/#{id}")
         
     | 
| 
      
 19 
     | 
    
         
            +
                    get("survey/#{survey_id}/surveycampaign/#{survey_campaign_id}/contact/#{id}")
         
     | 
| 
       20 
20 
     | 
    
         
             
                  end
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                  # TODO: Create, Update, Delete
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
                end
         
     | 
| 
       25 
25 
     | 
    
         
             
              end
         
     | 
| 
       26 
     | 
    
         
            -
            end
         
     | 
| 
      
 26 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -8,7 +8,7 @@ module Surveygizmo 
     | 
|
| 
       8 
8 
     | 
    
         
             
                  # TODO: Not yet recursive
         
     | 
| 
       9 
9 
     | 
    
         
             
                  # @param filters [Hash] Filter(s) used to refine search
         
     | 
| 
       10 
10 
     | 
    
         
             
                  def formatted_filters(filters = {})
         
     | 
| 
       11 
     | 
    
         
            -
                    Hash[*filters.map{|key,value| ["filter[#{key}]", value]}.flatten]
         
     | 
| 
      
 11 
     | 
    
         
            +
                    Hash[*filters.map{|key,value| ["filter[#{key}][0]", value]}.flatten]
         
     | 
| 
       12 
12 
     | 
    
         
             
                  end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                end
         
     | 
| 
         @@ -6,9 +6,9 @@ module Surveygizmo 
     | 
|
| 
       6 
6 
     | 
    
         
             
                module Survey
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                  # List all surveys, optionally filtered
         
     | 
| 
       9 
     | 
    
         
            -
                  # @param  
     | 
| 
       10 
     | 
    
         
            -
                  def surveys( 
     | 
| 
       11 
     | 
    
         
            -
                    get('survey',  
     | 
| 
      
 9 
     | 
    
         
            +
                  # @param options [Hash] Option(s) used to refine search
         
     | 
| 
      
 10 
     | 
    
         
            +
                  def surveys(options = {})
         
     | 
| 
      
 11 
     | 
    
         
            +
                    get('survey', options)
         
     | 
| 
       12 
12 
     | 
    
         
             
                  end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                  # Temporary, until SG implements filtering by subtype
         
     | 
| 
         @@ -27,4 +27,4 @@ module Surveygizmo 
     | 
|
| 
       27 
27 
     | 
    
         | 
| 
       28 
28 
     | 
    
         
             
                end
         
     | 
| 
       29 
29 
     | 
    
         
             
              end
         
     | 
| 
       30 
     | 
    
         
            -
            end
         
     | 
| 
      
 30 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,25 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            module Surveygizmo
         
     | 
| 
      
 3 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 4 
     | 
    
         
            +
                # Defines methods related to a SurveyGizmo survey question
         
     | 
| 
      
 5 
     | 
    
         
            +
                # @see http://developer.surveygizmo.com/rest-api-documentation/objects/surveyquestion/
         
     | 
| 
      
 6 
     | 
    
         
            +
                module SurveyQuestion
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                  # List all survey questions for a given survey
         
     | 
| 
      
 9 
     | 
    
         
            +
                  # @param survey_id [Integer, String] Specify the survey to the questions to get
         
     | 
| 
      
 10 
     | 
    
         
            +
                  def survey_questions(survey_id, options = {})
         
     | 
| 
      
 11 
     | 
    
         
            +
                    get("survey/#{survey_id}/surveyquestion", options)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                  # Returns survey question details for a given id
         
     | 
| 
      
 15 
     | 
    
         
            +
                  # @param survey_id [Integer, String] Specify the survey to the question to get
         
     | 
| 
      
 16 
     | 
    
         
            +
                  # @param id [Integer, String] Specify the question to get
         
     | 
| 
      
 17 
     | 
    
         
            +
                  def survey_question(survey_id, id)
         
     | 
| 
      
 18 
     | 
    
         
            +
                    get("survey/#{survey_id}/surveyquestion/#{id}")
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  # TODO: Create, Update, Delete
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
              end
         
     | 
| 
      
 25 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -6,8 +6,8 @@ module Surveygizmo 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
                  # List all survey responses for a given survey
         
     | 
| 
       8 
8 
     | 
    
         
             
                  # @param survey_id [Integer, String] Specify the survey to the responses to get
         
     | 
| 
       9 
     | 
    
         
            -
                  def survey_responses(survey_id)
         
     | 
| 
       10 
     | 
    
         
            -
                    get("survey/#{survey_id}/surveyresponse")
         
     | 
| 
      
 9 
     | 
    
         
            +
                  def survey_responses(survey_id, options = {})
         
     | 
| 
      
 10 
     | 
    
         
            +
                    get("survey/#{survey_id}/surveyresponse", options)
         
     | 
| 
       11 
11 
     | 
    
         
             
                  end
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                  # Returns survey response details for a given id
         
     | 
| 
         @@ -21,4 +21,4 @@ module Surveygizmo 
     | 
|
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                end
         
     | 
| 
       23 
23 
     | 
    
         
             
              end
         
     | 
| 
       24 
     | 
    
         
            -
            end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,24 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Surveygizmo
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 3 
     | 
    
         
            +
                # Defines methods related to a SurveyGizmo survey statistic
         
     | 
| 
      
 4 
     | 
    
         
            +
                # @see http://developer.surveygizmo.com/rest-api-documentation/objects/surveystatistic/
         
     | 
| 
      
 5 
     | 
    
         
            +
                module SurveyStatistic
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                  # List all survey statistics for a given survey
         
     | 
| 
      
 8 
     | 
    
         
            +
                  # @param survey_id [Integer, String] Specify the survey to the responses to get
         
     | 
| 
      
 9 
     | 
    
         
            +
                  def survey_statistics(survey_id, options = {})
         
     | 
| 
      
 10 
     | 
    
         
            +
                    get("survey/#{survey_id}/surveystatistic", options)
         
     | 
| 
      
 11 
     | 
    
         
            +
                  end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  # Returns survey statstic details for a given id
         
     | 
| 
      
 14 
     | 
    
         
            +
                  # @param survey_id [Integer, String] Specify the survey to the response to get
         
     | 
| 
      
 15 
     | 
    
         
            +
                  # @param id [Integer, String] Specify the response to get
         
     | 
| 
      
 16 
     | 
    
         
            +
                  def survey_statistic(survey_id, id)
         
     | 
| 
      
 17 
     | 
    
         
            +
                    get("survey/#{survey_id}/surveystatistic/#{id}")
         
     | 
| 
      
 18 
     | 
    
         
            +
                  end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                  # TODO: Create, Update, Delete
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,27 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Surveygizmo
         
     | 
| 
      
 2 
     | 
    
         
            +
              module Configurable
         
     | 
| 
      
 3 
     | 
    
         
            +
                class << self
         
     | 
| 
      
 4 
     | 
    
         
            +
                  def keys
         
     | 
| 
      
 5 
     | 
    
         
            +
                    @keys ||= [
         
     | 
| 
      
 6 
     | 
    
         
            +
                      :username,
         
     | 
| 
      
 7 
     | 
    
         
            +
                      :password
         
     | 
| 
      
 8 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 9 
     | 
    
         
            +
                  end
         
     | 
| 
      
 10 
     | 
    
         
            +
                end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                # @return [Boolean]
         
     | 
| 
      
 13 
     | 
    
         
            +
                def credentials?
         
     | 
| 
      
 14 
     | 
    
         
            +
                  credentials.values.all?
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                private
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                # @return [Hash]
         
     | 
| 
      
 20 
     | 
    
         
            +
                def credentials
         
     | 
| 
      
 21 
     | 
    
         
            +
                  {
         
     | 
| 
      
 22 
     | 
    
         
            +
                    :username => @username,
         
     | 
| 
      
 23 
     | 
    
         
            +
                    :password => @password
         
     | 
| 
      
 24 
     | 
    
         
            +
                  }
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
              end
         
     | 
| 
      
 27 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -18,7 +18,7 @@ module Surveygizmo 
     | 
|
| 
       18 
18 
     | 
    
         
             
                DEFAULT_PASSWORD = nil
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                # The endpoint that will be used to connect if none is set
         
     | 
| 
       21 
     | 
    
         
            -
                DEFAULT_ENDPOINT = 'https://restapi.surveygizmo.com/ 
     | 
| 
      
 21 
     | 
    
         
            +
                DEFAULT_ENDPOINT = 'https://restapi.surveygizmo.com/v2/'.freeze
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
                # The value sent in the 'User-Agent' header if none is set
         
     | 
| 
       24 
24 
     | 
    
         
             
                DEFAULT_USER_AGENT = "Surveygizmo Ruby Gem #{Surveygizmo::VERSION}".freeze
         
     | 
| 
         @@ -10,10 +10,14 @@ module Surveygizmo 
     | 
|
| 
       10 
10 
     | 
    
         
             
                  def connection(temp_api_endpoint=nil)
         
     | 
| 
       11 
11 
     | 
    
         
             
                    options = {
         
     | 
| 
       12 
12 
     | 
    
         
             
                      :headers => { 'Accept' => 'application/json', 'User-Agent' => user_agent },
         
     | 
| 
       13 
     | 
    
         
            -
                      :ssl => { :verify => false } 
     | 
| 
       14 
     | 
    
         
            -
                      :params => { :'user:md5' => "#{username}:#{Digest::MD5.hexdigest(password)}" }
         
     | 
| 
      
 13 
     | 
    
         
            +
                      :ssl => { :verify => false }
         
     | 
| 
       15 
14 
     | 
    
         
             
                    }
         
     | 
| 
       16 
15 
     | 
    
         | 
| 
      
 16 
     | 
    
         
            +
                    if credentials?
         
     | 
| 
      
 17 
     | 
    
         
            +
                      authentication = auth_query_hash
         
     | 
| 
      
 18 
     | 
    
         
            +
                      options[:params] = authentication
         
     | 
| 
      
 19 
     | 
    
         
            +
                    end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
       17 
21 
     | 
    
         
             
                    options[:url] = temp_api_endpoint ? temp_api_endpoint : api_endpoint
         
     | 
| 
       18 
22 
     | 
    
         | 
| 
       19 
23 
     | 
    
         
             
                    Faraday.new(options) do |builder|
         
     | 
| 
         @@ -23,6 +27,9 @@ module Surveygizmo 
     | 
|
| 
       23 
27 
     | 
    
         
             
                      builder.adapter(:net_http)
         
     | 
| 
       24 
28 
     | 
    
         
             
                    end
         
     | 
| 
       25 
29 
     | 
    
         
             
                  end
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                  def auth_query_hash
         
     | 
| 
      
 32 
     | 
    
         
            +
                    { :'user:md5' => "#{username}:#{Digest::MD5.hexdigest(password)}" }
         
     | 
| 
      
 33 
     | 
    
         
            +
                  end
         
     | 
| 
       27 
34 
     | 
    
         
             
              end
         
     | 
| 
       28 
35 
     | 
    
         
             
            end
         
     | 
    
        data/lib/surveygizmo/request.rb
    CHANGED
    
    | 
         @@ -11,16 +11,6 @@ module Surveygizmo 
     | 
|
| 
       11 
11 
     | 
    
         
             
                  request(:post, path, options, temp_api_endpoint)
         
     | 
| 
       12 
12 
     | 
    
         
             
                end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
                # Perform an HTTP PUT request
         
     | 
| 
       15 
     | 
    
         
            -
                def put(path, options={})
         
     | 
| 
       16 
     | 
    
         
            -
                  request(:put, path, options)
         
     | 
| 
       17 
     | 
    
         
            -
                end
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                # Perform an HTTP DELETE request
         
     | 
| 
       20 
     | 
    
         
            -
                def delete(path, options={})
         
     | 
| 
       21 
     | 
    
         
            -
                  request(:delete, path, options)
         
     | 
| 
       22 
     | 
    
         
            -
                end
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
14 
     | 
    
         
             
                private
         
     | 
| 
       25 
15 
     | 
    
         | 
| 
       26 
16 
     | 
    
         
             
                  # Perform an HTTP request
         
     | 
    
        data/lib/surveygizmo/version.rb
    CHANGED
    
    
    
        data/readme.textile
    CHANGED
    
    | 
         @@ -6,19 +6,21 @@ h2. Installation 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            @gem install surveygizmo@
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
            h2. Documentation
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            http://rdoc.info/github/ample/surveygizmo
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
9 
     | 
    
         
             
            h2. Usage
         
     | 
| 
       14 
10 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            # Configure your Surveygizmo client
         
     | 
| 
      
 11 
     | 
    
         
            +
            bc. # Configure your Surveygizmo client
         
     | 
| 
       17 
12 
     | 
    
         
             
            Surveygizmo.configure do |config|
         
     | 
| 
       18 
13 
     | 
    
         
             
              config.username = YOUR_USERNAME
         
     | 
| 
       19 
14 
     | 
    
         
             
              config.password = YOUR_PASSWORD
         
     | 
| 
       20 
15 
     | 
    
         
             
            end
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            bc. # Return a list of all Surveys
         
     | 
| 
      
 18 
     | 
    
         
            +
            Surveygizmo.surveys
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            bc. # Return a specific Survey
         
     | 
| 
      
 21 
     | 
    
         
            +
            Surveygizmo.survey(id)
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            See the "Documentation":http://rdoc.info/github/ample/surveygizmo for the full list
         
     | 
| 
       22 
24 
     | 
    
         | 
| 
       23 
25 
     | 
    
         
             
            h2. To Do List
         
     | 
| 
       24 
26 
     | 
    
         | 
| 
         @@ -57,17 +59,15 @@ This gem is very young, and not all endpoints have been implemented. Here's a br 
     | 
|
| 
       57 
59 
     | 
    
         
             
            ** _Update_
         
     | 
| 
       58 
60 
     | 
    
         
             
            ** _Delete_
         
     | 
| 
       59 
61 
     | 
    
         
             
            * _Survey Option_
         
     | 
| 
       60 
     | 
    
         
            -
            *  
     | 
| 
      
 62 
     | 
    
         
            +
            * Survey Question
         
     | 
| 
       61 
63 
     | 
    
         
             
            * _Survey Page_
         
     | 
| 
       62 
     | 
    
         
            -
            *  
     | 
| 
      
 64 
     | 
    
         
            +
            * Survey Statistics
         
     | 
| 
       63 
65 
     | 
    
         
             
            * _Email Message_
         
     | 
| 
       64 
66 
     | 
    
         | 
| 
       65 
     | 
    
         
            -
            Also, there aren't any tests yet. This is high on the priority list and should be coming soon.
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
67 
     | 
    
         
             
            h2. Thanks
         
     | 
| 
       68 
68 
     | 
    
         | 
| 
       69 
69 
     | 
    
         
             
            This gem is heavily inspired by the Twitter gem and John Nunemaker's hard work.
         
     | 
| 
       70 
70 
     | 
    
         | 
| 
       71 
71 
     | 
    
         
             
            h2. Copyright
         
     | 
| 
       72 
72 
     | 
    
         | 
| 
       73 
     | 
    
         
            -
            Copyright (c) 2011 Bobby Uhlenbrock. See LICENSE for details.
         
     | 
| 
      
 73 
     | 
    
         
            +
            Copyright (c) 2011-2012 Bobby Uhlenbrock. See LICENSE for details.
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"data":{"id":57382,"organization":"Surveygizmo","contact_phone":"2065555455","reseller":false,"resellers_customer_id":null,"reseller_uuid":null,"datecreated":"2011-10-05T15:26:36-04:00","login_link":"https:\/\/appv3.sgizmo.com\/login\/v1?authenticate=20743223994f21c0cc96c9e2de0455d2c545c470&account_user_id=2894&signature=abcdef"}}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"data":{"id":"183437","_type":"AccountUser","username":"Jon","email":"jon@somewhere.com","status":"Active","last_login":"2012-07-05 18:24:02"}}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"total_count":"2","page":1,"total_pages":1,"results_per_page":2,"data":[{"id":"183437","_type":"AccountUser","username":"Jon ","email":"jon@somewhere.com","status":"Active","last_login":"2012-07-05 18:24:02"},{"id":"183440","_type":"AccountUser","username":"Jill","email":"jill@somewhere.org","status":"Active","last_login":"2012-08-21 14:04:47"}]}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"data":{"id":"1","semailaddress":"allan@gmail.com","sfirstname":"Allan ","slastname":"Something","sorganization":"","sdepartment":"","shomephone":"","sfaxphone":"","sbusinessphone":"","smailingaddress":"","smailingaddress2":"","smailingaddresscity":"","smailingaddressstate":"","smailingaddresscountry":"","smailingaddresspostal":"","stitle":"","surl":"","scustomfield1":"","scustomfield2":"","scustomfield3":"","scustomfield4":"","scustomfield5":"","scustomfield6":"","scustomfield7":"","scustomfield8":"","scustomfield9":"","scustomfield10":"","estatus":"Active","esubscriberstatus":"Sent"}}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"total_count":"1","page":1,"total_pages":1,"results_per_page":50,"data":[{"id":"1","semailaddress":"allen@somewhere.com","sfirstname":"Allan ","slastname":"Something","sorganization":"","sdepartment":"","shomephone":"","sfaxphone":"","sbusinessphone":"","smailingaddress":"","smailingaddress2":"","smailingaddresscity":"","smailingaddressstate":"","smailingaddresscountry":"","smailingaddresspostal":"","stitle":"","surl":"","scustomfield1":"","scustomfield2":"","scustomfield3":"","scustomfield4":"","scustomfield5":"","scustomfield6":"","scustomfield7":"","scustomfield8":"","scustomfield9":"","scustomfield10":"","estatus":"Active","esubscriberstatus":"Sent"}]}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"data":{"id":"183438","_type":"AccountUser","username":"Jamie","email":"jamie@somewhere.com","status":"Active","last_login":"2012-07-05 18:24:02"}}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"data":{"id":"183438","_type":"AccountUser","username":"Jamie","email":"jamie@somewhere.com","status":"Active","last_login":"2012-07-05 18:24:02"}}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"data":{"id":"1018301","team":"463634","_type":"Survey","_subtype":"Standard Survey","status":"In Design","created_on":"2012-09-03 22:56:20","modified_on":"2012-09-03 22:56:21","forward_only":false,"languages":["English"],"title":"Movie Rating","internal_title":"Movie Rating","title_ml":{"English":"Movie Rating"},"theme":"11147","blockby":null,"statistics":null,"links":{"edit":"https:\/\/appv3.sgizmo.com\/login\/v1?authenticate=42cca89759ab50342a9694fc4cb59181d3e6141f&account_user_id=231934&r=%2Fprojects%2Feditor%3Fid%3D1018301&signature=ee3517","publish":"https:\/\/appv3.sgizmo.com\/login\/v1?authenticate=42cca89759ab50342a9694fc4cb59181d3e6141f&account_user_id=231934&r=%2Fdistribute%2Fpromote%3Fid%3D1018301&signature=274901"},"pages":[{"id":1,"_type":"SurveyPage","title":{"English":"Page One"},"properties":{"hidden":false},"description":[],"questions":[]},{"id":2,"_type":"SurveyPage","title":{"English":"Thank You!"},"properties":{"hidden":false},"description":[],"questions":[{"id":1,"_type":"SurveyDecorative","_subtype":"instructions","title":{"English":"Thank you for taking our survey. Your response is very important to us."},"shortname":null,"varname":null,"description":[],"has_showhide_deps":null,"properties":{"hidden":false,"map_key":"instructions"},"options":[],"sub_question_skus":null}]}]}}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"data":{"id":"673550","_type":"SurveyCampaign","_subtype":"link","__subtype":"standard","status":"Active","name":"Default Link","uri":"www.surveygizmo.com\/s3\/1018301\/Movie-Rating","SSL":"False","tokenvariables":null,"limit_responses":null,"close_message":null,"language":"Auto","datecreated":"2012-09-03 23:39:26","datemodified":"2012-09-03 23:39:26"}}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"result_ok":true,"total_count":"1","page":1,"total_pages":1,"results_per_page":50,"data":[{"id":"673550","_type":"SurveyCampaign","_subtype":"link","__subtype":"standard","status":"Active","name":"Default Link","uri":"www.surveygizmo.com\/s3\/1018301\/Movie-Rating","SSL":"False","tokenvariables":null,"limit_responses":null,"close_message":null,"language":"Auto","datecreated":"2012-09-03 23:39:26","datemodified":"2012-09-03 23:39:26"}]}
         
     | 
| 
         @@ -0,0 +1,33 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {
         
     | 
| 
      
 2 
     | 
    
         
            +
              "result_ok" : true,
         
     | 
| 
      
 3 
     | 
    
         
            +
              "data" :
         
     | 
| 
      
 4 
     | 
    
         
            +
                { "_subtype" : "instructions",
         
     | 
| 
      
 5 
     | 
    
         
            +
                  "_type" : "SurveyDecorative",
         
     | 
| 
      
 6 
     | 
    
         
            +
                  "description" : [  ],
         
     | 
| 
      
 7 
     | 
    
         
            +
                  "has_showhide_deps" : null,
         
     | 
| 
      
 8 
     | 
    
         
            +
                  "id" : 3,
         
     | 
| 
      
 9 
     | 
    
         
            +
                  "options" : [  ],
         
     | 
| 
      
 10 
     | 
    
         
            +
                  "properties" : { "break_after" : false,
         
     | 
| 
      
 11 
     | 
    
         
            +
                      "custom_css" : "",
         
     | 
| 
      
 12 
     | 
    
         
            +
                      "disabled" : false,
         
     | 
| 
      
 13 
     | 
    
         
            +
                      "hidden" : false,
         
     | 
| 
      
 14 
     | 
    
         
            +
                      "hide_after_response" : false,
         
     | 
| 
      
 15 
     | 
    
         
            +
                      "labels_right" : false,
         
     | 
| 
      
 16 
     | 
    
         
            +
                      "map_key" : "instructions",
         
     | 
| 
      
 17 
     | 
    
         
            +
                      "messages" : { "inputmask" : [  ],
         
     | 
| 
      
 18 
     | 
    
         
            +
                          "l_extreme_label" : [  ],
         
     | 
| 
      
 19 
     | 
    
         
            +
                          "left_label" : [  ],
         
     | 
| 
      
 20 
     | 
    
         
            +
                          "r_extreme_label" : [  ],
         
     | 
| 
      
 21 
     | 
    
         
            +
                          "right_label" : [  ]
         
     | 
| 
      
 22 
     | 
    
         
            +
                        },
         
     | 
| 
      
 23 
     | 
    
         
            +
                      "question_description_above" : false,
         
     | 
| 
      
 24 
     | 
    
         
            +
                      "required" : false,
         
     | 
| 
      
 25 
     | 
    
         
            +
                      "show_title" : false,
         
     | 
| 
      
 26 
     | 
    
         
            +
                      "soft-required" : false
         
     | 
| 
      
 27 
     | 
    
         
            +
                    },
         
     | 
| 
      
 28 
     | 
    
         
            +
                  "shortname" : null,
         
     | 
| 
      
 29 
     | 
    
         
            +
                  "sub_question_skus" : null,
         
     | 
| 
      
 30 
     | 
    
         
            +
                  "title" : { "English" : "Survey Title" },
         
     | 
| 
      
 31 
     | 
    
         
            +
                  "varname" : null
         
     | 
| 
      
 32 
     | 
    
         
            +
                }
         
     | 
| 
      
 33 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,195 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {
         
     | 
| 
      
 2 
     | 
    
         
            +
              "result_ok" : true,
         
     | 
| 
      
 3 
     | 
    
         
            +
              "page" : 1,
         
     | 
| 
      
 4 
     | 
    
         
            +
              "results_per_page" : 4,
         
     | 
| 
      
 5 
     | 
    
         
            +
              "total_count" : 400,
         
     | 
| 
      
 6 
     | 
    
         
            +
              "total_pages" : 100,
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              "data" : [
         
     | 
| 
      
 9 
     | 
    
         
            +
                { "_subtype" : "instructions",
         
     | 
| 
      
 10 
     | 
    
         
            +
                  "_type" : "SurveyDecorative",
         
     | 
| 
      
 11 
     | 
    
         
            +
                  "description" : [  ],
         
     | 
| 
      
 12 
     | 
    
         
            +
                  "has_showhide_deps" : null,
         
     | 
| 
      
 13 
     | 
    
         
            +
                  "id" : 3,
         
     | 
| 
      
 14 
     | 
    
         
            +
                  "options" : [  ],
         
     | 
| 
      
 15 
     | 
    
         
            +
                  "properties" : { "break_after" : false,
         
     | 
| 
      
 16 
     | 
    
         
            +
                      "custom_css" : "",
         
     | 
| 
      
 17 
     | 
    
         
            +
                      "disabled" : false,
         
     | 
| 
      
 18 
     | 
    
         
            +
                      "hidden" : false,
         
     | 
| 
      
 19 
     | 
    
         
            +
                      "hide_after_response" : false,
         
     | 
| 
      
 20 
     | 
    
         
            +
                      "labels_right" : false,
         
     | 
| 
      
 21 
     | 
    
         
            +
                      "map_key" : "instructions",
         
     | 
| 
      
 22 
     | 
    
         
            +
                      "messages" : { "inputmask" : [  ],
         
     | 
| 
      
 23 
     | 
    
         
            +
                          "l_extreme_label" : [  ],
         
     | 
| 
      
 24 
     | 
    
         
            +
                          "left_label" : [  ],
         
     | 
| 
      
 25 
     | 
    
         
            +
                          "r_extreme_label" : [  ],
         
     | 
| 
      
 26 
     | 
    
         
            +
                          "right_label" : [  ]
         
     | 
| 
      
 27 
     | 
    
         
            +
                        },
         
     | 
| 
      
 28 
     | 
    
         
            +
                      "question_description_above" : false,
         
     | 
| 
      
 29 
     | 
    
         
            +
                      "required" : false,
         
     | 
| 
      
 30 
     | 
    
         
            +
                      "show_title" : false,
         
     | 
| 
      
 31 
     | 
    
         
            +
                      "soft-required" : false
         
     | 
| 
      
 32 
     | 
    
         
            +
                    },
         
     | 
| 
      
 33 
     | 
    
         
            +
                  "shortname" : null,
         
     | 
| 
      
 34 
     | 
    
         
            +
                  "sub_question_skus" : null,
         
     | 
| 
      
 35 
     | 
    
         
            +
                  "title" : { "English" : "SurveyInstructions" },
         
     | 
| 
      
 36 
     | 
    
         
            +
                  "varname" : null
         
     | 
| 
      
 37 
     | 
    
         
            +
                },
         
     | 
| 
      
 38 
     | 
    
         
            +
                { "_subtype" : "table",
         
     | 
| 
      
 39 
     | 
    
         
            +
                  "_type" : "SurveyQuestion",
         
     | 
| 
      
 40 
     | 
    
         
            +
                  "description" : [  ],
         
     | 
| 
      
 41 
     | 
    
         
            +
                  "has_showhide_deps" : false,
         
     | 
| 
      
 42 
     | 
    
         
            +
                  "id" : 106,
         
     | 
| 
      
 43 
     | 
    
         
            +
                  "options" : [ { "_type" : "SurveyOption",
         
     | 
| 
      
 44 
     | 
    
         
            +
                        "id" : 10031,
         
     | 
| 
      
 45 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 46 
     | 
    
         
            +
                        "title" : { "English" : "1" },
         
     | 
| 
      
 47 
     | 
    
         
            +
                        "value" : "1"
         
     | 
| 
      
 48 
     | 
    
         
            +
                      },
         
     | 
| 
      
 49 
     | 
    
         
            +
                      { "_type" : "SurveyOption",
         
     | 
| 
      
 50 
     | 
    
         
            +
                        "id" : 10032,
         
     | 
| 
      
 51 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 52 
     | 
    
         
            +
                        "title" : { "English" : "2" },
         
     | 
| 
      
 53 
     | 
    
         
            +
                        "value" : "2"
         
     | 
| 
      
 54 
     | 
    
         
            +
                      },
         
     | 
| 
      
 55 
     | 
    
         
            +
                      { "_type" : "SurveyOption",
         
     | 
| 
      
 56 
     | 
    
         
            +
                        "id" : 10033,
         
     | 
| 
      
 57 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 58 
     | 
    
         
            +
                        "title" : { "English" : "3" },
         
     | 
| 
      
 59 
     | 
    
         
            +
                        "value" : "3"
         
     | 
| 
      
 60 
     | 
    
         
            +
                      }
         
     | 
| 
      
 61 
     | 
    
         
            +
                    ],
         
     | 
| 
      
 62 
     | 
    
         
            +
                  "properties" : { "break_after" : false,
         
     | 
| 
      
 63 
     | 
    
         
            +
                      "custom_css" : "",
         
     | 
| 
      
 64 
     | 
    
         
            +
                      "disabled" : false,
         
     | 
| 
      
 65 
     | 
    
         
            +
                      "exclude_number" : "YES",
         
     | 
| 
      
 66 
     | 
    
         
            +
                      "hidden" : false,
         
     | 
| 
      
 67 
     | 
    
         
            +
                      "hide_after_response" : false,
         
     | 
| 
      
 68 
     | 
    
         
            +
                      "labels_right" : false,
         
     | 
| 
      
 69 
     | 
    
         
            +
                      "map_key" : "table-radio",
         
     | 
| 
      
 70 
     | 
    
         
            +
                      "messages" : { "inputmask" : [  ],
         
     | 
| 
      
 71 
     | 
    
         
            +
                          "l_extreme_label" : [  ],
         
     | 
| 
      
 72 
     | 
    
         
            +
                          "left_label" : [  ],
         
     | 
| 
      
 73 
     | 
    
         
            +
                          "r_extreme_label" : [  ],
         
     | 
| 
      
 74 
     | 
    
         
            +
                          "right_label" : [  ]
         
     | 
| 
      
 75 
     | 
    
         
            +
                        },
         
     | 
| 
      
 76 
     | 
    
         
            +
                      "question_description" : { "English" : "" },
         
     | 
| 
      
 77 
     | 
    
         
            +
                      "question_description_above" : false,
         
     | 
| 
      
 78 
     | 
    
         
            +
                      "required" : true,
         
     | 
| 
      
 79 
     | 
    
         
            +
                      "show_title" : false,
         
     | 
| 
      
 80 
     | 
    
         
            +
                      "soft-required" : false
         
     | 
| 
      
 81 
     | 
    
         
            +
                    },
         
     | 
| 
      
 82 
     | 
    
         
            +
                  "shortname" : "",
         
     | 
| 
      
 83 
     | 
    
         
            +
                  "sub_question_skus" : [ 107,
         
     | 
| 
      
 84 
     | 
    
         
            +
                      108,
         
     | 
| 
      
 85 
     | 
    
         
            +
                      109,
         
     | 
| 
      
 86 
     | 
    
         
            +
                      110,
         
     | 
| 
      
 87 
     | 
    
         
            +
                      111
         
     | 
| 
      
 88 
     | 
    
         
            +
                    ],
         
     | 
| 
      
 89 
     | 
    
         
            +
                  "title" : { "English" : " " },
         
     | 
| 
      
 90 
     | 
    
         
            +
                  "varname" : ""
         
     | 
| 
      
 91 
     | 
    
         
            +
                },
         
     | 
| 
      
 92 
     | 
    
         
            +
                { "_subtype" : "radio",
         
     | 
| 
      
 93 
     | 
    
         
            +
                  "_type" : "SurveyQuestion",
         
     | 
| 
      
 94 
     | 
    
         
            +
                  "description" : [  ],
         
     | 
| 
      
 95 
     | 
    
         
            +
                  "has_showhide_deps" : null,
         
     | 
| 
      
 96 
     | 
    
         
            +
                  "id" : 107,
         
     | 
| 
      
 97 
     | 
    
         
            +
                  "options" : [ { "_type" : "SurveyOption",
         
     | 
| 
      
 98 
     | 
    
         
            +
                        "id" : 10031,
         
     | 
| 
      
 99 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 100 
     | 
    
         
            +
                        "title" : { "English" : "1" },
         
     | 
| 
      
 101 
     | 
    
         
            +
                        "value" : "1"
         
     | 
| 
      
 102 
     | 
    
         
            +
                      },
         
     | 
| 
      
 103 
     | 
    
         
            +
                      { "_type" : "SurveyOption",
         
     | 
| 
      
 104 
     | 
    
         
            +
                        "id" : 10032,
         
     | 
| 
      
 105 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 106 
     | 
    
         
            +
                        "title" : { "English" : "2" },
         
     | 
| 
      
 107 
     | 
    
         
            +
                        "value" : "2"
         
     | 
| 
      
 108 
     | 
    
         
            +
                      },
         
     | 
| 
      
 109 
     | 
    
         
            +
                      { "_type" : "SurveyOption",
         
     | 
| 
      
 110 
     | 
    
         
            +
                        "id" : 10033,
         
     | 
| 
      
 111 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 112 
     | 
    
         
            +
                        "title" : { "English" : "3" },
         
     | 
| 
      
 113 
     | 
    
         
            +
                        "value" : "3"
         
     | 
| 
      
 114 
     | 
    
         
            +
                      }
         
     | 
| 
      
 115 
     | 
    
         
            +
                    ],
         
     | 
| 
      
 116 
     | 
    
         
            +
                  "properties" : { "hidden" : false,
         
     | 
| 
      
 117 
     | 
    
         
            +
                      "option_sort" : false,
         
     | 
| 
      
 118 
     | 
    
         
            +
                      "orientation" : "VERT",
         
     | 
| 
      
 119 
     | 
    
         
            +
                      "required" : true
         
     | 
| 
      
 120 
     | 
    
         
            +
                    },
         
     | 
| 
      
 121 
     | 
    
         
            +
                  "shortname" : null,
         
     | 
| 
      
 122 
     | 
    
         
            +
                  "sub_question_skus" : null,
         
     | 
| 
      
 123 
     | 
    
         
            +
                  "title" : { "English" : "Radio question #1" },
         
     | 
| 
      
 124 
     | 
    
         
            +
                  "varname" : null
         
     | 
| 
      
 125 
     | 
    
         
            +
                },
         
     | 
| 
      
 126 
     | 
    
         
            +
                { "_subtype" : "radio",
         
     | 
| 
      
 127 
     | 
    
         
            +
                  "_type" : "SurveyQuestion",
         
     | 
| 
      
 128 
     | 
    
         
            +
                  "description" : [  ],
         
     | 
| 
      
 129 
     | 
    
         
            +
                  "has_showhide_deps" : null,
         
     | 
| 
      
 130 
     | 
    
         
            +
                  "id" : 108,
         
     | 
| 
      
 131 
     | 
    
         
            +
                  "options" : [ { "_type" : "SurveyOption",
         
     | 
| 
      
 132 
     | 
    
         
            +
                        "id" : 10031,
         
     | 
| 
      
 133 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 134 
     | 
    
         
            +
                        "title" : { "English" : "1" },
         
     | 
| 
      
 135 
     | 
    
         
            +
                        "value" : "1"
         
     | 
| 
      
 136 
     | 
    
         
            +
                      },
         
     | 
| 
      
 137 
     | 
    
         
            +
                      { "_type" : "SurveyOption",
         
     | 
| 
      
 138 
     | 
    
         
            +
                        "id" : 10032,
         
     | 
| 
      
 139 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 140 
     | 
    
         
            +
                        "title" : { "English" : "2" },
         
     | 
| 
      
 141 
     | 
    
         
            +
                        "value" : "2"
         
     | 
| 
      
 142 
     | 
    
         
            +
                      },
         
     | 
| 
      
 143 
     | 
    
         
            +
                      { "_type" : "SurveyOption",
         
     | 
| 
      
 144 
     | 
    
         
            +
                        "id" : 10033,
         
     | 
| 
      
 145 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 146 
     | 
    
         
            +
                        "title" : { "English" : "3" },
         
     | 
| 
      
 147 
     | 
    
         
            +
                        "value" : "3"
         
     | 
| 
      
 148 
     | 
    
         
            +
                      }
         
     | 
| 
      
 149 
     | 
    
         
            +
                    ],
         
     | 
| 
      
 150 
     | 
    
         
            +
                  "properties" : { "hidden" : false,
         
     | 
| 
      
 151 
     | 
    
         
            +
                      "option_sort" : false,
         
     | 
| 
      
 152 
     | 
    
         
            +
                      "orientation" : "VERT",
         
     | 
| 
      
 153 
     | 
    
         
            +
                      "required" : true
         
     | 
| 
      
 154 
     | 
    
         
            +
                    },
         
     | 
| 
      
 155 
     | 
    
         
            +
                  "shortname" : null,
         
     | 
| 
      
 156 
     | 
    
         
            +
                  "sub_question_skus" : null,
         
     | 
| 
      
 157 
     | 
    
         
            +
                  "title" : { "English" : "Radio option #2" },
         
     | 
| 
      
 158 
     | 
    
         
            +
                  "varname" : null
         
     | 
| 
      
 159 
     | 
    
         
            +
                },
         
     | 
| 
      
 160 
     | 
    
         
            +
                { "_subtype" : "radio",
         
     | 
| 
      
 161 
     | 
    
         
            +
                  "_type" : "SurveyQuestion",
         
     | 
| 
      
 162 
     | 
    
         
            +
                  "description" : [  ],
         
     | 
| 
      
 163 
     | 
    
         
            +
                  "has_showhide_deps" : null,
         
     | 
| 
      
 164 
     | 
    
         
            +
                  "id" : 109,
         
     | 
| 
      
 165 
     | 
    
         
            +
                  "options" : [ { "_type" : "SurveyOption",
         
     | 
| 
      
 166 
     | 
    
         
            +
                        "id" : 10031,
         
     | 
| 
      
 167 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 168 
     | 
    
         
            +
                        "title" : { "English" : "1" },
         
     | 
| 
      
 169 
     | 
    
         
            +
                        "value" : "1"
         
     | 
| 
      
 170 
     | 
    
         
            +
                      },
         
     | 
| 
      
 171 
     | 
    
         
            +
                      { "_type" : "SurveyOption",
         
     | 
| 
      
 172 
     | 
    
         
            +
                        "id" : 10032,
         
     | 
| 
      
 173 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 174 
     | 
    
         
            +
                        "title" : { "English" : "2" },
         
     | 
| 
      
 175 
     | 
    
         
            +
                        "value" : "2"
         
     | 
| 
      
 176 
     | 
    
         
            +
                      },
         
     | 
| 
      
 177 
     | 
    
         
            +
                      { "_type" : "SurveyOption",
         
     | 
| 
      
 178 
     | 
    
         
            +
                        "id" : 10033,
         
     | 
| 
      
 179 
     | 
    
         
            +
                        "properties" : [  ],
         
     | 
| 
      
 180 
     | 
    
         
            +
                        "title" : { "English" : "3" },
         
     | 
| 
      
 181 
     | 
    
         
            +
                        "value" : "3"
         
     | 
| 
      
 182 
     | 
    
         
            +
                      }
         
     | 
| 
      
 183 
     | 
    
         
            +
                    ],
         
     | 
| 
      
 184 
     | 
    
         
            +
                  "properties" : { "hidden" : false,
         
     | 
| 
      
 185 
     | 
    
         
            +
                      "option_sort" : false,
         
     | 
| 
      
 186 
     | 
    
         
            +
                      "orientation" : "VERT",
         
     | 
| 
      
 187 
     | 
    
         
            +
                      "required" : true
         
     | 
| 
      
 188 
     | 
    
         
            +
                    },
         
     | 
| 
      
 189 
     | 
    
         
            +
                  "shortname" : null,
         
     | 
| 
      
 190 
     | 
    
         
            +
                  "sub_question_skus" : null,
         
     | 
| 
      
 191 
     | 
    
         
            +
                  "title" : { "English" : "Radio option #3" },
         
     | 
| 
      
 192 
     | 
    
         
            +
                  "varname" : null
         
     | 
| 
      
 193 
     | 
    
         
            +
                }
         
     | 
| 
      
 194 
     | 
    
         
            +
              ]
         
     | 
| 
      
 195 
     | 
    
         
            +
            }
         
     |