Votta API reference
« back to overviewTopics [1.0]
index
List all the topics.
URL
GET /topicsExamples
Request
(empty request)
Response
[
{
"id": 3,
"title": "Favorite Editor",
"body": "What's your favorite editor?"
},
{
"id": 5,
"title": "Favorite Cat",
"body": "What kind of cat do you like most?"
}
]
show
Show the topic.
URL
GET /topics/:idResponse Object
Examples
Request
(empty request)
Response
{
"title": "Favorite Editor",
"body": "What's your favorite editor?\nThis is important."
}
create
Create a topic to vote for.
URL
POST /topicsRequired Parameters
- topic[title] String
Optional Parameters
- topic[body] String
Response Object
Examples
Request
topic[title]=Best Restaurant
topic[body]=What's your favorite restaurant?\nDecide it!
Response
{
"id": 3,
"title": "Favorite Editor",
"body": "What's your favorite editor? Come to vote!"
}