Polls is a simple web service that allows consumers to view polls and vote in them.
This resource does not have any attributes. Instead it offers the initial API affordances in the form of the links in the JSON body.
It is recommend to follow the “url” link values or Link headers to get to resources instead of constructing your own URLs to keep your client decoupled from implementation details.
Resource related to questions in the API.
A Question object has the following attributes.
question
published_at
url
choices (an array of Choice objects).
question_id | ID of the Question in form of an integer |
---|
question_id | ID of the Question in form of an integer |
---|---|
choice_id | ID of the Choice in form of an integer |
This action allows you to vote on a question's choice.
Again, instead of constructing the URLs for the next page. It is highly recommended that you follow the next
link header in the response.
page | The page of questions to return |
---|
You can create your own question using this action. It takes a JSON dictionary containing a question and a collection of answers in the form of choices.
question (string) - The question
choices (array[string]) - A collection of choices.