Skip to content

Instantly share code, notes, and snippets.

@dandirks
Created March 7, 2015 21:05
Show Gist options
  • Save dandirks/05a6e2d22d38349263ed to your computer and use it in GitHub Desktop.
Save dandirks/05a6e2d22d38349263ed to your computer and use it in GitHub Desktop.
Straw Poll - New Poll API
Make a POST with something like the following body to "http://strawpoll.me/api/v2/polls"
{
"title": "Poll title",
"options":[
"Option #1",
"Option #2",
"Option #3"
],
"multi": true,
"permissive": true
}
Multi or permissive can be either true, false, or not sent (which will then default to false). You may provide up to 30 options.
@anurudhp
Copy link

anurudhp commented Mar 8, 2015

Is there a way to get the results as JSON?

@dandirks
Copy link
Author

@codeLegend Yeah, you can make a GET request to "http://strawpoll.me/api/v2/polls/1" (with whatever poll ID you care about instead of 1 on the end) and it will give you the current results of the poll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment