Online Poll Maker

v1.0.0
io.github.onlinepollmaker-com/online-poll-maker Checked 4 days ago Published 28 days ago

Create poll drafts on onlinepollmaker.com.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_poll_draft Create poll draft

Create a poll draft (1-100 single-choice questions, 2-10 options each). Returns id, token, version and edit_url. Give the edit_url to the person so they can review, verify and publish it in their browser; the draft expires 24 hours after creation. Never say the poll is published.

ParameterTypeDescription
questions *null | array1-100 required single-choice questions
email_modestringOne of none (default), optional or required: whether participants are asked for an email address shared with the creator. Cannot change after publishing.
email_purposestringRequired when email_mode is optional or required: a short note (up to 200 characters) telling participants why the email is collected.
titlestringOptional poll title, up to 200 characters after trimming. Empty means the first question is used as the title.

get_poll_draft Read poll draft

Read the latest content and version of a draft. Call this before every update: the person may have edited the draft in the browser.

ParameterTypeDescription
id *stringdraft id returned by create_poll_draft
token *stringdraft token returned by create_poll_draft

update_poll_draft Replace poll draft

Replace the whole draft content. Send the version you just read with get_poll_draft. On version_conflict, read the draft again and re-apply your change; never overwrite newer content with an older copy.

ParameterTypeDescription
content *objectthe complete poll content; it replaces the whole draft
id *stringdraft id returned by create_poll_draft
token *stringdraft token returned by create_poll_draft
version *integerthe version you just read with get_poll_draft; a newer version on the server returns version_conflict