View Source Tw.V1_1.Poll (Tw v0.1.1)

Poll data structure and related functions. https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/entities

Link to this section Summary

Types

t()
fielddescription
optionsAn array of options, each having a poll position, and the text for that position. Example: {[ { "position": 1, "text": "I read documentation once." } ] }.
end_datetimeTime stamp (UTC) of when poll ends. Example: "Thu May 25 22:20:27 +0000 2017".
duration_minutesDuration of poll in minutes. Example: 60.

Functions

Decode JSON-decoded map into t/0

Link to this section Types

Specs

t() :: %Tw.V1_1.Poll{
  duration_minutes: binary(),
  end_datetime: binary(),
  options: [map()]
}
fielddescription
optionsAn array of options, each having a poll position, and the text for that position. Example: {[ { "position": 1, "text": "I read documentation once." } ] }.
end_datetimeTime stamp (UTC) of when poll ends. Example: "Thu May 25 22:20:27 +0000 2017".
duration_minutesDuration of poll in minutes. Example: 60.

Link to this section Functions

Specs

decode!(map()) :: t()

Decode JSON-decoded map into t/0