Polls
Poll Fields
Field | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed_at |
string | The time at which the poll closes in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ. | ||||||||||||||||||
created_at |
string | The time at which the poll was created in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ. | ||||||||||||||||||
id |
string | Primary identifier for a poll. This will be an integer, but it is always expressed as a string to avoid limitations with the way JavaScript integers are expressed. This id space is unique to poll objects. There can be a Post and Poll with the same ID; no relation is implied. | ||||||||||||||||||
is_anonymous |
boolean | Whether poll results are anonymous, or if who responded to what option is displayed when the poll is over (or the creator of the poll looks at it). | ||||||||||||||||||
is_public |
boolean | Whether poll is public or private. If private, it still may be attached to a public object, such as a post or a message. | ||||||||||||||||||
max_options |
integer | How many options can be selected at once by responders. Default is 1 . |
||||||||||||||||||
options |
object | A list of 2 to 10 responses for the poll.
|
||||||||||||||||||
poll_token |
string | A token to access and respond to the poll.
Only set on |
||||||||||||||||||
prompt |
string | A readable name of the poll. This is the prompt users will be responding to for the Options. Up to 256 Unicode characters. Be sure to escape if necessary. | ||||||||||||||||||
source |
object |
|
||||||||||||||||||
type |
string | The type of poll. Generally uses a reversed domain name to identify the intended purpose. Non-core poll types (io.pnut.core.* ) are not authenticated by the server; clients should not assume other clients created their poll types the same way. |
||||||||||||||||||
user |
object | This is an embedded User object.
In certain cases, this key may be omitted. |
||||||||||||||||||
user_id |
string | Primary identifier for the user who created the poll.
Only set if the |
||||||||||||||||||
raw |
object | The raw items attached to this object.
Only set if query parameter specified.
|
General Poll Parameters
Any endpoint that returns poll objects can be subject to these parameters.
General Parameters
Name | Type | Description | Default |
---|---|---|---|
include_client |
integer (0 or 1) | Include client object. If false, a source_id field will be included instead. |
true |
include_closed |
integer (0 or 1) | Include closed polls. Only applicable to the user's poll stream. | true |
include_private |
integer (0 or 1) | Include private polls. Only applicable to the user's poll stream. | true |
poll_types |
string | Comma-separated list of poll types to retrieve. Only applicable to the user's poll stream. If not included, will return any polls the app is authorized to view. | all |
exclude_poll_types |
string | Comma-separated list of poll types not to retrieve. Only applicable to the user's poll stream. Ignored if poll_types set. |
none |
include_raw |
integer (0 or 1) | Include raw on all objects. | false |
include_poll_raw |
integer (0 or 1) | Include raw on all poll objects. | false |
include_user |
integer (0 or 1) | Include user object. If false, a user_id field will be included instead. |
true |