mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
Frodo swaggins (#126)
* more swagger fun * document a whole bunch more stuff * more swagger yayyyyyyy * progress + go fmt
This commit is contained in:
@@ -51,19 +51,24 @@ type Poll struct {
|
||||
type PollOptions struct {
|
||||
// The text value of the poll option. String.
|
||||
Title string `json:"title"`
|
||||
// The number of received votes for this option. Number, or null if results are not published yet.
|
||||
// The number of received votes for this option.
|
||||
// Number, or null if results are not published yet.
|
||||
VotesCount int `json:"votes_count,omitempty"`
|
||||
}
|
||||
|
||||
// PollRequest represents a mastodon-api poll attached to a status POST request, as defined here: https://docs.joinmastodon.org/methods/statuses/
|
||||
// It should be used at the path https://example.org/api/v1/statuses
|
||||
// PollRequest models a request to create a poll.
|
||||
//
|
||||
// swagger:parameters createStatus
|
||||
type PollRequest struct {
|
||||
// Array of possible answers. If provided, media_ids cannot be used, and poll[expires_in] must be provided.
|
||||
Options []string `form:"options"`
|
||||
// Duration the poll should be open, in seconds. If provided, media_ids cannot be used, and poll[options] must be provided.
|
||||
ExpiresIn int `form:"expires_in"`
|
||||
// Allow multiple choices?
|
||||
Multiple bool `form:"multiple"`
|
||||
// Hide vote counts until the poll ends?
|
||||
HideTotals bool `form:"hide_totals"`
|
||||
// Array of possible answers.
|
||||
// If provided, media_ids cannot be used, and poll[expires_in] must be provided.
|
||||
// name: poll[options]
|
||||
Options []string `form:"options" json:"options" xml:"options"`
|
||||
// Duration the poll should be open, in seconds.
|
||||
// If provided, media_ids cannot be used, and poll[options] must be provided.
|
||||
ExpiresIn int `form:"expires_in" json:"expires_in" xml:"expires_in"`
|
||||
// Allow multiple choices on this poll.
|
||||
Multiple bool `form:"multiple" json:"multiple" xml:"multiple"`
|
||||
// Hide vote counts until the poll ends.
|
||||
HideTotals bool `form:"hide_totals" json:"hide_totals" xml:"hide_totals"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user