Documentation that covers the Polls API with constrained topics. The example poll below is powered a stream's constrained topics, and all keyword management will be through the streams UI.
How to create a poll powered by constrained topics (in development):
- Enable the "Polls (in development)" feature in https://massrelevance.com/admin/users/YOUR_ID
- Go to https://massrelevance.com/platform/manage/ and create a new poll.
- In the Poll UI, select the "Sync with a stream's constrained topic" option, and choose the stream from the drop-down.
- Navigate to the stream to manage constrained topics. The poll options will reflect the stream's constrained topics.
GET http://api.massrelevance.com/v2/polls/(:id).json
GET http://api.massrelevance.com/v2/polls/(:user_name)/(:poll_name).json
Parameter | Description |
---|---|
sort | Either asc or desc . Defaults to desc . |
Real example: http://api.massrelevance.com/v2/polls/3.json
{
id: "33",
name: "pro-bowl-1",
text: "Pro Bowl poll powered by stream constrained topics.",
counts: {
total: 74
},
id: "1",
data: [{
text: "nfc",
counts: {
total: 44,
percent: 59
},
data: [{
title: "nfc",
type: "constrained_topic",
counts: {
total: 44,
percent: 100
},
value: ["nfc", "cardinals", "packers"],
meta: {}
}],
meta: {}
}, {
text: "afc",
counts: {
total: 30,
percent: 41
},
data: [{
title: "afc",
type: "constrained_topic",
counts: {
total: 30,
percent: 100
},
value: ["afc", "patriots", "broncos"],
meta: {}
}],
meta: {}
}]
}