0.02
No commit activity in last 3 years
No release in over 3 years
A Ruby wrapper for the SurveyGizmo REST API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 0.7.4
~> 1.1.0
 Project Readme

The SurveyGizmo Ruby Gem

A Ruby wrapper for the SurveyGizmo REST API

Build Status

Installation

gem install surveygizmo

Usage

# Configure your Surveygizmo client
Surveygizmo.configure do |config|
  config.username = YOUR_USERNAME
  config.password = YOUR_PASSWORD
end
# Return a list of all Surveys
Surveygizmo.surveys
# Return a specific Survey
Surveygizmo.survey(id)

See the Documentation for the full list

Filtering

You can filter any request by passing a hash to the filter option.

# Only show survey responses that have been made after 1 January 2012
Surveygizmo.survey_responses(survey_id, filter: { field: "datesubmitted", operator: ">=", value: "2012-01-01"})

You can add multiple filters by passing an array of hashes.

# Show responses made in January 2012
Surveygizmo.survey_responses(survey_id, filter: [{ field: "datesubmitted", operator: ">=", value: "2012-01-01"}, {field "datesubmitted", operator: "<=", value: "2012-01-31"])

Accessing meta data of the requests

You can access the result_ok?, total_count, page, total_pages and results_per_page metadata.

# Count the survey responses, but don't fetch them.
Surveygizmo.survey_questions(survey_id, resultsperpage: 0).total_count 

To Do List

This gem is very young, and not all endpoints have been implemented. Here’s a brief overview of the progress so far (italics denotes lack of implementation):

  • Account
    • Show
  • Account User
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Contact
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Survey
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Survey Campaign
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Survey Response
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Survey Option
  • Survey Question
  • Survey Page
  • Survey Statistics
  • Email Message

Thanks

This gem is heavily inspired by the Twitter gem and John Nunemaker’s hard work.

Copyright

Copyright © 2011-2012 Bobby Uhlenbrock. See LICENSE for details.