Pollit helps you use the ease of SMS to conduct surveys reaching your audience at their convenience.
3.0K
Pollit helps you use the ease of text messaging to conduct surveys reaching your audience at their convenience. It will guide each participant step by step through your survey, collecting the results in real time. Using text messaging allows you to scale the number of people you reach and lets them answer anytime, anywhere.
Simply clone the repository and fill the following settings file before starting the server with rails server command:
config/settings.yml
config/nuntium.yml
config/database.yml
config/guisso.yml
config/hub.yml
Nuntium settings are located in config/nuntium.yml.
The Nuntium Application associated to a Pollit instance must be configured in this way:
application in config/nuntium.yml/nuntium/receive_atat_post_user in config/nuntium.ymlat_post_password in config/nuntium.yml/nuntium/delivery_callbackat_post_user in config/nuntium.ymlat_post_password in config/nuntium.ymldocker-compose.yml file build a development environment mounting the current folder and running rails in development environment.
Run the following commands to have a stable development environment.
$ docker-compose run --rm --no-deps web bundle install
$ docker-compose up -d db
$ docker-compose run --rm web rake db:setup
$ docker-compose up
To setup and run test, once the web container is running:
$ docker-compose exec web bash
root@web_1 $ rake
Pollit provides a simple RESTful read-only API for querying Answers, Polls, Questions and Respondents.
Authentication is handled via GUISSO, allowing access via both OAuth and basic auth. If the user is currently logged in to the application, all requests to the API from the browser will also work, facilitating the exploration of the API.
All endpoints support both JSON and XML format. The extension used in the URL will determine which format is returned by the API.
http://pollit.instedd.org/api/polls.json
http://pollit.instedd.org/api/polls/ID.json
http://pollit.instedd.org/api/polls/POLL_ID/respondents.json
http://pollit.instedd.org/api/polls/POLL_ID/respondents/ID.json
http://pollit.instedd.org/api/polls/POLL_ID/questions.json
http://pollit.instedd.org/api/polls/POLL_ID/questions/ID.json
http://pollit.instedd.org/api/polls/POLL_ID/answers.json
http://pollit.instedd.org/api/polls/POLL_ID/answers/ID.json
Poll
{
"confirmation_word": "Yes",
"created_at": "2011-11-04T19:11:53Z",
"current_occurrence": null,
"description": "A test poll",
"form_url": "URL_TO_FORM",
"goodbye_message": "Thank you for your answers!",
"id": 1,
"owner_id": 1,
"post_url": "URL_FOR_ANSWERS",
"recurrence": {
"start_time": "2015-01-01T12:00:00+00:00",
"rrules": [],
"rtimes": [],
"extimes": []
},
"status": "started",
"title": "Test poll",
"updated_at": "2015-01-01T12:00:00+00:00",
"welcome_message": "Answer 'yes' if you want to participate in this poll."
}
Respondent
{
"confirmed": true,
"created_at": "2015-01-01T20:00:00Z",
"current_question_id": null,
"current_question_sent": true,
"id": 1,
"phone": "PHONE_NUMBER",
"poll_id": 1,
"pushed_at": "2015-01-01T20:00:00Z",
"pushed_status": "succeeded",
"updated_at": "2015-01-01T20:00:00Z"
}
Question
{
"collects_respondent": false,
"created_at": "2015-01-01T20:00:00Z",
"description": "Enter your name",
"field_name": "FIELD_NAME",
"id": 1,
"kind": "text",
"numeric_max": null,
"numeric_min": null,
"options": [],
"poll_id": 1,
"position": 1,
"title": "What is your name?",
"updated_at": "2015-01-01T20:00:00Z"
}
Answer
{
"id": 1,
"question_id": 1,
"question_title": "What is your name?",
"respondent_phone": "PHONE_NUMBER",
"occurrence": null,
"timestamp": "2015-01-01T20:00:00Z",
"response": "John Doe"
}
Content type
Image
Digest
Size
449.5 MB
Last updated
over 7 years ago
docker pull instedd/pollit:2.4