create_poll
Make a poll in a space: a question (the title) and options people vote on — one each, or several — with the results live as they vote: counts, shares and who voted for what (unless anonymous). The votes are kept in a spreadsheet or a database table of the space (votes_to; left out, a new sheet of its own), a row per vote, where people see and use them like any other data. For a team decision, a date, a venue, a name, a priority; with open_options, an idea board. People vote; you read the results with read_poll. Read guide topic "polls" first; check it with render_poll.
Parameters
space_idstringrequiredtitlestringrequiredoptionsobject[]requiredShow child attributes
titlestringrequireddescriptionstringimagestringurlstringvotes_toobjectShow child attributes
sheetstringtabstringdatabasestringtablestringdescriptionstringmultiplebooleanmax_choicesintegeranonymousbooleanopen_optionsbooleancloses_atstringread_poll
A poll as it is now, counted from its votes: the question, whether it is open, where the votes are kept, and each option with its id (what update_poll and comment take), its votes, its share of the voters and who voted for it (names; none when anonymous), the leaders and how many people voted; problems with the votes (rows for no option, a votes tab that is gone).
Parameters
item_idstringrequiredupdate_poll
Change a poll. Any of: title (the question); description, multiple, max_choices, anonymous (before the first vote), open_options, closes_at (null to clear); closed (true ends voting now, false opens it again); add_options; change_options (by id: title, description, image, url; "" clears one — a new title renames its votes too); remove_options (their votes are deleted with them); move_options (to a 0-based place); clear_votes (deletes everyone's votes, to start over — only when the person asks); votes_to (where votes go from now on; the votes so far are copied there). Applied in that order. People's votes are theirs: never vote for them.
Parameters
item_idstringrequiredtitlestringdescriptionstring | nullmultiplebooleanmax_choicesinteger | nullanonymousbooleanopen_optionsbooleancloses_atstring | nullclosedbooleanadd_optionsobject[]Show child attributes
titlestringrequireddescriptionstringimagestringurlstringchange_optionsobject[]Show child attributes
idstringrequiredchangesobjectrequiredShow child attributes
titlestringdescriptionstringimagestringurlstringremove_optionsstring[]move_optionsobject[]Show child attributes
idstringrequiredtointegerrequiredclear_votesbooleanvotes_toobjectShow child attributes
sheetstringtabstringdatabasestringtablestringrender_poll
See a poll as people do: a screenshot of the question, the options with their pictures, and the results bars as they stand, plus checks (fewer than two options, a closing time passed, a limit that limits nothing, problems with the votes) and errors the page hit.
Parameters
item_idstringrequired