Skip to content

Instantly share code, notes, and snippets.

@jimmyjacobson
Last active December 17, 2015 11:29
Show Gist options
  • Save jimmyjacobson/5602847 to your computer and use it in GitHub Desktop.
Save jimmyjacobson/5602847 to your computer and use it in GitHub Desktop.

Wedgies API Documentation

##Question

Creating a new question

curl -X POST -d @question.json -H "Content-Type:application/json" "http://wedgies-api-production.herokuapp.com/question"

Contents of question.json

{ "text": "QUESTION TEXT", "owner": "USER_ID_HERE", "choices": [ { "text": "OPTION 1" }, { "text": "OPTION 2" }, { "text": "OPTION 3" } ], }

Getting a question by id

curl "http://wedgies-api-production.herokuapp.com/question/_id/QUESTION_ID"

Getting a question and it's results

curl "http://wedgies-api-production.herokuapp.com/question/_id/QUESTION_ID?results=true"

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