Documentation
¶
Overview ¶
Package txn contains the input type of every Mastodon API endpoint.
Each type collects the arguments of one API call, with struct tags naming where each field is read from: "param" for a path placeholder, "query" for a query-string value, "form" for a posted form field, and "header" for a request header. A binder fills the struct from an http.Request before the handler runs.
Each type is named for the endpoint it serves -- GetNotifications, PostAccount_Follow -- matching the constants in the route and scope packages and the handler fields on toot.API.
Types that accept pagination embed the same four parameters, and report them through the QueryPager interface.
Input types for the admin API, push subscriptions, and streaming are not defined yet.
Index ¶
- type DeleteAnnouncement_Reaction
- type DeleteCollection
- type DeleteCollection_Item
- type DeleteConversation
- type DeleteDomainBlock
- type DeleteFeaturedTag
- type DeleteFilter
- type DeleteFilter_Keyword
- type DeleteFilter_Status
- type DeleteFilter_V1
- type DeleteList
- type DeleteList_Accounts
- type DeleteProfile_Avatar
- type DeleteProfile_Header
- type DeletePushSubscription
- type DeleteScheduledStatus
- type DeleteStatus
- type DeleteSuggestion
- type GetAccount
- type GetAccount_Collections
- type GetAccount_Endorsements
- type GetAccount_FamiliarFollowers
- type GetAccount_FeaturedTags
- type GetAccount_Followers
- type GetAccount_Following
- type GetAccount_InCollections
- type GetAccount_Lists
- type GetAccount_Lookup
- type GetAccount_Relationships
- type GetAccount_Search
- type GetAccount_Statuses
- type GetAccount_VerifyCredentials
- type GetAccounts
- type GetAnnouncements
- type GetApplication_VerifyCredentials
- type GetBlocks
- type GetBookmarks
- type GetCollection
- type GetConversations
- type GetCustomEmojis
- type GetDirectory
- type GetDomainBlocks
- type GetEndorsements
- type GetFavourites
- type GetFeaturedTags
- type GetFeaturedTags_Suggestions
- type GetFilter
- type GetFilter_Keyword
- type GetFilter_Keywords
- type GetFilter_Status
- type GetFilter_Statuses
- type GetFilter_V1
- type GetFilters
- type GetFilters_V1
- type GetFollowRequests
- type GetFollowedTags
- type GetGroupedNotifications
- type GetGroupedNotifications_UnreadCount
- type GetInstance
- type GetInstance_Activity
- type GetInstance_DomainBlocks
- type GetInstance_ExtendedDescription
- type GetInstance_Peers
- type GetInstance_Rules
- type GetInstance_V1
- type GetList
- type GetList_Accounts
- type GetLists
- type GetMarkers
- type GetMedia
- type GetMutes
- type GetNotification
- type GetNotificationGroup
- type GetNotificationPolicy
- type GetNotificationRequest
- type GetNotificationRequests
- type GetNotificationRequests_Merged
- type GetNotifications
- type GetNotifications_UnreadCount
- type GetOAuth_Authorize
- type GetOEmbed
- type GetPoll
- type GetPreferences
- type GetPushSubscription
- type GetScheduledStatus
- type GetScheduledStatuses
- type GetSearch
- type GetStatus
- type GetStatus_Context
- type GetStatus_FavouritedBy
- type GetStatus_History
- type GetStatus_RebloggedBy
- type GetStatus_Source
- type GetSuggestions
- type GetTag
- type GetTimeline_Hashtag
- type GetTimeline_Home
- type GetTimeline_List
- type GetTimeline_Public
- type GetTrends
- type GetTrends_Links
- type GetTrends_Statuses
- type PatchAccount_UpdateCredentials
- type PatchCollection
- type PatchNotificationPolicy
- type PostAccount
- type PostAccount_Block
- type PostAccount_Follow
- type PostAccount_Mute
- type PostAccount_Note
- type PostAccount_Pin
- type PostAccount_RemoveFromFollowers
- type PostAccount_Unblock
- type PostAccount_Unfollow
- type PostAccount_Unmute
- type PostAccount_Unpin
- type PostAnnouncement_Dismiss
- type PostApplication
- type PostCollection
- type PostCollection_Item
- type PostCollection_Item_Revoke
- type PostConversationRead
- type PostDomainBlock
- type PostEmailConfirmation
- type PostFeaturedTag
- type PostFilter
- type PostFilter_Keyword
- type PostFilter_Status
- type PostFilter_V1
- type PostFollowRequest_Authorize
- type PostFollowRequest_Reject
- type PostGroupedNotifications_Clear
- type PostList
- type PostList_Accounts
- type PostMarker
- type PostMedia
- type PostNotificationGroup_Dismiss
- type PostNotificationRequest_Accept
- type PostNotificationRequest_Dismiss
- type PostNotificationRequests_Accept
- type PostNotificationRequests_Dismiss
- type PostNotification_Dismiss
- type PostNotifications_Clear
- type PostOAuth_Revoke
- type PostOAuth_Token
- type PostPoll_Votes
- type PostPushSubscription
- type PostReport
- type PostStatus
- type PostStatus_Bookmark
- type PostStatus_Favourite
- type PostStatus_Mute
- type PostStatus_Pin
- type PostStatus_Reblog
- type PostStatus_Translate
- type PostStatus_Unbookmark
- type PostStatus_Unfavourite
- type PostStatus_Unmute
- type PostStatus_Unpin
- type PostStatus_Unreblog
- type PostTag_Follow
- type PostTag_Unfollow
- type PutAnnouncement_Reaction
- type PutFilter
- type PutFilter_Keyword
- type PutFilter_V1
- type PutList
- type PutMedia
- type PutPushSubscription
- type PutScheduledStatus
- type PutStatus
- type QueryPage
- type QueryPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteAnnouncement_Reaction ¶
type DeleteAnnouncement_Reaction struct {
Host string `header:"Host"`
ID string `param:"id"`
Name string `param:"name"`
}
DeleteAnnouncement_Reaction is the input for DELETE /api/v1/announcements/:id/reactions/:name, which returns an empty object. https://docs.joinmastodon.org/methods/announcements/#delete-reactions
type DeleteCollection ¶ added in v0.6.0
DeleteCollection is the input for DELETE /api/v1/collections/:id, which returns an empty object. https://docs.joinmastodon.org/methods/collections/#delete_collection
type DeleteCollection_Item ¶ added in v0.6.0
type DeleteCollection_Item struct {
Host string `header:"Host"`
CollectionID string `param:"collection_id"`
ID string `param:"id"`
}
DeleteCollection_Item is the input for DELETE /api/v1/collections/:collection_id/items/:id, which returns an empty object. https://docs.joinmastodon.org/methods/collections/#remove_account
type DeleteConversation ¶
DeleteConversation is the input for DELETE /api/v1/conversations/:id, which returns an empty object. https://docs.joinmastodon.org/methods/conversations/#delete
type DeleteDomainBlock ¶
type DeleteDomainBlock struct {
Host string `header:"Host"`
Domain string `form:"domain" json:"domain"`
}
DeleteDomainBlock is the input for DELETE /api/v1/domain_blocks, which returns an empty object. https://docs.joinmastodon.org/methods/domain_blocks/#unblock
type DeleteFeaturedTag ¶
DeleteFeaturedTag is the input for DELETE /api/v1/featured_tags/:id, which returns an empty object. https://docs.joinmastodon.org/methods/featured_tags/#unfeature
type DeleteFilter ¶
type DeleteFilter struct {
Host string `header:"Host"`
ID string `param:"id"` // The ID of the Filter in the database.
}
DeleteFilter is the input for DELETE /api/v2/filters/:id, which returns an empty object. https://docs.joinmastodon.org/methods/filters/#delete
type DeleteFilter_Keyword ¶
type DeleteFilter_Keyword struct {
Host string `header:"Host"`
ID string `param:"id"` // The ID of the FilterKeyword in the database.
}
DeleteFilter_Keyword is the input for DELETE /api/v2/filters/keywords/:id, which returns an empty object. https://docs.joinmastodon.org/methods/filters/#keywords-delete
type DeleteFilter_Status ¶
type DeleteFilter_Status struct {
Host string `header:"Host"`
ID string `param:"id"` // The ID of the FilterStatus in the database.
}
DeleteFilter_Status is the input for DELETE /api/v2/filters/statuses/:id, which returns FilterStatus. https://docs.joinmastodon.org/methods/filters/#statuses-remove
type DeleteFilter_V1 ¶
DeleteFilter_V1 is the input for DELETE /api/v1/filters/:id. https://docs.joinmastodon.org/methods/filters/#delete-v1
type DeleteList ¶
DeleteList is the input for DELETE /api/v1/lists/:id. https://docs.joinmastodon.org/methods/lists/#delete
type DeleteList_Accounts ¶
type DeleteList_Accounts struct {
Host string `header:"Host"`
ID string `param:"id"`
AccountIDs []string `form:"account_ids" json:"account_ids"`
}
DeleteList_Accounts is the input for DELETE /api/v1/lists/:id/accounts, which returns an empty object. https://docs.joinmastodon.org/methods/lists/#accounts-remove
type DeleteProfile_Avatar ¶
type DeleteProfile_Avatar struct {
Host string `header:"Host"`
}
DeleteProfile_Avatar is the input for DELETE /api/v1/profile/avatar, which returns CredentialAccount. https://docs.joinmastodon.org/methods/profile/#delete-profile-avatar
type DeleteProfile_Header ¶
type DeleteProfile_Header struct {
Host string `header:"Host"`
}
DeleteProfile_Header is the input for DELETE /api/v1/profile/header, which returns CredentialAccount. https://docs.joinmastodon.org/methods/profile/#delete-profile-header
type DeletePushSubscription ¶ added in v0.6.0
type DeletePushSubscription struct {
Host string `header:"Host"`
}
DeletePushSubscription is the input for DELETE /api/v1/push/subscription, which returns an empty object. https://docs.joinmastodon.org/methods/push/#delete
type DeleteScheduledStatus ¶
DeleteScheduledStatus is the input for DELETE /api/v1/scheduled_statuses/:id, which returns an empty object. https://docs.joinmastodon.org/methods/scheduled_statuses/#cancel
type DeleteStatus ¶
DeleteStatus is the input for DELETE /api/v1/statuses/:id. https://docs.joinmastodon.org/methods/statuses/#delete
type DeleteSuggestion ¶
DeleteSuggestion is the input for DELETE /api/v1/suggestions/:account_id. https://docs.joinmastodon.org/methods/suggestions/#remove
type GetAccount ¶
GetAccount is the input for GET /api/v1/accounts/:id. https://docs.joinmastodon.org/methods/accounts/#get
type GetAccount_Collections ¶ added in v0.6.0
type GetAccount_Collections struct {
Host string `header:"Host"`
AccountID string `param:"account_id"`
Limit int `query:"limit"`
Offset int `query:"offset"`
}
GetAccount_Collections is the input for GET /api/v1/accounts/:account_id/collections, which returns []Collection. https://docs.joinmastodon.org/methods/collections/#get_collections
type GetAccount_Endorsements ¶ added in v0.6.0
type GetAccount_Endorsements struct {
Host string `header:"Host"`
ID string `param:"id"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetAccount_Endorsements is the input for GET /api/v1/accounts/:id/endorsements, which returns []Account -- accounts featured on this account's profile. https://docs.joinmastodon.org/methods/accounts/#endorsements
func (GetAccount_Endorsements) QueryPage ¶ added in v0.6.0
func (t GetAccount_Endorsements) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetAccount_FamiliarFollowers ¶
type GetAccount_FamiliarFollowers struct {
Host string `header:"Host"`
IDs []string `query:"id[]"`
}
GetAccount_FamiliarFollowers is the input for GET /api/v1/accounts/familiar_followers, which returns []FamiliarFollower. This is a batch lookup, same shape as GetAccount_Relationships just above. https://docs.joinmastodon.org/methods/accounts/#familiar_followers
type GetAccount_FeaturedTags ¶
GetAccount_FeaturedTags is the input for GET /api/v1/accounts/:id/featured_tags. https://docs.joinmastodon.org/methods/accounts/#featured_tags
type GetAccount_Followers ¶
type GetAccount_Followers struct {
Host string `header:"Host"`
ID string `param:"id"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetAccount_Followers is the input for GET /api/v1/accounts/:id/followers. https://docs.joinmastodon.org/methods/accounts/#followers
func (GetAccount_Followers) QueryPage ¶
func (t GetAccount_Followers) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetAccount_Following ¶
type GetAccount_Following struct {
Host string `header:"Host"`
ID string `param:"id"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetAccount_Following is the input for GET /api/v1/accounts/:id/following. https://docs.joinmastodon.org/methods/accounts/#following
func (GetAccount_Following) QueryPage ¶
func (t GetAccount_Following) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetAccount_InCollections ¶ added in v0.6.0
type GetAccount_InCollections struct {
Host string `header:"Host"`
AccountID string `param:"account_id"`
Limit int `query:"limit"`
Offset int `query:"offset"`
}
GetAccount_InCollections is the input for GET /api/v1/accounts/:account_id/in_collections, which returns []Collection. https://docs.joinmastodon.org/methods/collections/#in_collections
type GetAccount_Lists ¶
GetAccount_Lists is the input for GET /api/v1/accounts/:id/lists. https://docs.joinmastodon.org/methods/accounts/#lists
type GetAccount_Lookup ¶
GetAccount_Lookup is the input for GET /api/v1/accounts/lookup, which returns Account. https://docs.joinmastodon.org/methods/accounts/#lookup
type GetAccount_Relationships ¶
GetAccount_Relationships is the input for GET /api/v1/accounts/relationships, which returns []Relationships. https://docs.joinmastodon.org/methods/accounts/#relationships
type GetAccount_Search ¶
type GetAccount_Search struct {
Host string `header:"Host"`
Q string `query:"q"`
Limit int `query:"limit"`
Offset int `query:"offset"`
Resolve bool `query:"resolve"`
Following bool `query:"following"`
}
GetAccount_Search is the input for GET /api/v1/accounts/search, which returns []Account. https://docs.joinmastodon.org/methods/accounts/#search
type GetAccount_Statuses ¶
type GetAccount_Statuses struct {
Host string `header:"Host"`
ID string `param:"id"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
OnlyMedia bool `query:"only_media"`
ExcludeReplies bool `query:"exclude_replies"`
ExcludeReblogs bool `query:"exclude_reblogs"`
Pinned bool `query:"pinned"`
Tagged string `query:"tagged"`
}
GetAccount_Statuses is the input for GET /api/v1/accounts/:id/statuses. https://docs.joinmastodon.org/methods/accounts/#statuses
func (GetAccount_Statuses) QueryPage ¶
func (t GetAccount_Statuses) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetAccount_VerifyCredentials ¶
type GetAccount_VerifyCredentials struct {
Host string `header:"Host"`
}
GetAccount_VerifyCredentials is the input for GET /api/v1/accounts/verify_credentials, which returns CredentialAccount. https://docs.joinmastodon.org/methods/accounts/#verify_credentials
type GetAccounts ¶ added in v0.6.0
GetAccounts is the input for GET /api/v1/accounts, a batch lookup that returns []Account. https://docs.joinmastodon.org/methods/accounts/#index
type GetAnnouncements ¶
type GetAnnouncements struct {
Host string `header:"Host"`
Authorization string `header:"Authorization"`
WithDismissed bool `query:"with_dismissed"`
}
GetAnnouncements is the input for GET /api/v1/announcements, which returns []Announcement. https://docs.joinmastodon.org/methods/announcements/#get
type GetApplication_VerifyCredentials ¶
type GetApplication_VerifyCredentials struct {
Host string `header:"Host"`
}
GetApplication_VerifyCredentials is the input for GET /api/v1/apps/verify_credentials, which returns Application. https://docs.joinmastodon.org/methods/apps/#verify_credentials
type GetBlocks ¶
type GetBlocks struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetBlocks is the input for GET /api/v1/blocks, which returns []Account. https://docs.joinmastodon.org/methods/blocks/#get
type GetBookmarks ¶
type GetBookmarks struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetBookmarks is the input for GET /api/v1/bookmarks, which returns []Status. https://docs.joinmastodon.org/methods/bookmarks/#get
func (GetBookmarks) QueryPage ¶
func (t GetBookmarks) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetCollection ¶ added in v0.6.0
GetCollection is the input for GET /api/v1/collections/:id, which returns CollectionWithAccounts. https://docs.joinmastodon.org/methods/collections/#get_collection
type GetConversations ¶
type GetConversations struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetConversations is the input for GET /api/v1/conversations, which returns []Conversation. https://docs.joinmastodon.org/methods/conversations/#get
func (GetConversations) QueryPage ¶
func (t GetConversations) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetCustomEmojis ¶
type GetCustomEmojis struct{}
GetCustomEmojis is the input for GET /api/v1/custom_emojis, which returns []CustomEmoji. https://docs.joinmastodon.org/methods/custom_emojis/#get
type GetDirectory ¶
type GetDirectory struct {
Host string `header:"Host"`
Offset int `query:"offset"`
Limit int `query:"limit"`
Order string `query:"order"`
Local bool `query:"local"`
}
GetDirectory is the input for GET /api/v1/directory, which returns []Account. https://docs.joinmastodon.org/methods/directory/#get
type GetDomainBlocks ¶
type GetDomainBlocks struct {
Host string `header:"Host"`
Authorization string `header:"Authorization"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetDomainBlocks is the input for GET /api/v1/domain_blocks, which returns []String. https://docs.joinmastodon.org/methods/domain_blocks/#get
func (GetDomainBlocks) QueryPage ¶
func (t GetDomainBlocks) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetEndorsements ¶
type GetEndorsements struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
MinID string `query:"min_id"`
SinceID string `query:"since_id"`
Limit int64 `query:"limit"`
}
GetEndorsements is the input for GET /api/v1/endorsements, which returns []Account. https://docs.joinmastodon.org/methods/endorsements/#get
func (GetEndorsements) QueryPage ¶
func (t GetEndorsements) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetFavourites ¶
type GetFavourites struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetFavourites is the input for GET /api/v1/favourites, which returns []Status. https://docs.joinmastodon.org/methods/favourites/#get
func (GetFavourites) QueryPage ¶
func (t GetFavourites) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetFeaturedTags ¶
type GetFeaturedTags struct {
Host string `header:"Host"`
Authorization string `header:"Authorization"`
}
GetFeaturedTags is the input for GET /api/v1/featured_tags, which returns []FeaturedTag. https://docs.joinmastodon.org/methods/featured_tags/#get
type GetFeaturedTags_Suggestions ¶
type GetFeaturedTags_Suggestions struct {
Host string `header:"Host"`
}
GetFeaturedTags_Suggestions is the input for GET /api/v1/featured_tags/suggestions, which returns []FeaturedTag. https://docs.joinmastodon.org/methods/featured_tags/#suggestions
type GetFilter ¶
GetFilter is the input for GET /api/v2/filters/:id, which returns Filter. https://docs.joinmastodon.org/methods/filters/#get-one
type GetFilter_Keyword ¶
type GetFilter_Keyword struct {
Host string `header:"Host"`
ID string `param:"id"` // The ID of the FilterKeyword in the database.
}
GetFilter_Keyword is the input for GET /api/v2/filters/keywords/:id, which returns FilterKeyword. https://docs.joinmastodon.org/methods/filters/#keywords-get-one
type GetFilter_Keywords ¶
type GetFilter_Keywords struct {
Host string `header:"Host"`
FilterID string `param:"filter_id"` // The ID of the Filter in the database.
}
GetFilter_Keywords is the input for GET /api/v2/filters/:filter_id/keywords, which returns []FilterKeyword. https://docs.joinmastodon.org/methods/filters/#keywords-get
type GetFilter_Status ¶
type GetFilter_Status struct {
Host string `header:"Host"`
ID string `param:"id"` // The ID of the FilterStatus in the database.
}
GetFilter_Status is the input for GET /api/v2/filters/statuses/:id, which returns FilterStatus. https://docs.joinmastodon.org/methods/filters/#statuses-get-one
type GetFilter_Statuses ¶
type GetFilter_Statuses struct {
Host string `header:"Host"`
FilterID string `param:"filter_id"` // The ID of the Filter in the database.
}
GetFilter_Statuses is the input for GET /api/v2/filters/:filter_id/statuses, which returns []FilterStatus. https://docs.joinmastodon.org/methods/filters/#statuses-get
type GetFilter_V1 ¶
GetFilter_V1 is the input for GET /api/v1/filters/:id. https://docs.joinmastodon.org/methods/filters/#get-one-v1
type GetFilters ¶
type GetFilters struct {
Host string `header:"Host"`
}
GetFilters is the input for GET /api/v2/filters, which returns []Filter. https://docs.joinmastodon.org/methods/filters/#get
type GetFilters_V1 ¶
type GetFilters_V1 struct {
Host string `header:"Host"`
}
GetFilters_V1 is the input for GET /api/v1/filters. https://docs.joinmastodon.org/methods/filters/#get-v1
type GetFollowRequests ¶
type GetFollowRequests struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
MinID string `query:"min_id"`
SinceID string `query:"since_id"`
Limit int64 `query:"limit"`
}
GetFollowRequests is the input for GET /api/v1/follow_requests, which returns []Account. https://docs.joinmastodon.org/methods/follow_requests/#get
func (GetFollowRequests) QueryPage ¶
func (t GetFollowRequests) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetFollowedTags ¶
type GetFollowedTags struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetFollowedTags is the input for GET /api/v1/followed_tags, which returns []Tag. https://docs.joinmastodon.org/methods/followed_tags/#get
func (GetFollowedTags) QueryPage ¶
func (t GetFollowedTags) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetGroupedNotifications ¶ added in v0.6.0
type GetGroupedNotifications struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
Types []string `query:"types"`
ExcludeTypes []string `query:"exclude_types"`
AccountID string `query:"account_id"`
ExpandAccounts string `query:"expand_accounts"`
GroupedTypes []string `query:"grouped_types"`
IncludeFiltered bool `query:"include_filtered"`
SupportedTypes []string `query:"supported_types"`
}
GetGroupedNotifications is the input for GET /api/v2/notifications, which returns GroupedNotificationsResults. https://docs.joinmastodon.org/methods/grouped_notifications/#get-grouped
func (GetGroupedNotifications) QueryPage ¶ added in v0.6.0
func (t GetGroupedNotifications) QueryPage() QueryPage
type GetGroupedNotifications_UnreadCount ¶ added in v0.6.0
type GetGroupedNotifications_UnreadCount struct {
Host string `header:"Host"`
Limit int64 `query:"limit"`
Types []string `query:"types"`
ExcludeTypes []string `query:"exclude_types"`
AccountID string `query:"account_id"`
GroupedTypes []string `query:"grouped_types"`
}
GetGroupedNotifications_UnreadCount is the input for GET /api/v2/notifications/unread_count, which returns NotificationsUnreadCount. https://docs.joinmastodon.org/methods/grouped_notifications/#unread-group-count
type GetInstance ¶
type GetInstance struct {
Host string `header:"Host"`
}
GetInstance is the input for GET /api/v2/instance, which returns Instance. https://docs.joinmastodon.org/methods/instance/#v2
type GetInstance_Activity ¶
type GetInstance_Activity struct {
Host string `header:"Host"`
}
GetInstance_Activity is the input for GET /api/v1/instance/activity, which returns []map[string]any. https://docs.joinmastodon.org/methods/instance/#activity
type GetInstance_DomainBlocks ¶
type GetInstance_DomainBlocks struct {
Host string `header:"Host"`
}
GetInstance_DomainBlocks is the input for GET /api/v1/instance/domain_blocks, which returns []DomainBlock. https://docs.joinmastodon.org/methods/instance/#domain_blocks
type GetInstance_ExtendedDescription ¶
type GetInstance_ExtendedDescription struct {
Host string `header:"Host"`
}
GetInstance_ExtendedDescription is the input for GET /api/v1/instance/extended_description, which returns ExtendedDescription. https://docs.joinmastodon.org/methods/instance/#extended_description
type GetInstance_Peers ¶
type GetInstance_Peers struct {
Host string `header:"Host"`
}
GetInstance_Peers is the input for GET /api/v1/instance/peers, which returns []string. https://docs.joinmastodon.org/methods/instance/#peers
type GetInstance_Rules ¶
type GetInstance_Rules struct {
Host string `header:"Host"`
}
GetInstance_Rules is the input for GET /api/v1/instance/rules, which returns []Rule. https://docs.joinmastodon.org/methods/instance/#rules
type GetInstance_V1 ¶ added in v0.2.0
type GetInstance_V1 struct {
Host string `header:"Host"`
}
GetInstance_V1 is the input for GET /api/v1/instance, which returns Instance_V1. https://docs.joinmastodon.org/methods/instance/#v1
type GetList ¶
GetList is the input for GET /api/v1/lists/:id, which returns List. https://docs.joinmastodon.org/methods/lists/#get-one
type GetList_Accounts ¶
type GetList_Accounts struct {
Host string `header:"Host"`
ID string `param:"id"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetList_Accounts is the input for GET /api/v1/lists/:id/accounts, which returns []Account. https://docs.joinmastodon.org/methods/lists/#accounts
func (GetList_Accounts) QueryPage ¶
func (t GetList_Accounts) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetLists ¶
type GetLists struct {
Host string `header:"Host"`
}
GetLists is the input for GET /api/v1/lists, which returns []List. https://docs.joinmastodon.org/methods/lists/#get
type GetMarkers ¶
GetMarkers is the input for GET /api/v1/markers, which returns Marker. https://docs.joinmastodon.org/methods/markers/#get
type GetMedia ¶ added in v0.7.0
GetMedia is the input for GET /api/v1/media/:id, which returns MediaAttachment. https://docs.joinmastodon.org/methods/media/#get
type GetMutes ¶
type GetMutes struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
MinID string `query:"min_id"`
SinceID string `query:"since_id"`
Limit int64 `query:"limit"`
}
GetMutes is the input for GET /api/v1/mutes, which returns []Account. https://docs.joinmastodon.org/methods/mutes/#get
type GetNotification ¶
GetNotification is the input for GET /api/v1/notifications/:id, which returns Notification. https://docs.joinmastodon.org/methods/notifications/#get-one
type GetNotificationGroup ¶ added in v0.6.0
type GetNotificationGroup struct {
Host string `header:"Host"`
GroupKey string `param:"group_key"`
SupportedTypes []string `query:"supported_types"`
}
GetNotificationGroup is the input for GET /api/v2/notifications/:group_key, which returns GroupedNotificationsResults. https://docs.joinmastodon.org/methods/grouped_notifications/#get-notification-group
type GetNotificationPolicy ¶ added in v0.6.0
type GetNotificationPolicy struct {
Host string `header:"Host"`
}
GetNotificationPolicy is the input for GET /api/v2/notifications/policy, which returns NotificationPolicy. https://docs.joinmastodon.org/methods/notifications/#get-policy
type GetNotificationRequest ¶ added in v0.6.0
GetNotificationRequest is the input for GET /api/v1/notifications/requests/:id, which returns NotificationRequest. https://docs.joinmastodon.org/methods/notifications/#get-one-request
type GetNotificationRequests ¶ added in v0.6.0
type GetNotificationRequests struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetNotificationRequests is the input for GET /api/v1/notifications/requests, which returns []NotificationRequest. https://docs.joinmastodon.org/methods/notifications/#get-requests
func (GetNotificationRequests) QueryPage ¶ added in v0.6.0
func (t GetNotificationRequests) QueryPage() QueryPage
type GetNotificationRequests_Merged ¶ added in v0.6.0
type GetNotificationRequests_Merged struct {
Host string `header:"Host"`
}
GetNotificationRequests_Merged is the input for GET /api/v1/notifications/requests/merged, which returns NotificationRequestsMerged. https://docs.joinmastodon.org/methods/notifications/#requests-merged
type GetNotifications ¶
type GetNotifications struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
Types []string `query:"types[]"`
ExcludeTypes []string `query:"exclude_types[]"`
AccountID string `query:"account_id"`
}
GetNotifications is the input for GET /api/v1/notifications, which returns []Notification. https://docs.joinmastodon.org/methods/notifications/#get
func (GetNotifications) QueryPage ¶
func (t GetNotifications) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetNotifications_UnreadCount ¶ added in v0.6.0
type GetNotifications_UnreadCount struct {
Host string `header:"Host"`
Limit int `query:"limit"`
Types []string `query:"types[]"`
ExcludeTypes []string `query:"exclude_types[]"`
AccountID string `query:"account_id"`
}
GetNotifications_UnreadCount is the input for GET /api/v1/notifications/unread_count, which returns NotificationsUnreadCount. https://docs.joinmastodon.org/methods/notifications/#unread-count
type GetOAuth_Authorize ¶
type GetOAuth_Authorize struct {
Host string `header:"Host"`
ResponseType string `query:"response_type"`
ClientID string `query:"client_id"`
RedirectURI string `query:"redirect_uri"`
Scope string `query:"scope"`
ForceLogin bool `query:"force_login"`
Language string `query:"language"`
}
GetOAuth_Authorize is the input for GET /oauth/authorize, which returns Authorization code. https://docs.joinmastodon.org/methods/oauth/#authorize
type GetOEmbed ¶
type GetOEmbed struct {
Host string `header:"Host"`
URL string `query:"url"`
MaxWidth int `query:"maxwidth"`
MaxHeight int `query:"maxheight"`
}
GetOEmbed is the input for GET /api/oembed, which returns OEmbed metadata. https://docs.joinmastodon.org/methods/oembed/#get
type GetPoll ¶
GetPoll is the input for GET /api/v1/polls/:id, which returns Poll. https://docs.joinmastodon.org/methods/polls/#get
type GetPreferences ¶
type GetPreferences struct {
Host string `header:"Host"`
}
GetPreferences is the input for GET /api/v1/preferences, which returns Preferences. https://docs.joinmastodon.org/methods/preferences/#get
type GetPushSubscription ¶ added in v0.6.0
type GetPushSubscription struct {
Host string `header:"Host"`
}
GetPushSubscription is the input for GET /api/v1/push/subscription, which returns WebPushSubscription. https://docs.joinmastodon.org/methods/push/#get
type GetScheduledStatus ¶
GetScheduledStatus is the input for GET /api/v1/scheduled_statuses/:id, which returns ScheduledStatus. https://docs.joinmastodon.org/methods/scheduled_statuses/#get-one
type GetScheduledStatuses ¶
type GetScheduledStatuses struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetScheduledStatuses is the input for GET /api/v1/scheduled_statuses, which returns []ScheduledStatus. https://docs.joinmastodon.org/methods/scheduled_statuses/#get
func (GetScheduledStatuses) QueryPage ¶
func (t GetScheduledStatuses) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetSearch ¶
type GetSearch struct {
Host string `header:"Host"`
Q string `query:"q"`
Type string `query:"type"` // [accounts | hashtags | statuses]
Resolve bool `query:"resolve"`
Following bool `query:"following"`
AccountID string `query:"account_id"`
ExcludeUnreviewed bool `query:"exclude_unreviewed"`
MaxID string `query:"max_id"`
MinID string `query:"min_id"`
SinceID string `query:"since_id"`
Limit int64 `query:"limit"`
Offset int `query:"offset"`
}
GetSearch is the input for GET /api/v2/search, which returns Search. https://docs.joinmastodon.org/methods/search/#v2
type GetStatus ¶
GetStatus is the input for GET /api/v1/statuses/:id, which returns Status. https://docs.joinmastodon.org/methods/statuses/#get
type GetStatus_Context ¶
GetStatus_Context is the input for GET /api/v1/statuses/:id/context, which returns Context. https://docs.joinmastodon.org/methods/statuses/#context
type GetStatus_FavouritedBy ¶
type GetStatus_FavouritedBy struct {
Host string `header:"Host"`
ID string `param:"id"`
MaxID string `query:"max_id"`
MinID string `query:"min_id"`
SinceID string `query:"since_id"`
Limit int64 `query:"limit"`
}
GetStatus_FavouritedBy is the input for GET /api/v1/statuses/:id/favourited_by, which returns []Account. https://docs.joinmastodon.org/methods/statuses/#favourited_by
func (GetStatus_FavouritedBy) QueryPage ¶
func (t GetStatus_FavouritedBy) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetStatus_History ¶
GetStatus_History is the input for GET /api/v1/statuses/:id/history, which returns []StatusEdit. https://docs.joinmastodon.org/methods/statuses/#history
type GetStatus_RebloggedBy ¶
type GetStatus_RebloggedBy struct {
Host string `header:"Host"`
ID string `param:"id"`
MaxID string `query:"max_id"`
MinID string `query:"min_id"`
SinceID string `query:"since_id"`
Limit int64 `query:"limit"`
}
GetStatus_RebloggedBy is the input for GET /api/v1/statuses/:id/reblogged_by, which returns []Account. https://docs.joinmastodon.org/methods/statuses/#reblogged_by
func (GetStatus_RebloggedBy) QueryPage ¶
func (t GetStatus_RebloggedBy) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetStatus_Source ¶
GetStatus_Source is the input for GET /api/v1/statuses/:id/source, which returns StatusSource. https://docs.joinmastodon.org/methods/statuses/#source
type GetSuggestions ¶
GetSuggestions is the input for GET /api/v2/suggestions, which returns []Suggestion. https://docs.joinmastodon.org/methods/suggestions/#v2
type GetTag ¶
GetTag is the input for GET /api/v1/tags/:id, which returns Tag. https://docs.joinmastodon.org/methods/tags/#get
type GetTimeline_Hashtag ¶
type GetTimeline_Hashtag struct {
Host string `header:"Host"`
Hashtag string `param:"hashtag"`
Any []string `query:"any"`
All []string `query:"all"`
None []string `query:"none"`
Local bool `query:"local"`
Remote bool `query:"remote"`
OnlyMedia bool `query:"only_media"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetTimeline_Hashtag is the input for GET /api/v1/timelines/tag/:hashtag, which returns []Status. https://docs.joinmastodon.org/methods/timelines/#tag
func (GetTimeline_Hashtag) QueryPage ¶
func (t GetTimeline_Hashtag) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetTimeline_Home ¶
type GetTimeline_Home struct {
Host string `header:"Host"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetTimeline_Home is the input for GET /api/v1/timelines/home, which returns []Status. https://docs.joinmastodon.org/methods/timelines/#home
func (GetTimeline_Home) QueryPage ¶
func (t GetTimeline_Home) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetTimeline_List ¶
type GetTimeline_List struct {
Host string `header:"Host"`
ListID string `param:"list_id"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetTimeline_List is the input for GET /api/v1/timelines/list/:list_id, which returns []Status. https://docs.joinmastodon.org/methods/timelines/#list
func (GetTimeline_List) QueryPage ¶
func (t GetTimeline_List) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetTimeline_Public ¶
type GetTimeline_Public struct {
Host string `header:"Host"`
Local bool `query:"local"`
Remote bool `query:"remote"`
OnlyMedia bool `query:"only_media"`
MaxID string `query:"max_id"`
SinceID string `query:"since_id"`
MinID string `query:"min_id"`
Limit int64 `query:"limit"`
}
GetTimeline_Public is the input for GET /api/v1/timelines/public, which returns []Status. https://docs.joinmastodon.org/methods/timelines/#public
func (GetTimeline_Public) QueryPage ¶ added in v0.7.0
func (t GetTimeline_Public) QueryPage() QueryPage
QueryPage implements the QueryPager interface, returning the QueryPage data embedded in this transaction
type GetTrends ¶
type GetTrends struct {
Host string `header:"Host"`
Limit int `query:"limit"` // Maximum number of results to return. Defaults to 10 tags. Max 20 tags.
Offset int `query:"offset"` // Skip the first n results.
}
GetTrends is the input for GET /api/v1/trends, which returns []Tag. https://docs.joinmastodon.org/methods/trends/#tags
type GetTrends_Links ¶
type GetTrends_Links struct {
Host string `header:"Host"`
Limit int `query:"limit"` // Maximum number of results to return. Defaults to 10 tags. Max 20 tags.
Offset int `query:"offset"` // Skip the first n results.
}
GetTrends_Links is the input for GET /api/v1/trends/links, which returns []Link. https://docs.joinmastodon.org/methods/trends/#links
type GetTrends_Statuses ¶
type GetTrends_Statuses struct {
Host string `header:"Host"`
Limit int `query:"limit"` // Maximum number of results to return. Defaults to 10 tags. Max 20 tags.
Offset int `query:"offset"` // Skip the first n results.
}
GetTrends_Statuses is the input for GET /api/v1/trends/statuses, which returns []Status. https://docs.joinmastodon.org/methods/trends/#statuses
type PatchAccount_UpdateCredentials ¶
type PatchAccount_UpdateCredentials struct {
Host string `header:"Host"`
DisplayName *string `form:"display_name" json:"display_name"`
Note *string `form:"note" json:"note"`
Avatar *multipart.FileHeader `form:"avatar" json:"avatar"`
Header *multipart.FileHeader `form:"header" json:"header"`
Locked *bool `form:"locked" json:"locked"`
Bot *bool `form:"bot" json:"bot"`
Discoverable *bool `form:"discoverable" json:"discoverable"`
// FieldsAttributes replaces the profile fields, keyed by position ("0", "1", ...). Nil when not sent.
FieldsAttributes map[string]struct {
Name string `form:"name" json:"name"`
Value string `form:"value" json:"value"`
} `form:"fields_attributes" json:"fields_attributes"`
}
PatchAccount_UpdateCredentials is the input for PATCH /api/v1/accounts/update_credentials. https://docs.joinmastodon.org/methods/accounts/#update_credentials
Fields a client leaves out are nil, so a server can tell "not sent" from an empty or false value. Avatar and Header are the uploaded image files themselves (multipart/form-data).
type PatchCollection ¶ added in v0.6.0
type PatchCollection struct {
Host string `header:"Host"`
ID string `param:"id"`
Name string `form:"name" json:"name"`
Description string `form:"description" json:"description"`
Language string `form:"language" json:"language"`
TagName string `form:"tag_name" json:"tag_name"`
Sensitive bool `form:"sensitive" json:"sensitive"`
Discoverable bool `form:"discoverable" json:"discoverable"`
}
PatchCollection is the input for PATCH /api/v1/collections/:id, which returns Collection. https://docs.joinmastodon.org/methods/collections/#update_collection
type PatchNotificationPolicy ¶ added in v0.6.0
type PatchNotificationPolicy struct {
Host string `header:"Host"`
ForNotFollowing string `form:"for_not_following" json:"for_not_following"`
ForNotFollowers string `form:"for_not_followers" json:"for_not_followers"`
ForNewAccounts string `form:"for_new_accounts" json:"for_new_accounts"`
ForPrivateMentions string `form:"for_private_mentions" json:"for_private_mentions"`
ForLimitedAccounts string `form:"for_limited_accounts" json:"for_limited_accounts"`
ForBots string `form:"for_bots" json:"for_bots"`
}
PatchNotificationPolicy is the input for PATCH /api/v2/notifications/policy, which returns NotificationPolicy. https://docs.joinmastodon.org/methods/notifications/#update-policy
type PostAccount ¶
type PostAccount struct {
Host string `header:"Host"`
Username string `form:"username" json:"username"`
Email string `form:"email" json:"email"`
Password string `form:"password" json:"password"`
Agreement bool `form:"agreement" json:"agreement"`
Locale string `form:"locale" json:"locale"`
Reason string `form:"reason" json:"reason"`
}
PostAccount is the input for POST /api/v1/accounts, which returns Token. https://docs.joinmastodon.org/methods/accounts/#create
type PostAccount_Block ¶
PostAccount_Block is the input for POST /api/v1/accounts/:id/block, which returns Relationship. https://docs.joinmastodon.org/methods/accounts/#block
type PostAccount_Follow ¶
type PostAccount_Follow struct {
Host string `header:"Host"`
ID string `param:"id"`
Reblogs bool `form:"reblogs" json:"reblogs"`
Notify bool `form:"notify" json:"notify"`
Languages []string `form:"languages" json:"languages"`
}
PostAccount_Follow is the input for POST /api/v1/accounts/:id/follow. https://docs.joinmastodon.org/methods/accounts/#follow
type PostAccount_Mute ¶
type PostAccount_Mute struct {
Host string `header:"Host"`
ID string `param:"id"`
Notifications bool `form:"notifications" json:"notifications"`
Duration bool `form:"duration" json:"duration"`
}
PostAccount_Mute is the input for POST /api/v1/accounts/:id/mute, which returns Relationship. https://docs.joinmastodon.org/methods/accounts/#mute
type PostAccount_Note ¶
type PostAccount_Note struct {
Host string `header:"Host"`
ID string `param:"id"`
Comment string `form:"comment" json:"comment"`
}
PostAccount_Note is the input for POST /api/v1/accounts/:id/note, which returns Relationship. https://docs.joinmastodon.org/methods/accounts/#note
type PostAccount_Pin ¶
PostAccount_Pin is the input for POST /api/v1/accounts/:id/pin, which returns Relationship. https://docs.joinmastodon.org/methods/accounts/#pin
type PostAccount_RemoveFromFollowers ¶
PostAccount_RemoveFromFollowers is the input for POST /api/v1/accounts/:id/remove_from_followers, which returns Relationship. https://docs.joinmastodon.org/methods/accounts/#remove_from_followers
type PostAccount_Unblock ¶
PostAccount_Unblock is the input for POST /api/v1/accounts/:id/unblock, which returns Relationship. https://docs.joinmastodon.org/methods/accounts/#unblock
type PostAccount_Unfollow ¶
PostAccount_Unfollow is the input for POST /api/v1/accounts/:id/unfollow. https://docs.joinmastodon.org/methods/accounts/#unfollow
type PostAccount_Unmute ¶
PostAccount_Unmute is the input for POST /api/v1/accounts/:id/unmute, which returns Relationship. https://docs.joinmastodon.org/methods/accounts/#unmute
type PostAccount_Unpin ¶
PostAccount_Unpin is the input for POST /api/v1/accounts/:id/unpin, which returns Relationship. https://docs.joinmastodon.org/methods/accounts/#unpin
type PostAnnouncement_Dismiss ¶
type PostAnnouncement_Dismiss struct {
Host string `header:"Host"`
Authorization string `header:"Authorization"`
ID string `param:"id"`
}
PostAnnouncement_Dismiss is the input for POST /api/v1/announcements/:id/dismiss, which returns an empty object. https://docs.joinmastodon.org/methods/announcements/#dismiss
type PostApplication ¶
type PostApplication struct {
Host string `header:"Host"`
ClientName string `form:"client_name" json:"client_name"`
RedirectURIs string `form:"redirect_uris" json:"redirect_uris"`
Scopes string `form:"scopes" json:"scopes"`
Website string `form:"website" json:"website"`
}
PostApplication is the input for POST /api/v1/apps, which returns Application. https://docs.joinmastodon.org/methods/apps/#create
type PostCollection ¶ added in v0.6.0
type PostCollection struct {
Host string `header:"Host"`
Name string `form:"name" json:"name"`
Description string `form:"description" json:"description"`
Language string `form:"language" json:"language"`
TagName string `form:"tag_name" json:"tag_name"`
Sensitive bool `form:"sensitive" json:"sensitive"`
Discoverable bool `form:"discoverable" json:"discoverable"`
AccountIDs []string `form:"account_ids" json:"account_ids"`
}
PostCollection is the input for POST /api/v1/collections, which returns Collection. https://docs.joinmastodon.org/methods/collections/#create
type PostCollection_Item ¶ added in v0.6.0
type PostCollection_Item struct {
Host string `header:"Host"`
CollectionID string `param:"collection_id"`
AccountID string `form:"account_id" json:"account_id"`
}
PostCollection_Item is the input for POST /api/v1/collections/:collection_id/items, which returns CollectionItem. https://docs.joinmastodon.org/methods/collections/#add_account
type PostCollection_Item_Revoke ¶ added in v0.6.0
type PostCollection_Item_Revoke struct {
Host string `header:"Host"`
CollectionID string `param:"collection_id"`
ID string `param:"id"`
}
PostCollection_Item_Revoke is the input for POST /api/v1/collections/:collection_id/items/:id/revoke, which returns an empty object. https://docs.joinmastodon.org/methods/collections/#revoke_item
type PostConversationRead ¶
PostConversationRead is the input for POST /api/v1/conversations/:id/read, which returns Conversation. https://docs.joinmastodon.org/methods/conversations/#read
type PostDomainBlock ¶
type PostDomainBlock struct {
Host string `header:"Host"`
Domain string `form:"domain" json:"domain"`
}
PostDomainBlock is the input for POST /api/v1/domain_blocks, which returns an empty object. https://docs.joinmastodon.org/methods/domain_blocks/#block
type PostEmailConfirmation ¶
type PostEmailConfirmation struct {
Host string `header:"Host"`
}
PostEmailConfirmation is the input for POST /api/v1/email/confirmation, which returns an empty object. https://docs.joinmastodon.org/methods/emails/#confirmation
type PostFeaturedTag ¶
PostFeaturedTag is the input for POST /api/v1/featured_tags, which returns FeaturedTag. https://docs.joinmastodon.org/methods/featured_tags/#feature
type PostFilter ¶
type PostFilter struct {
Host string `header:"Host"`
Title string `form:"title" json:"title"`
Context []string `form:"context" json:"context"`
FilterAction string `form:"filter_action" json:"filter_action"`
ExpiresIn int `form:"expires_in" json:"expires_in"`
KeywordsAttributes []struct {
Host string `header:"Host"`
Keyword string `form:"keyword" json:"keyword"`
WholeWord bool `form:"whole_word" json:"whole_word"`
} `form:"keywords_attributes" json:"keywords_attributes"`
}
PostFilter is the input for POST /api/v2/filters, which returns Filter. https://docs.joinmastodon.org/methods/filters/#create
type PostFilter_Keyword ¶
type PostFilter_Keyword struct {
Host string `header:"Host"`
FilterID string `param:"filter_id"` // The ID of the Filter in the database.
Keyword string `form:"keyword" json:"keyword"` // The keyword to be added to the filter group.
WholeWord bool `form:"whole_word" json:"whole_word"` // Whether the keyword should consider word boundaries.
}
PostFilter_Keyword is the input for POST /api/v2/filters/:filter_id/keywords, which returns FilterKeyword. https://docs.joinmastodon.org/methods/filters/#keywords-create
type PostFilter_Status ¶
type PostFilter_Status struct {
Host string `header:"Host"`
FilterID string `param:"filter_id"` // The ID of the Filter in the database.
}
PostFilter_Status is the input for POST /api/v2/filters/:filter_id/statuses, which returns FilterStatus. https://docs.joinmastodon.org/methods/filters/#statuses-add
type PostFilter_V1 ¶
type PostFilter_V1 struct {
Host string `header:"Host"`
Phrase string `form:"phrase" json:"phrase"`
Context []string `form:"context" json:"context"`
Irreversible bool `form:"irreversible" json:"irreversible"`
WholeWord bool `form:"whole_word" json:"whole_word"`
ExpiresIn int `form:"expires_in" json:"expires_in"`
}
PostFilter_V1 is the input for POST /api/v1/filters. https://docs.joinmastodon.org/methods/filters/#create-v1
type PostFollowRequest_Authorize ¶
type PostFollowRequest_Authorize struct {
Host string `header:"Host"`
AccountID string `param:"account_id"`
}
PostFollowRequest_Authorize is the input for POST /api/v1/follow_requests/:account_id/authorize, which returns Relationship. https://docs.joinmastodon.org/methods/follow_requests/#accept
type PostFollowRequest_Reject ¶
type PostFollowRequest_Reject struct {
Host string `header:"Host"`
AccountID string `param:"account_id"`
}
PostFollowRequest_Reject is the input for POST /api/v1/follow_requests/:account_id/reject, which returns Relationship. https://docs.joinmastodon.org/methods/follow_requests/#reject
type PostGroupedNotifications_Clear ¶ added in v0.6.0
type PostGroupedNotifications_Clear struct {
Host string `header:"Host"`
}
PostGroupedNotifications_Clear is the input for POST /api/v2/notifications/clear, which returns an empty object. https://docs.joinmastodon.org/methods/notifications/#clear
type PostList ¶
type PostList struct {
Host string `header:"Host"`
Title string `form:"title" json:"title"`
RepliesPolicy string `form:"replies_policy" json:"replies_policy"`
Exclusive bool `form:"exclusive" json:"exclusive"`
}
PostList is the input for POST /api/v1/lists, which returns List. https://docs.joinmastodon.org/methods/lists/#create
type PostList_Accounts ¶
type PostList_Accounts struct {
Host string `header:"Host"`
ID string `param:"id"`
AccountIDs []string `form:"account_ids" json:"account_ids"`
}
PostList_Accounts is the input for POST /api/v1/lists/:id/accounts, which returns an empty object. https://docs.joinmastodon.org/methods/lists/#accounts-add
type PostMarker ¶
type PostMarker struct {
Host string `header:"Host"`
Home struct {
Host string `header:"Host"`
LastReadID string `form:"last_read_id" json:"last_read_id"`
} `form:"home" json:"home"`
Notifications struct {
Host string `header:"Host"`
LastReadID string `form:"last_read_id" json:"last_read_id"`
} `form:"notifications" json:"notifications"`
}
PostMarker is the input for POST /api/v1/markers, which returns Marker. https://docs.joinmastodon.org/methods/markers/#create
type PostMedia ¶
type PostMedia struct {
Host string `header:"Host"`
File *multipart.FileHeader `form:"file" json:"file"`
Thumbnail *multipart.FileHeader `form:"thumbnail" json:"thumbnail"`
Description string `form:"description" json:"description"`
Focus string `form:"focus" json:"focus"`
}
PostMedia is the input for POST /api/v2/media, which returns MediaAttachment. https://docs.joinmastodon.org/methods/media/#v2
type PostNotificationGroup_Dismiss ¶ added in v0.6.0
type PostNotificationGroup_Dismiss struct {
Host string `header:"Host"`
GroupKey string `param:"group_key"`
}
PostNotificationGroup_Dismiss is the input for POST /api/v2/notifications/:group_key/dismiss, which returns an empty object. https://docs.joinmastodon.org/methods/grouped_notifications/#dismiss-group
type PostNotificationRequest_Accept ¶ added in v0.6.0
PostNotificationRequest_Accept is the input for POST /api/v1/notifications/requests/:id/accept, which returns an empty object. https://docs.joinmastodon.org/methods/notifications/#accept-request
type PostNotificationRequest_Dismiss ¶ added in v0.6.0
PostNotificationRequest_Dismiss is the input for POST /api/v1/notifications/requests/:id/dismiss, which returns an empty object. https://docs.joinmastodon.org/methods/notifications/#dismiss-request
type PostNotificationRequests_Accept ¶ added in v0.6.0
type PostNotificationRequests_Accept struct {
Host string `header:"Host"`
ID []string `form:"id" json:"id"`
}
PostNotificationRequests_Accept is the input for POST /api/v1/notifications/requests/accept, which returns an empty object. https://docs.joinmastodon.org/methods/notifications/#accept-multiple-requests
type PostNotificationRequests_Dismiss ¶ added in v0.6.0
type PostNotificationRequests_Dismiss struct {
Host string `header:"Host"`
ID []string `form:"id" json:"id"`
}
PostNotificationRequests_Dismiss is the input for POST /api/v1/notifications/requests/dismiss, which returns an empty object. https://docs.joinmastodon.org/methods/notifications/#dismiss-multiple-requests
type PostNotification_Dismiss ¶
type PostNotification_Dismiss struct {
Host string `header:"Host"`
ID string `form:"id" json:"id"`
}
PostNotification_Dismiss is the input for POST /api/v1/notifications/dismiss, which returns an empty object. https://docs.joinmastodon.org/methods/notifications/#dismiss
type PostNotifications_Clear ¶
type PostNotifications_Clear struct {
Host string `header:"Host"`
}
PostNotifications_Clear is the input for POST /api/v1/notifications/clear, which returns an empty object. https://docs.joinmastodon.org/methods/notifications/#clear
type PostOAuth_Revoke ¶
type PostOAuth_Revoke struct {
Host string `header:"Host"`
ClientID string `form:"client_id" json:"client_id"`
ClientSecret string `form:"client_secret" json:"client_secret"`
Token string `form:"token" json:"token"`
}
PostOAuth_Revoke is the input for POST /oauth/revoke, which returns an empty object. https://docs.joinmastodon.org/methods/oauth/#revoke
type PostOAuth_Token ¶
type PostOAuth_Token struct {
Host string `header:"Host"`
GrantType string `form:"grant_type" json:"grant_type"`
Code string `form:"code" json:"code"`
ClientID string `form:"client_id" json:"client_id"`
ClientSecret string `form:"client_secret" json:"client_secret"`
RedirectURI string `form:"redirect_uri" json:"redirect_uri"`
Scope string `form:"scope" json:"scope"`
}
PostOAuth_Token is the input for POST /oauth/token, which returns Token. https://docs.joinmastodon.org/methods/oauth/#token
type PostPoll_Votes ¶
type PostPoll_Votes struct {
Host string `header:"Host"`
ID string `param:"id"`
Choices []int `json:"choices"`
}
PostPoll_Votes is the input for POST /api/v1/polls/:id/votes, which returns Poll. https://docs.joinmastodon.org/methods/polls/#vote
type PostPushSubscription ¶ added in v0.6.0
type PostPushSubscription struct {
Host string `header:"Host"`
Subscription struct {
Endpoint string `form:"endpoint" json:"endpoint"`
Keys struct {
P256dh string `form:"p256dh" json:"p256dh"`
Auth string `form:"auth" json:"auth"`
} `form:"keys" json:"keys"`
Standard bool `form:"standard" json:"standard"`
} `form:"subscription" json:"subscription"`
Data struct {
Alerts struct {
Mention bool `form:"mention" json:"mention"`
Quote bool `form:"quote" json:"quote"`
Status bool `form:"status" json:"status"`
Reblog bool `form:"reblog" json:"reblog"`
Follow bool `form:"follow" json:"follow"`
FollowRequest bool `form:"follow_request" json:"follow_request"`
Favourite bool `form:"favourite" json:"favourite"`
Poll bool `form:"poll" json:"poll"`
Update bool `form:"update" json:"update"`
QuotedUpdate bool `form:"quoted_update" json:"quoted_update"`
AdminSignUp bool `form:"admin.sign_up" json:"admin.sign_up"`
AdminReport bool `form:"admin.report" json:"admin.report"`
} `form:"alerts" json:"alerts"`
Policy string `form:"policy" json:"policy"`
} `form:"data" json:"data"`
}
PostPushSubscription is the input for POST /api/v1/push/subscription, which returns WebPushSubscription. https://docs.joinmastodon.org/methods/push/#create
type PostReport ¶
type PostReport struct {
Host string `header:"Host"`
AccountID string `form:"account_id" json:"account_id"`
StatusIDs []string `form:"status_ids" json:"status_ids"`
Comment string `form:"comment" json:"comment"`
Forward bool `form:"forward" json:"forward"`
Category string `form:"category" json:"category"`
RuleIDs []string `form:"rule_ids" json:"rule_ids"`
}
PostReport is the input for POST /api/v1/reports, which returns Report. https://docs.joinmastodon.org/methods/reports/#post
type PostStatus ¶
type PostStatus struct {
Host string `header:"Host"`
Status string `form:"status" json:"status"`
MediaIDs []string `form:"media_ids" json:"media_ids"`
Poll struct {
Host string `header:"Host"`
Options []string `form:"options" json:"options"`
ExpiresIn int `form:"expires_in" json:"expires_in"`
Multiple bool `form:"multiple" json:"multiple"`
HideTotals bool `form:"hide_totals" json:"hide_totals"`
} `form:"poll" json:"poll"`
InReplyToID string `form:"in_reply_to_id" json:"in_reply_to_id"`
Sensitive bool `form:"sensitive" json:"sensitive"`
SpoilerText string `form:"spoiler_text" json:"spoiler_text"`
Visibility string `form:"visibility" json:"visibility"` // [public | unlisted | private | direct]
Language string `form:"language" json:"language"` // ISO 629 2-letter language code
ScheduledAt string `form:"scheduled_at" json:"scheduled_at"` // ISO 8601 Datetime
}
PostStatus is the input for POST /api/v1/statuses, which returns Status. https://docs.joinmastodon.org/methods/statuses/#create
type PostStatus_Bookmark ¶
PostStatus_Bookmark is the input for POST /api/v1/statuses/:id/bookmark, which returns Status. https://docs.joinmastodon.org/methods/statuses/#bookmark
type PostStatus_Favourite ¶
PostStatus_Favourite is the input for POST /api/v1/statuses/:id/favourite, which returns Status. https://docs.joinmastodon.org/methods/statuses/#favourite
type PostStatus_Mute ¶
PostStatus_Mute is the input for POST /api/v1/statuses/:id/mute, which returns Status. https://docs.joinmastodon.org/methods/statuses/#mute
type PostStatus_Pin ¶
PostStatus_Pin is the input for POST /api/v1/statuses/:id/pin, which returns Status. https://docs.joinmastodon.org/methods/statuses/#pin
type PostStatus_Reblog ¶
type PostStatus_Reblog struct {
Host string `header:"Host"`
ID string `param:"id"`
Visibility string `form:"visibility" json:"visibility"` // [public | unlisted | private]
}
PostStatus_Reblog is the input for POST /api/v1/statuses/:id/reblog, which returns Status. https://docs.joinmastodon.org/methods/statuses/#reblog
type PostStatus_Translate ¶
type PostStatus_Translate struct {
Host string `header:"Host"`
ID string `param:"id"`
Lang string `form:"lang" json:"lang"`
}
PostStatus_Translate is the input for POST /api/v1/statuses/:id/translate, which returns Status. https://docs.joinmastodon.org/methods/statuses/#translate
type PostStatus_Unbookmark ¶
PostStatus_Unbookmark is the input for POST /api/v1/statuses/:id/unbookmark, which returns Status. https://docs.joinmastodon.org/methods/statuses/#unbookmark
type PostStatus_Unfavourite ¶
PostStatus_Unfavourite is the input for POST /api/v1/statuses/:id/unfavourite, which returns Status. https://docs.joinmastodon.org/methods/statuses/#unfavourite
type PostStatus_Unmute ¶
PostStatus_Unmute is the input for POST /api/v1/statuses/:id/unmute, which returns Status. https://docs.joinmastodon.org/methods/statuses/#unmute
type PostStatus_Unpin ¶
PostStatus_Unpin is the input for POST /api/v1/statuses/:id/unpin, which returns Status. https://docs.joinmastodon.org/methods/statuses/#unpin
type PostStatus_Unreblog ¶
PostStatus_Unreblog is the input for POST /api/v1/statuses/:id/unreblog, which returns Status. https://docs.joinmastodon.org/methods/statuses/#unreblog
type PostTag_Follow ¶
PostTag_Follow is the input for POST /api/v1/tags/:id/follow, which returns Tag. https://docs.joinmastodon.org/methods/tags/#follow
type PostTag_Unfollow ¶
PostTag_Unfollow is the input for POST /api/v1/tags/:id/unfollow, which returns Tag. https://docs.joinmastodon.org/methods/tags/#unfollow
type PutAnnouncement_Reaction ¶
type PutAnnouncement_Reaction struct {
Host string `header:"Host"`
ID string `param:"id"`
Name string `param:"name"`
}
PutAnnouncement_Reaction is the input for PUT /api/v1/announcements/:id/reactions/:name, which returns an empty object. https://docs.joinmastodon.org/methods/announcements/#put-reactions
type PutFilter ¶
type PutFilter struct {
Host string `header:"Host"`
ID string `param:"id"` // The ID of the Filter in the database.
Title string `form:"title" json:"title"` // The name of the filter group.
Context []string `form:"context" json:"context"` // Where the filter should be applied. Specify at least one of home, notifications, public, thread, account.
FilterAction string `form:"filter_action" json:"filter_action"` // The policy to be applied when the filter is matched. Specify warn or hide.
ExpiresIn int `form:"expires_in" json:"expires_in"` // How many seconds from now should the filter expire?
KeywordsAttributes []struct {
Host string `header:"Host"`
Keyword string `form:"keyword" json:"keyword"` // A keyword to be added to the newly-created filter group.
WholeWord bool `form:"whole_word" json:"whole_word"` // Whether the keyword should consider word boundaries.
ID string `form:"id" json:"id"` // Provide the ID of an existing keyword to modify it, instead of creating a new keyword.
Destroy bool `form:"_destroy" json:"_destroy"` // If true, will remove the keyword with the given ID.
} `form:"keywords_attributes" json:"keywords_attributes"`
}
PutFilter is the input for PUT /api/v2/filters/:id, which returns Filter. https://docs.joinmastodon.org/methods/filters/#update
type PutFilter_Keyword ¶
type PutFilter_Keyword struct {
Host string `header:"Host"`
ID string `param:"id"` // The ID of the FilterKeyword in the database.
Keyword string `form:"keyword" json:"keyword"` // The keyword to be added to the filter group.
WholeWord bool `form:"whole_word" json:"whole_word"` // Whether the keyword should consider word boundaries.
}
PutFilter_Keyword is the input for PUT /api/v2/filters/keywords/:id, which returns FilterKeyword. https://docs.joinmastodon.org/methods/filters/#keywords-update
type PutFilter_V1 ¶
type PutFilter_V1 struct {
Host string `header:"Host"`
ID string `param:"id"`
Phrase string `form:"phrase" json:"phrase"`
Context []string `form:"context" json:"context"`
Irreversible bool `form:"irreversible" json:"irreversible"`
WholeWord bool `form:"whole_word" json:"whole_word"`
ExpiresIn int `form:"expires_in" json:"expires_in"`
}
PutFilter_V1 is the input for PUT /api/v1/filters/:id. https://docs.joinmastodon.org/methods/filters/#update-v1
type PutList ¶
type PutList struct {
Host string `header:"Host"`
ID string `param:"id"`
Title string `form:"title" json:"title"`
RepliesPolicy string `form:"replies_policy" json:"replies_policy"`
}
PutList is the input for PUT /api/v1/lists/:id, which returns List. https://docs.joinmastodon.org/methods/lists/#update
type PutMedia ¶ added in v0.7.0
type PutMedia struct {
Host string `header:"Host"`
ID string `param:"id"`
Description string `form:"description" json:"description"`
Focus string `form:"focus" json:"focus"`
}
PutMedia is the input for PUT /api/v1/media/:id, which returns MediaAttachment. https://docs.joinmastodon.org/methods/media/#update
type PutPushSubscription ¶ added in v0.6.0
type PutPushSubscription struct {
Host string `header:"Host"`
Data struct {
Alerts struct {
Mention bool `form:"mention" json:"mention"`
Quote bool `form:"quote" json:"quote"`
Status bool `form:"status" json:"status"`
Reblog bool `form:"reblog" json:"reblog"`
Follow bool `form:"follow" json:"follow"`
FollowRequest bool `form:"follow_request" json:"follow_request"`
Favourite bool `form:"favourite" json:"favourite"`
Poll bool `form:"poll" json:"poll"`
Update bool `form:"update" json:"update"`
QuotedUpdate bool `form:"quoted_update" json:"quoted_update"`
AdminSignUp bool `form:"admin.sign_up" json:"admin.sign_up"`
AdminReport bool `form:"admin.report" json:"admin.report"`
} `form:"alerts" json:"alerts"`
Policy string `form:"policy" json:"policy"`
} `form:"data" json:"data"`
}
PutPushSubscription is the input for PUT /api/v1/push/subscription, which returns WebPushSubscription. https://docs.joinmastodon.org/methods/push/#update
type PutScheduledStatus ¶
type PutScheduledStatus struct {
Host string `header:"Host"`
ID string `param:"id"`
ScheduledAt string `form:"scheduled_at" json:"scheduled_at"` // ISO 8601 Datetime
}
PutScheduledStatus is the input for PUT /api/v1/scheduled_statuses/:id, which returns ScheduledStatus. https://docs.joinmastodon.org/methods/scheduled_statuses/#update
type PutStatus ¶
type PutStatus struct {
Host string `header:"Host"`
ID string `param:"id"`
Status string `form:"status" json:"status"`
SpoilerText string `form:"spoiler_text" json:"spoiler_text"`
Sensitive bool `form:"sensitive" json:"sensitive"`
Language string `form:"language" json:"language"`
MediaIDs []string `form:"media_ids[]" json:"media_ids"`
Poll struct {
Host string `header:"Host"`
Options []string `form:"options[]" json:"options"`
ExpiresIn int `form:"expires_in" json:"expires_in"`
Multiple bool `form:"multiple" json:"multiple"`
HideTotals bool `form:"hide_totals" json:"hide_totals"`
} `form:"poll" json:"poll"`
}
PutStatus is the input for PUT /api/v1/statuses/:id, which returns Status. https://docs.joinmastodon.org/methods/statuses/#edit
type QueryPage ¶
type QueryPage struct {
Limit int64 `query:"limit"` // The maximum number of results to return. Usually, there is a default limit and a maximum limit; these will vary according to the API method.
MaxID string `query:"max_id"` // All results returned will be lesser than this ID. In effect, sets an upper bound on results.
MinID string `query:"min_id"` // Returns results immediately newer than this ID. In effect, sets a cursor at this ID and paginates forward.
SinceID string `query:"since_id"` // All results returned will be greater than this ID. In effect, sets a lower bound on results.
}
QueryPage represents the query parameters that are common to many Mastodon API calls. Many API methods allow you to paginate for more information, using parameters such as limit, max_id, min_id, and since_id. https://docs.joinmastodon.org/api/guidelines/#pagination
type QueryPager ¶
type QueryPager interface {
// QueryPage extracts the query page data from an object
QueryPage() QueryPage
}
QueryPager wraps the QueryPage method, and is implemented by all "query" transactions
Source Files
¶
- accounts.go
- admin-.go
- admin-accounts.go
- admin-canonical-email-blocks.go
- admin-dimensions.go
- admin-domain-allows.go
- admin-domain-blocks.go
- admin-email-blocks.go
- admin-ip-blocks.go
- admin-measures.go
- admin-reports.go
- admin-retention.go
- admin-trends.go
- announcements.go
- apps.go
- blocks.go
- bookmarks.go
- collections.go
- conversations.go
- custom-emojis.go
- directory.go
- doc.go
- domain-blocks.go
- emails.go
- endorsements.go
- favourites.go
- featured-tags.go
- filters.go
- follow-requests.go
- followed-tags.go
- grouped-notifications.go
- instance.go
- lists.go
- markers.go
- media.go
- mutes.go
- notifications.go
- oauth.go
- oembed.go
- polls.go
- preferences.go
- profile.go
- push.go
- queryPage.go
- reports.go
- scheduled-statuses.go
- search.go
- statuses.go
- streaming.go
- suggestions.go
- tags.go
- timelines.go
- trends.go