Add support for creating polls

This commit is contained in:
Rasmus Lindroth 2021-11-05 09:21:53 +01:00
parent 58c3891813
commit 2ad586ea1d
2 changed files with 22 additions and 0 deletions

View file

@ -219,6 +219,15 @@ type Toot struct {
SpoilerText string `json:"spoiler_text"`
Visibility string `json:"visibility"`
ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
Poll *TootPoll `json:"poll"`
}
// TootPoll holds information for creating a poll in Toot.
type TootPoll struct {
Options []string `json:"options"`
ExpiresInSeconds int64 `json:"expires_in"`
Multiple bool `json:"multiple"`
HideTotals bool `json:"hide_totals"`
}
// Mention hold information for mention.