README.md in survey-gizmo-ruby-5.0.3 vs README.md in survey-gizmo-ruby-5.0.4
- old
+ new
@@ -56,10 +56,13 @@
# Optional - Set if you need to hit a different base URL (e.g. the .eu domain)
config.api_url = 'https://restapi.surveygizmo.eu'
# Optional - Defaults to 50, maximum 500. Setting too high may cause SurveyGizmo to start throwing timeouts.
config.results_per_page = 100
+
+ # Optional - Defaults to 300 seconds
+ config.timeout_seconds = 600
end
```
### Retries
@@ -76,11 +79,12 @@
config.environments[:survey_gizmo_ruby][:delay_interval] = 120
# Retry different exception classes
config.environments[:survey_gizmo_ruby][:retry_error_classes] = [MyExceptionClass, MyOtherExceptionClass]
end
-# To set Pester to retry on ALL exception classes, do this (use with caution! Can include exceptions Rails likes to throw on SIGHUP)
+# To set Pester to retry on ALL exception classes, do this:
+# (use with caution! Can include exceptions Rails likes to throw on SIGHUP)
Pester.configure do |config|
config.environments[:survey_gizmo_ruby][:retry_error_classes] = nil
end
```
@@ -119,22 +123,22 @@
questions = survey.questions
# Strip out instruction, urlredirect, logic, media, and other non question "questions"
questions = survey.actual_questions
# Create a question for your survey. The returned object will be given an :id parameter by SG.
-question = SurveyGizmo::API::Question.create(survey_id: survey.id, title: 'Do you like ruby?', type: 'checkbox')
+question = SurveyGizmo::API::Question.create(survey_id: survey.id, title: 'Do u ruby?', type: 'checkbox')
# Update a question
-question.title = "Do you LOVE Ruby?"
+question.title = "Do u <3 Ruby?"
question.save
# Destroy a question
question.destroy
# Iterate over all your Responses
survey.responses.each { |response| do_something_with(response) }
# Use filters to limit results - this example will iterate over page 3 of completed, non test data
-# SurveyResponses submitted within the past 3 days for contact 999. It demonstrates how to use some of the gem's
-# built in filters/generators as well as how to construct a filter.
+# SurveyResponses submitted within the past 3 days for contact 999. It demonstrates how to use some of
+# the gem's built in filters/generators as well as how to construct a filter.
# See: http://apihelp.surveygizmo.com/help/article/link/filters for more info on filters
filters = [
SurveyGizmo::API::Response::NO_TEST_DATA,
SurveyGizmo::API::Response::ONLY_COMPLETED,
SurveyGizmo::API::Response.submitted_since_filter(Time.now - 72.hours),
@@ -195,10 +199,10 @@
# but if the class needs special routing, specify each method route with a hash:
@route = {
get: '/something/:id',
update: '/something/weird/:id',
create: '/something',
- delete: /something/delete/:id'
+ delete: '/something/delete/:id'
}
end
```
The [Virtus](https://github.com/solnic/virtus) gem is included to handle the attributes, so please check their documentation as well.