Documentation ¶
Index ¶
- Variables
- type AddAdmin
- type AddAdminResponse
- type AddModToCommunity
- type AddModToCommunityResponse
- type AdminPurgeComment
- type AdminPurgeCommentView
- type AdminPurgeCommunity
- type AdminPurgeCommunityView
- type AdminPurgePerson
- type AdminPurgePersonView
- type AdminPurgePost
- type AdminPurgePostView
- type ApproveRegistrationApplication
- type BanFromCommunity
- type BanFromCommunityResponse
- type BanPerson
- type BanPersonResponse
- type BannedPersonsResponse
- type BlockCommunity
- type BlockCommunityResponse
- type BlockInstance
- type BlockInstanceResponse
- type BlockPerson
- type BlockPersonResponse
- type CaptchaResponse
- type ChangePassword
- type Client
- func (c *Client) AddAdmin(ctx context.Context, data AddAdmin) (*AddAdminResponse, error)
- func (c *Client) AddModToCommunity(ctx context.Context, data AddModToCommunity) (*AddModToCommunityResponse, error)
- func (c *Client) ApproveRegistrationApplication(ctx context.Context, data ApproveRegistrationApplication) (*RegistrationApplicationResponse, error)
- func (c *Client) BanFromCommunity(ctx context.Context, data BanFromCommunity) (*BanFromCommunityResponse, error)
- func (c *Client) BanPerson(ctx context.Context, data BanPerson) (*BanPersonResponse, error)
- func (c *Client) BannedPersons(ctx context.Context) (*BannedPersonsResponse, error)
- func (c *Client) BlockCommunity(ctx context.Context, data BlockCommunity) (*BlockCommunityResponse, error)
- func (c *Client) BlockInstance(ctx context.Context, data BlockInstance) (*BlockInstanceResponse, error)
- func (c *Client) BlockPerson(ctx context.Context, data BlockPerson) (*BlockPersonResponse, error)
- func (c *Client) Captcha(ctx context.Context) (*GetCaptchaResponse, error)
- func (c *Client) ChangePassword(ctx context.Context, data ChangePassword) (*LoginResponse, error)
- func (c *Client) ClientLogin(ctx context.Context, data Login) error
- func (c *Client) Comment(ctx context.Context, data GetComment) (*CommentResponse, error)
- func (c *Client) CommentReports(ctx context.Context, data ListCommentReports) (*ListCommentReportsResponse, error)
- func (c *Client) Comments(ctx context.Context, data GetComments) (*GetCommentsResponse, error)
- func (c *Client) Communities(ctx context.Context, data ListCommunities) (*ListCommunitiesResponse, error)
- func (c *Client) Community(ctx context.Context, data GetCommunity) (*GetCommunityResponse, error)
- func (c *Client) CreateComment(ctx context.Context, data CreateComment) (*CommentResponse, error)
- func (c *Client) CreateCommentReport(ctx context.Context, data CreateCommentReport) (*CommentReportResponse, error)
- func (c *Client) CreateCommunity(ctx context.Context, data CreateCommunity) (*CommunityResponse, error)
- func (c *Client) CreateCustomEmoji(ctx context.Context, data CreateCustomEmoji) (*CustomEmojiResponse, error)
- func (c *Client) CreatePost(ctx context.Context, data CreatePost) (*PostResponse, error)
- func (c *Client) CreatePostReport(ctx context.Context, data CreatePostReport) (*PostReportResponse, error)
- func (c *Client) CreatePrivateMessage(ctx context.Context, data CreatePrivateMessage) (*PrivateMessageResponse, error)
- func (c *Client) CreatePrivateMessageReport(ctx context.Context, data CreatePrivateMessageReport) (*PrivateMessageReportResponse, error)
- func (c *Client) CreateSite(ctx context.Context, data CreateSite) (*SiteResponse, error)
- func (c *Client) DeleteAccount(ctx context.Context, data DeleteAccount) (*SuccessResponse, error)
- func (c *Client) DeleteComment(ctx context.Context, data DeleteComment) (*CommentResponse, error)
- func (c *Client) DeleteCommunity(ctx context.Context, data DeleteCommunity) (*CommunityResponse, error)
- func (c *Client) DeleteCustomEmoji(ctx context.Context, data DeleteCustomEmoji) (*SuccessResponse, error)
- func (c *Client) DeletePost(ctx context.Context, data DeletePost) (*PostResponse, error)
- func (c *Client) DeletePrivateMessage(ctx context.Context, data DeletePrivateMessage) (*PrivateMessageResponse, error)
- func (c *Client) DistinguishComment(ctx context.Context, data DistinguishComment) (*CommentResponse, error)
- func (c *Client) EditComment(ctx context.Context, data EditComment) (*CommentResponse, error)
- func (c *Client) EditCommunity(ctx context.Context, data EditCommunity) (*CommunityResponse, error)
- func (c *Client) EditCustomEmoji(ctx context.Context, data EditCustomEmoji) (*CustomEmojiResponse, error)
- func (c *Client) EditPost(ctx context.Context, data EditPost) (*PostResponse, error)
- func (c *Client) EditPrivateMessage(ctx context.Context, data EditPrivateMessage) (*PrivateMessageResponse, error)
- func (c *Client) EditSite(ctx context.Context, data EditSite) (*SiteResponse, error)
- func (c *Client) ExportSettings(ctx context.Context) error
- func (c *Client) FeaturePost(ctx context.Context, data FeaturePost) (*PostResponse, error)
- func (c *Client) FederatedInstances(ctx context.Context) (*GetFederatedInstancesResponse, error)
- func (c *Client) FollowCommunity(ctx context.Context, data FollowCommunity) (*CommunityResponse, error)
- func (c *Client) HideCommunity(ctx context.Context, data HideCommunity) (*SuccessResponse, error)
- func (c *Client) ImportSettings(ctx context.Context) (*SuccessResponse, error)
- func (c *Client) LeaveAdmin(ctx context.Context) (*GetSiteResponse, error)
- func (c *Client) LikeComment(ctx context.Context, data CreateCommentLike) (*CommentResponse, error)
- func (c *Client) LikePost(ctx context.Context, data CreatePostLike) (*PostResponse, error)
- func (c *Client) LockPost(ctx context.Context, data LockPost) (*PostResponse, error)
- func (c *Client) Login(ctx context.Context, data Login) (*LoginResponse, error)
- func (c *Client) Logins(ctx context.Context) error
- func (c *Client) MarkAllAsRead(ctx context.Context) (*GetRepliesResponse, error)
- func (c *Client) MarkCommentReplyAsRead(ctx context.Context, data MarkCommentReplyAsRead) (*CommentReplyResponse, error)
- func (c *Client) MarkPersonMentionAsRead(ctx context.Context, data MarkPersonMentionAsRead) (*PersonMentionResponse, error)
- func (c *Client) MarkPostAsRead(ctx context.Context, data MarkPostAsRead) (*SuccessResponse, error)
- func (c *Client) MarkPrivateMessageAsRead(ctx context.Context, data MarkPrivateMessageAsRead) (*PrivateMessageResponse, error)
- func (c *Client) Modlog(ctx context.Context, data GetModlog) (*GetModlogResponse, error)
- func (c *Client) PasswordChangeAfterReset(ctx context.Context, data PasswordChangeAfterReset) (*SuccessResponse, error)
- func (c *Client) PasswordReset(ctx context.Context, data PasswordReset) (*SuccessResponse, error)
- func (c *Client) PersonDetails(ctx context.Context, data GetPersonDetails) (*GetPersonDetailsResponse, error)
- func (c *Client) PersonMentions(ctx context.Context, data GetPersonMentions) (*GetPersonMentionsResponse, error)
- func (c *Client) Post(ctx context.Context, data GetPost) (*GetPostResponse, error)
- func (c *Client) PostReports(ctx context.Context, data ListPostReports) (*ListPostReportsResponse, error)
- func (c *Client) Posts(ctx context.Context, data GetPosts) (*GetPostsResponse, error)
- func (c *Client) PrivateMessageReports(ctx context.Context, data ListPrivateMessageReports) (*ListPrivateMessageReportsResponse, error)
- func (c *Client) PrivateMessages(ctx context.Context, data GetPrivateMessages) (*PrivateMessagesResponse, error)
- func (c *Client) PurgeComment(ctx context.Context, data PurgeComment) (*SuccessResponse, error)
- func (c *Client) PurgeCommunity(ctx context.Context, data PurgeCommunity) (*SuccessResponse, error)
- func (c *Client) PurgePerson(ctx context.Context, data PurgePerson) (*SuccessResponse, error)
- func (c *Client) PurgePost(ctx context.Context, data PurgePost) (*SuccessResponse, error)
- func (c *Client) Register(ctx context.Context, data Register) (*LoginResponse, error)
- func (c *Client) RegistrationApplications(ctx context.Context, data ListRegistrationApplications) (*ListRegistrationApplicationsResponse, error)
- func (c *Client) RemoveComment(ctx context.Context, data RemoveComment) (*CommentResponse, error)
- func (c *Client) RemoveCommunity(ctx context.Context, data RemoveCommunity) (*CommunityResponse, error)
- func (c *Client) RemovePost(ctx context.Context, data RemovePost) (*PostResponse, error)
- func (c *Client) Replies(ctx context.Context, data GetReplies) (*GetRepliesResponse, error)
- func (c *Client) ReportCount(ctx context.Context, data GetReportCount) (*GetReportCountResponse, error)
- func (c *Client) ResolveCommentReport(ctx context.Context, data ResolveCommentReport) (*CommentReportResponse, error)
- func (c *Client) ResolveObject(ctx context.Context, data ResolveObject) (*ResolveObjectResponse, error)
- func (c *Client) ResolvePostReport(ctx context.Context, data ResolvePostReport) (*PostReportResponse, error)
- func (c *Client) ResolvePrivateMessageReport(ctx context.Context, data ResolvePrivateMessageReport) (*PrivateMessageReportResponse, error)
- func (c *Client) SaveComment(ctx context.Context, data SaveComment) (*CommentResponse, error)
- func (c *Client) SavePost(ctx context.Context, data SavePost) (*PostResponse, error)
- func (c *Client) SaveUserSettings(ctx context.Context, data SaveUserSettings) (*SuccessResponse, error)
- func (c *Client) Search(ctx context.Context, data Search) (*SearchResponse, error)
- func (c *Client) Site(ctx context.Context) (*GetSiteResponse, error)
- func (c *Client) SiteMetadata(ctx context.Context, data GetSiteMetadata) (*GetSiteMetadataResponse, error)
- func (c *Client) TransferCommunity(ctx context.Context, data TransferCommunity) (*GetCommunityResponse, error)
- func (c *Client) UnreadCount(ctx context.Context) (*GetUnreadCountResponse, error)
- func (c *Client) UnreadRegistrationApplicationCount(ctx context.Context) (*GetUnreadRegistrationApplicationCountResponse, error)
- func (c *Client) ValidateAuth(ctx context.Context) (*SuccessResponse, error)
- func (c *Client) VerifyEmail(ctx context.Context, data VerifyEmail) (*SuccessResponse, error)
- type Comment
- type CommentAggregates
- type CommentReply
- type CommentReplyResponse
- type CommentReplyView
- type CommentReport
- type CommentReportResponse
- type CommentReportView
- type CommentResponse
- type CommentSortType
- type CommentView
- type Community
- type CommunityAggregates
- type CommunityBlockView
- type CommunityFollowerView
- type CommunityModeratorView
- type CommunityResponse
- type CommunityView
- type CreateComment
- type CreateCommentLike
- type CreateCommentReport
- type CreateCommunity
- type CreateCustomEmoji
- type CreatePost
- type CreatePostLike
- type CreatePostReport
- type CreatePrivateMessage
- type CreatePrivateMessageReport
- type CreateSite
- type CustomEmoji
- type CustomEmojiKeyword
- type CustomEmojiResponse
- type CustomEmojiView
- type DeleteAccount
- type DeleteComment
- type DeleteCommunity
- type DeleteCustomEmoji
- type DeletePost
- type DeletePrivateMessage
- type DistinguishComment
- type EditComment
- type EditCommunity
- type EditCustomEmoji
- type EditPost
- type EditPrivateMessage
- type EditSite
- type Error
- type FeaturePost
- type FederatedInstances
- type FollowCommunity
- type GetCaptchaResponse
- type GetComment
- type GetComments
- type GetCommentsResponse
- type GetCommunity
- type GetCommunityResponse
- type GetFederatedInstancesResponse
- type GetModlog
- type GetModlogResponse
- type GetPersonDetails
- type GetPersonDetailsResponse
- type GetPersonMentions
- type GetPersonMentionsResponse
- type GetPost
- type GetPostResponse
- type GetPosts
- type GetPostsResponse
- type GetPrivateMessages
- type GetReplies
- type GetRepliesResponse
- type GetReportCount
- type GetReportCountResponse
- type GetSiteMetadata
- type GetSiteMetadataResponse
- type GetSiteResponse
- type GetUnreadCountResponse
- type GetUnreadRegistrationApplicationCountResponse
- type HideCommunity
- type Instance
- type InstanceBlockView
- type InstanceWithFederationState
- type Language
- type ListCommentReports
- type ListCommentReportsResponse
- type ListCommunities
- type ListCommunitiesResponse
- type ListPostReports
- type ListPostReportsResponse
- type ListPrivateMessageReports
- type ListPrivateMessageReportsResponse
- type ListRegistrationApplications
- type ListRegistrationApplicationsResponse
- type ListingType
- type LocalSite
- type LocalSiteRateLimit
- type LocalUser
- type LocalUserView
- type LockPost
- type Login
- type LoginResponse
- type MarkCommentReplyAsRead
- type MarkPersonMentionAsRead
- type MarkPostAsRead
- type MarkPrivateMessageAsRead
- type ModAdd
- type ModAddCommunity
- type ModAddCommunityView
- type ModAddView
- type ModBan
- type ModBanFromCommunity
- type ModBanFromCommunityView
- type ModBanView
- type ModFeaturePost
- type ModFeaturePostView
- type ModHideCommunity
- type ModHideCommunityView
- type ModLockPost
- type ModLockPostView
- type ModRemoveComment
- type ModRemoveCommentView
- type ModRemoveCommunity
- type ModRemoveCommunityView
- type ModRemovePost
- type ModRemovePostView
- type ModTransferCommunity
- type ModTransferCommunityView
- type ModlogActionType
- type MyUserInfo
- type Optional
- func (o Optional[T]) EncodeValues(key string, v *url.Values) error
- func (o Optional[T]) GoString() string
- func (o Optional[T]) IsValid() bool
- func (o Optional[T]) MarshalJSON() ([]byte, error)
- func (o Optional[T]) Set(v T) Optional[T]
- func (o Optional[T]) SetNil() Optional[T]
- func (o Optional[T]) String() string
- func (o *Optional[T]) UnmarshalJSON(b []byte) error
- func (o Optional[T]) Value() (T, bool)
- func (o Optional[T]) ValueOr(fallback T) T
- func (o Optional[T]) ValueOrZero() T
- type PasswordChangeAfterReset
- type PasswordReset
- type Person
- type PersonAggregates
- type PersonBlockView
- type PersonMention
- type PersonMentionResponse
- type PersonMentionView
- type PersonView
- type Post
- type PostAggregates
- type PostFeatureType
- type PostListingMode
- type PostReport
- type PostReportResponse
- type PostReportView
- type PostResponse
- type PostView
- type PrivateMessage
- type PrivateMessageReport
- type PrivateMessageReportResponse
- type PrivateMessageReportView
- type PrivateMessageResponse
- type PrivateMessageView
- type PrivateMessagesResponse
- type PurgeComment
- type PurgeCommunity
- type PurgePerson
- type PurgePost
- type ReadableFederationState
- type Register
- type RegistrationApplication
- type RegistrationApplicationResponse
- type RegistrationApplicationView
- type RegistrationMode
- type RemoveComment
- type RemoveCommunity
- type RemovePost
- type ResolveCommentReport
- type ResolveObject
- type ResolveObjectResponse
- type ResolvePostReport
- type ResolvePrivateMessageReport
- type SaveComment
- type SavePost
- type SaveUserSettings
- type Search
- type SearchResponse
- type SearchType
- type Site
- type SiteAggregates
- type SiteMetadata
- type SiteResponse
- type SiteView
- type SortType
- type SubscribedType
- type SuccessResponse
- type Tagline
- type TransferCommunity
- type VerifyEmail
Constants ¶
This section is empty.
Variables ¶
var ErrNoToken = errors.New("the server didn't provide a token value in its response")
ErrNoToken is an error returned by ClientLogin if the server sends a null or empty token
Functions ¶
This section is empty.
Types ¶
type AddAdminResponse ¶ added in v0.19.0
type AddAdminResponse struct { Admins []PersonView `json:"admins" url:"admins,omitempty"` Error Optional[string] `json:"error"` }
type AddModToCommunity ¶ added in v0.19.0
type AddModToCommunityResponse ¶ added in v0.19.0
type AddModToCommunityResponse struct { Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"` Error Optional[string] `json:"error"` }
type AdminPurgeComment ¶ added in v0.19.0
type AdminPurgeComment struct { AdminPersonID int64 `json:"admin_person_id" url:"admin_person_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` PostID int64 `json:"post_id" url:"post_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type AdminPurgeCommentView ¶ added in v0.19.0
type AdminPurgeCommentView struct { Admin Optional[Person] `json:"admin" url:"admin,omitempty"` AdminPurgeComment AdminPurgeComment `json:"admin_purge_comment" url:"admin_purge_comment,omitempty"` Post Post `json:"post" url:"post,omitempty"` }
type AdminPurgeCommunity ¶ added in v0.19.0
type AdminPurgeCommunityView ¶ added in v0.19.0
type AdminPurgeCommunityView struct { Admin Optional[Person] `json:"admin" url:"admin,omitempty"` AdminPurgeCommunity AdminPurgeCommunity `json:"admin_purge_community" url:"admin_purge_community,omitempty"` }
type AdminPurgePerson ¶ added in v0.19.0
type AdminPurgePersonView ¶ added in v0.19.0
type AdminPurgePersonView struct { Admin Optional[Person] `json:"admin" url:"admin,omitempty"` AdminPurgePerson AdminPurgePerson `json:"admin_purge_person" url:"admin_purge_person,omitempty"` }
type AdminPurgePost ¶ added in v0.19.0
type AdminPurgePost struct { AdminPersonID int64 `json:"admin_person_id" url:"admin_person_id,omitempty"` CommunityID int64 `json:"community_id" url:"community_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type AdminPurgePostView ¶ added in v0.19.0
type AdminPurgePostView struct { Admin Optional[Person] `json:"admin" url:"admin,omitempty"` AdminPurgePost AdminPurgePost `json:"admin_purge_post" url:"admin_purge_post,omitempty"` Community Community `json:"community" url:"community,omitempty"` }
type ApproveRegistrationApplication ¶ added in v0.19.0
type BanFromCommunity ¶ added in v0.19.0
type BanFromCommunity struct { Ban bool `json:"ban" url:"ban,omitempty"` CommunityID int64 `json:"community_id" url:"community_id,omitempty"` Expires Optional[int64] `json:"expires" url:"expires,omitempty"` PersonID int64 `json:"person_id" url:"person_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` RemoveData Optional[bool] `json:"remove_data" url:"remove_data,omitempty"` }
type BanFromCommunityResponse ¶ added in v0.19.0
type BanFromCommunityResponse struct { Banned bool `json:"banned" url:"banned,omitempty"` PersonView PersonView `json:"person_view" url:"person_view,omitempty"` Error Optional[string] `json:"error"` }
type BanPerson ¶ added in v0.19.0
type BanPerson struct { Ban bool `json:"ban" url:"ban,omitempty"` Expires Optional[int64] `json:"expires" url:"expires,omitempty"` PersonID int64 `json:"person_id" url:"person_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` RemoveData Optional[bool] `json:"remove_data" url:"remove_data,omitempty"` }
type BanPersonResponse ¶ added in v0.19.0
type BanPersonResponse struct { Banned bool `json:"banned" url:"banned,omitempty"` PersonView PersonView `json:"person_view" url:"person_view,omitempty"` Error Optional[string] `json:"error"` }
type BannedPersonsResponse ¶ added in v0.19.0
type BannedPersonsResponse struct { Banned []PersonView `json:"banned" url:"banned,omitempty"` Error Optional[string] `json:"error"` }
type BlockCommunity ¶ added in v0.19.0
type BlockCommunityResponse ¶ added in v0.19.0
type BlockCommunityResponse struct { Blocked bool `json:"blocked" url:"blocked,omitempty"` CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"` Error Optional[string] `json:"error"` }
type BlockInstance ¶ added in v0.19.0
type BlockInstanceResponse ¶ added in v0.19.0
type BlockPerson ¶ added in v0.19.0
type BlockPersonResponse ¶ added in v0.19.0
type BlockPersonResponse struct { Blocked bool `json:"blocked" url:"blocked,omitempty"` PersonView PersonView `json:"person_view" url:"person_view,omitempty"` Error Optional[string] `json:"error"` }
type CaptchaResponse ¶ added in v0.19.0
type ChangePassword ¶ added in v0.19.0
type Client ¶
type Client struct { Token string // contains filtered or unexported fields }
Client is a client for Lemmy's HTTP API
func NewWithClient ¶
NewWithClient creates a new Lemmy client with the given HTTP client
func (*Client) AddModToCommunity ¶
func (c *Client) AddModToCommunity(ctx context.Context, data AddModToCommunity) (*AddModToCommunityResponse, error)
Add a moderator to your community.
func (*Client) ApproveRegistrationApplication ¶
func (c *Client) ApproveRegistrationApplication(ctx context.Context, data ApproveRegistrationApplication) (*RegistrationApplicationResponse, error)
Approve a registration application
func (*Client) BanFromCommunity ¶
func (c *Client) BanFromCommunity(ctx context.Context, data BanFromCommunity) (*BanFromCommunityResponse, error)
Ban a user from a community.
func (*Client) BannedPersons ¶
func (c *Client) BannedPersons(ctx context.Context) (*BannedPersonsResponse, error)
Get a list of banned users
func (*Client) BlockCommunity ¶
func (c *Client) BlockCommunity(ctx context.Context, data BlockCommunity) (*BlockCommunityResponse, error)
Block a community.
func (*Client) BlockInstance ¶ added in v0.19.0
func (c *Client) BlockInstance(ctx context.Context, data BlockInstance) (*BlockInstanceResponse, error)
Block an instance.
func (*Client) BlockPerson ¶
func (c *Client) BlockPerson(ctx context.Context, data BlockPerson) (*BlockPersonResponse, error)
Block a person.
func (*Client) Captcha ¶
func (c *Client) Captcha(ctx context.Context) (*GetCaptchaResponse, error)
Fetch a Captcha.
func (*Client) ChangePassword ¶
func (c *Client) ChangePassword(ctx context.Context, data ChangePassword) (*LoginResponse, error)
Change your user password.
func (*Client) ClientLogin ¶
ClientLogin logs in to Lemmy by calling the login endpoint, and stores the returned token in the Token field for use in future requests.
The Token field can be set manually if you'd like to persist the token somewhere.
func (*Client) Comment ¶
func (c *Client) Comment(ctx context.Context, data GetComment) (*CommentResponse, error)
Get / fetch comment.
func (*Client) CommentReports ¶
func (c *Client) CommentReports(ctx context.Context, data ListCommentReports) (*ListCommentReportsResponse, error)
List comment reports.
func (*Client) Comments ¶
func (c *Client) Comments(ctx context.Context, data GetComments) (*GetCommentsResponse, error)
Get / fetch comments.
func (*Client) Communities ¶
func (c *Client) Communities(ctx context.Context, data ListCommunities) (*ListCommunitiesResponse, error)
List communities, with various filters.
func (*Client) Community ¶
func (c *Client) Community(ctx context.Context, data GetCommunity) (*GetCommunityResponse, error)
Get / fetch a community.
func (*Client) CreateComment ¶
func (c *Client) CreateComment(ctx context.Context, data CreateComment) (*CommentResponse, error)
Create a comment.
func (*Client) CreateCommentReport ¶
func (c *Client) CreateCommentReport(ctx context.Context, data CreateCommentReport) (*CommentReportResponse, error)
Report a comment.
func (*Client) CreateCommunity ¶
func (c *Client) CreateCommunity(ctx context.Context, data CreateCommunity) (*CommunityResponse, error)
Create a new community.
func (*Client) CreateCustomEmoji ¶ added in v0.18.0
func (c *Client) CreateCustomEmoji(ctx context.Context, data CreateCustomEmoji) (*CustomEmojiResponse, error)
Create a new custom emoji
func (*Client) CreatePost ¶
func (c *Client) CreatePost(ctx context.Context, data CreatePost) (*PostResponse, error)
Create a post.
func (*Client) CreatePostReport ¶
func (c *Client) CreatePostReport(ctx context.Context, data CreatePostReport) (*PostReportResponse, error)
Report a post.
func (*Client) CreatePrivateMessage ¶
func (c *Client) CreatePrivateMessage(ctx context.Context, data CreatePrivateMessage) (*PrivateMessageResponse, error)
Create a private message.
func (*Client) CreatePrivateMessageReport ¶
func (c *Client) CreatePrivateMessageReport(ctx context.Context, data CreatePrivateMessageReport) (*PrivateMessageReportResponse, error)
Create a report for a private message.
func (*Client) CreateSite ¶
func (c *Client) CreateSite(ctx context.Context, data CreateSite) (*SiteResponse, error)
Create your site.
func (*Client) DeleteAccount ¶
func (c *Client) DeleteAccount(ctx context.Context, data DeleteAccount) (*SuccessResponse, error)
Delete your account.
func (*Client) DeleteComment ¶
func (c *Client) DeleteComment(ctx context.Context, data DeleteComment) (*CommentResponse, error)
Delete a comment.
func (*Client) DeleteCommunity ¶
func (c *Client) DeleteCommunity(ctx context.Context, data DeleteCommunity) (*CommunityResponse, error)
Delete a community.
func (*Client) DeleteCustomEmoji ¶ added in v0.18.0
func (c *Client) DeleteCustomEmoji(ctx context.Context, data DeleteCustomEmoji) (*SuccessResponse, error)
Delete a custom emoji
func (*Client) DeletePost ¶
func (c *Client) DeletePost(ctx context.Context, data DeletePost) (*PostResponse, error)
Delete a post.
func (*Client) DeletePrivateMessage ¶
func (c *Client) DeletePrivateMessage(ctx context.Context, data DeletePrivateMessage) (*PrivateMessageResponse, error)
Delete a private message.
func (*Client) DistinguishComment ¶ added in v0.18.0
func (c *Client) DistinguishComment(ctx context.Context, data DistinguishComment) (*CommentResponse, error)
Distinguishes a comment (speak as moderator)
func (*Client) EditComment ¶
func (c *Client) EditComment(ctx context.Context, data EditComment) (*CommentResponse, error)
Edit a comment.
func (*Client) EditCommunity ¶
func (c *Client) EditCommunity(ctx context.Context, data EditCommunity) (*CommunityResponse, error)
Edit a community.
func (*Client) EditCustomEmoji ¶ added in v0.18.0
func (c *Client) EditCustomEmoji(ctx context.Context, data EditCustomEmoji) (*CustomEmojiResponse, error)
Edit an existing custom emoji
func (*Client) EditPrivateMessage ¶
func (c *Client) EditPrivateMessage(ctx context.Context, data EditPrivateMessage) (*PrivateMessageResponse, error)
Edit a private message.
func (*Client) ExportSettings ¶ added in v0.19.0
Export a backup of your user settings, including your saved content, followed communities, and blocks.
func (*Client) FeaturePost ¶
func (c *Client) FeaturePost(ctx context.Context, data FeaturePost) (*PostResponse, error)
A moderator can feature a community post ( IE stick it to the top of a community ).
func (*Client) FederatedInstances ¶ added in v0.18.0
func (c *Client) FederatedInstances(ctx context.Context) (*GetFederatedInstancesResponse, error)
Fetch federated instances.
func (*Client) FollowCommunity ¶
func (c *Client) FollowCommunity(ctx context.Context, data FollowCommunity) (*CommunityResponse, error)
Follow / subscribe to a community.
func (*Client) HideCommunity ¶
func (c *Client) HideCommunity(ctx context.Context, data HideCommunity) (*SuccessResponse, error)
Hide a community from public / "All" view. Admins only.
func (*Client) ImportSettings ¶ added in v0.19.0
func (c *Client) ImportSettings(ctx context.Context) (*SuccessResponse, error)
Import a backup of your user settings.
func (*Client) LeaveAdmin ¶
func (c *Client) LeaveAdmin(ctx context.Context) (*GetSiteResponse, error)
Leave the Site admins.
func (*Client) LikeComment ¶ added in v0.18.3
func (c *Client) LikeComment(ctx context.Context, data CreateCommentLike) (*CommentResponse, error)
Like / vote on a comment.
func (*Client) LikePost ¶ added in v0.18.3
func (c *Client) LikePost(ctx context.Context, data CreatePostLike) (*PostResponse, error)
Like / vote on a post.
func (*Client) MarkAllAsRead ¶
func (c *Client) MarkAllAsRead(ctx context.Context) (*GetRepliesResponse, error)
Mark all replies as read.
func (*Client) MarkCommentReplyAsRead ¶
func (c *Client) MarkCommentReplyAsRead(ctx context.Context, data MarkCommentReplyAsRead) (*CommentReplyResponse, error)
Mark a comment as read.
func (*Client) MarkPersonMentionAsRead ¶
func (c *Client) MarkPersonMentionAsRead(ctx context.Context, data MarkPersonMentionAsRead) (*PersonMentionResponse, error)
Mark a person mention as read.
func (*Client) MarkPostAsRead ¶
func (c *Client) MarkPostAsRead(ctx context.Context, data MarkPostAsRead) (*SuccessResponse, error)
Mark a post as read.
func (*Client) MarkPrivateMessageAsRead ¶
func (c *Client) MarkPrivateMessageAsRead(ctx context.Context, data MarkPrivateMessageAsRead) (*PrivateMessageResponse, error)
Mark a private message as read.
func (*Client) PasswordChangeAfterReset ¶
func (c *Client) PasswordChangeAfterReset(ctx context.Context, data PasswordChangeAfterReset) (*SuccessResponse, error)
Change your password from an email / token based reset.
func (*Client) PasswordReset ¶
func (c *Client) PasswordReset(ctx context.Context, data PasswordReset) (*SuccessResponse, error)
Reset your password.
func (*Client) PersonDetails ¶
func (c *Client) PersonDetails(ctx context.Context, data GetPersonDetails) (*GetPersonDetailsResponse, error)
Get the details for a person.
func (*Client) PersonMentions ¶
func (c *Client) PersonMentions(ctx context.Context, data GetPersonMentions) (*GetPersonMentionsResponse, error)
Get mentions for your user.
func (*Client) PostReports ¶
func (c *Client) PostReports(ctx context.Context, data ListPostReports) (*ListPostReportsResponse, error)
List post reports.
func (*Client) PrivateMessageReports ¶
func (c *Client) PrivateMessageReports(ctx context.Context, data ListPrivateMessageReports) (*ListPrivateMessageReportsResponse, error)
List private message reports.
func (*Client) PrivateMessages ¶
func (c *Client) PrivateMessages(ctx context.Context, data GetPrivateMessages) (*PrivateMessagesResponse, error)
Get / fetch private messages.
func (*Client) PurgeComment ¶
func (c *Client) PurgeComment(ctx context.Context, data PurgeComment) (*SuccessResponse, error)
Purge / Delete a comment from the database.
func (*Client) PurgeCommunity ¶
func (c *Client) PurgeCommunity(ctx context.Context, data PurgeCommunity) (*SuccessResponse, error)
Purge / Delete a community from the database.
func (*Client) PurgePerson ¶
func (c *Client) PurgePerson(ctx context.Context, data PurgePerson) (*SuccessResponse, error)
Purge / Delete a person from the database.
func (*Client) RegistrationApplications ¶
func (c *Client) RegistrationApplications(ctx context.Context, data ListRegistrationApplications) (*ListRegistrationApplicationsResponse, error)
List the registration applications.
func (*Client) RemoveComment ¶
func (c *Client) RemoveComment(ctx context.Context, data RemoveComment) (*CommentResponse, error)
A moderator remove for a comment.
func (*Client) RemoveCommunity ¶
func (c *Client) RemoveCommunity(ctx context.Context, data RemoveCommunity) (*CommunityResponse, error)
A moderator remove for a community.
func (*Client) RemovePost ¶
func (c *Client) RemovePost(ctx context.Context, data RemovePost) (*PostResponse, error)
A moderator remove for a post.
func (*Client) Replies ¶
func (c *Client) Replies(ctx context.Context, data GetReplies) (*GetRepliesResponse, error)
Get comment replies.
func (*Client) ReportCount ¶
func (c *Client) ReportCount(ctx context.Context, data GetReportCount) (*GetReportCountResponse, error)
Get counts for your reports
func (*Client) ResolveCommentReport ¶
func (c *Client) ResolveCommentReport(ctx context.Context, data ResolveCommentReport) (*CommentReportResponse, error)
Resolve a comment report. Only a mod can do this.
func (*Client) ResolveObject ¶
func (c *Client) ResolveObject(ctx context.Context, data ResolveObject) (*ResolveObjectResponse, error)
Fetch a non-local / federated object.
func (*Client) ResolvePostReport ¶
func (c *Client) ResolvePostReport(ctx context.Context, data ResolvePostReport) (*PostReportResponse, error)
Resolve a post report. Only a mod can do this.
func (*Client) ResolvePrivateMessageReport ¶
func (c *Client) ResolvePrivateMessageReport(ctx context.Context, data ResolvePrivateMessageReport) (*PrivateMessageReportResponse, error)
Resolve a report for a private message.
func (*Client) SaveComment ¶
func (c *Client) SaveComment(ctx context.Context, data SaveComment) (*CommentResponse, error)
Save a comment.
func (*Client) SaveUserSettings ¶
func (c *Client) SaveUserSettings(ctx context.Context, data SaveUserSettings) (*SuccessResponse, error)
Save your user settings.
func (*Client) Site ¶
func (c *Client) Site(ctx context.Context) (*GetSiteResponse, error)
Gets the site, and your user data.
func (*Client) SiteMetadata ¶
func (c *Client) SiteMetadata(ctx context.Context, data GetSiteMetadata) (*GetSiteMetadataResponse, error)
Fetch metadata for any given site.
func (*Client) TransferCommunity ¶
func (c *Client) TransferCommunity(ctx context.Context, data TransferCommunity) (*GetCommunityResponse, error)
Transfer your community to an existing moderator.
func (*Client) UnreadCount ¶
func (c *Client) UnreadCount(ctx context.Context) (*GetUnreadCountResponse, error)
Get your unread counts
func (*Client) UnreadRegistrationApplicationCount ¶
func (c *Client) UnreadRegistrationApplicationCount(ctx context.Context) (*GetUnreadRegistrationApplicationCountResponse, error)
Get the unread registration applications count.
func (*Client) ValidateAuth ¶ added in v0.19.0
func (c *Client) ValidateAuth(ctx context.Context) (*SuccessResponse, error)
Returns an error message if your auth token is invalid
func (*Client) VerifyEmail ¶
func (c *Client) VerifyEmail(ctx context.Context, data VerifyEmail) (*SuccessResponse, error)
Verify your email
type Comment ¶ added in v0.19.0
type Comment struct { ApID string `json:"ap_id" url:"ap_id,omitempty"` Content string `json:"content" url:"content,omitempty"` CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"` Deleted bool `json:"deleted" url:"deleted,omitempty"` Distinguished bool `json:"distinguished" url:"distinguished,omitempty"` ID int64 `json:"id" url:"id,omitempty"` LanguageID int64 `json:"language_id" url:"language_id,omitempty"` Local bool `json:"local" url:"local,omitempty"` Path string `json:"path" url:"path,omitempty"` PostID int64 `json:"post_id" url:"post_id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Removed bool `json:"removed" url:"removed,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type CommentAggregates ¶ added in v0.19.0
type CommentAggregates struct { ChildCount int64 `json:"child_count" url:"child_count,omitempty"` CommentID int64 `json:"comment_id" url:"comment_id,omitempty"` Downvotes int64 `json:"downvotes" url:"downvotes,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Score int64 `json:"score" url:"score,omitempty"` Upvotes int64 `json:"upvotes" url:"upvotes,omitempty"` }
type CommentReply ¶ added in v0.19.0
type CommentReply struct { CommentID int64 `json:"comment_id" url:"comment_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Read bool `json:"read" url:"read,omitempty"` RecipientID int64 `json:"recipient_id" url:"recipient_id,omitempty"` }
type CommentReplyResponse ¶ added in v0.19.0
type CommentReplyResponse struct { CommentReplyView CommentReplyView `json:"comment_reply_view" url:"comment_reply_view,omitempty"` Error Optional[string] `json:"error"` }
type CommentReplyView ¶ added in v0.19.0
type CommentReplyView struct { Comment Comment `json:"comment" url:"comment,omitempty"` CommentReply CommentReply `json:"comment_reply" url:"comment_reply,omitempty"` Community Community `json:"community" url:"community,omitempty"` Counts CommentAggregates `json:"counts" url:"counts,omitempty"` Creator Person `json:"creator" url:"creator,omitempty"` CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"` CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"` CreatorIsAdmin bool `json:"creator_is_admin" url:"creator_is_admin,omitempty"` CreatorIsModerator bool `json:"creator_is_moderator" url:"creator_is_moderator,omitempty"` MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"` Post Post `json:"post" url:"post,omitempty"` Recipient Person `json:"recipient" url:"recipient,omitempty"` Saved bool `json:"saved" url:"saved,omitempty"` Subscribed SubscribedType `json:"subscribed" url:"subscribed,omitempty"` }
type CommentReport ¶ added in v0.19.0
type CommentReport struct { CommentID int64 `json:"comment_id" url:"comment_id,omitempty"` CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` OriginalCommentText string `json:"original_comment_text" url:"original_comment_text,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Reason string `json:"reason" url:"reason,omitempty"` Resolved bool `json:"resolved" url:"resolved,omitempty"` ResolverID Optional[int64] `json:"resolver_id" url:"resolver_id,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type CommentReportResponse ¶ added in v0.19.0
type CommentReportResponse struct { CommentReportView CommentReportView `json:"comment_report_view" url:"comment_report_view,omitempty"` Error Optional[string] `json:"error"` }
type CommentReportView ¶ added in v0.19.0
type CommentReportView struct { Comment Comment `json:"comment" url:"comment,omitempty"` CommentCreator Person `json:"comment_creator" url:"comment_creator,omitempty"` CommentReport CommentReport `json:"comment_report" url:"comment_report,omitempty"` Community Community `json:"community" url:"community,omitempty"` Counts CommentAggregates `json:"counts" url:"counts,omitempty"` Creator Person `json:"creator" url:"creator,omitempty"` CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"` MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"` Post Post `json:"post" url:"post,omitempty"` Resolver Optional[Person] `json:"resolver" url:"resolver,omitempty"` }
type CommentResponse ¶ added in v0.19.0
type CommentResponse struct { CommentView CommentView `json:"comment_view" url:"comment_view,omitempty"` RecipientIDs []int64 `json:"recipient_ids" url:"recipient_ids,omitempty"` Error Optional[string] `json:"error"` }
type CommentSortType ¶ added in v0.19.0
type CommentSortType string
const ( CommentSortTypeHot CommentSortType = "Hot" CommentSortTypeTop CommentSortType = "Top" CommentSortTypeNew CommentSortType = "New" CommentSortTypeOld CommentSortType = "Old" CommentSortTypeControversial CommentSortType = "Controversial" )
type CommentView ¶ added in v0.19.0
type CommentView struct { Comment Comment `json:"comment" url:"comment,omitempty"` Community Community `json:"community" url:"community,omitempty"` Counts CommentAggregates `json:"counts" url:"counts,omitempty"` Creator Person `json:"creator" url:"creator,omitempty"` CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"` CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"` CreatorIsAdmin bool `json:"creator_is_admin" url:"creator_is_admin,omitempty"` CreatorIsModerator bool `json:"creator_is_moderator" url:"creator_is_moderator,omitempty"` MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"` Post Post `json:"post" url:"post,omitempty"` Saved bool `json:"saved" url:"saved,omitempty"` Subscribed SubscribedType `json:"subscribed" url:"subscribed,omitempty"` }
type Community ¶ added in v0.19.0
type Community struct { ActorID string `json:"actor_id" url:"actor_id,omitempty"` Banner Optional[string] `json:"banner" url:"banner,omitempty"` Deleted bool `json:"deleted" url:"deleted,omitempty"` Description Optional[string] `json:"description" url:"description,omitempty"` Hidden bool `json:"hidden" url:"hidden,omitempty"` Icon Optional[string] `json:"icon" url:"icon,omitempty"` ID int64 `json:"id" url:"id,omitempty"` InstanceID int64 `json:"instance_id" url:"instance_id,omitempty"` Local bool `json:"local" url:"local,omitempty"` Name string `json:"name" url:"name,omitempty"` NSFW bool `json:"nsfw" url:"nsfw,omitempty"` PostingRestrictedToMods bool `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Removed bool `json:"removed" url:"removed,omitempty"` Title string `json:"title" url:"title,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type CommunityAggregates ¶ added in v0.19.0
type CommunityAggregates struct { Comments int64 `json:"comments" url:"comments,omitempty"` CommunityID int64 `json:"community_id" url:"community_id,omitempty"` Posts int64 `json:"posts" url:"posts,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Subscribers int64 `json:"subscribers" url:"subscribers,omitempty"` UsersActiveDay int64 `json:"users_active_day" url:"users_active_day,omitempty"` UsersActiveHalfYear int64 `json:"users_active_half_year" url:"users_active_half_year,omitempty"` UsersActiveMonth int64 `json:"users_active_month" url:"users_active_month,omitempty"` UsersActiveWeek int64 `json:"users_active_week" url:"users_active_week,omitempty"` }
type CommunityBlockView ¶ added in v0.19.0
type CommunityFollowerView ¶ added in v0.19.0
type CommunityModeratorView ¶ added in v0.19.0
type CommunityResponse ¶ added in v0.19.0
type CommunityResponse struct { CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"` DiscussionLanguages []int64 `json:"discussion_languages" url:"discussion_languages,omitempty"` Error Optional[string] `json:"error"` }
type CommunityView ¶ added in v0.19.0
type CommunityView struct { Blocked bool `json:"blocked" url:"blocked,omitempty"` Community Community `json:"community" url:"community,omitempty"` Counts CommunityAggregates `json:"counts" url:"counts,omitempty"` Subscribed SubscribedType `json:"subscribed" url:"subscribed,omitempty"` }
type CreateComment ¶ added in v0.19.0
type CreateCommentLike ¶ added in v0.19.0
type CreateCommentReport ¶ added in v0.19.0
type CreateCommunity ¶ added in v0.19.0
type CreateCommunity struct { Banner Optional[string] `json:"banner" url:"banner,omitempty"` Description Optional[string] `json:"description" url:"description,omitempty"` DiscussionLanguages Optional[[]int64] `json:"discussion_languages" url:"discussion_languages,omitempty"` Icon Optional[string] `json:"icon" url:"icon,omitempty"` Name string `json:"name" url:"name,omitempty"` NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"` PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"` Title string `json:"title" url:"title,omitempty"` }
type CreateCustomEmoji ¶ added in v0.19.0
type CreateCustomEmoji struct { AltText string `json:"alt_text" url:"alt_text,omitempty"` Category string `json:"category" url:"category,omitempty"` ImageURL string `json:"image_url" url:"image_url,omitempty"` Keywords []string `json:"keywords" url:"keywords,omitempty"` Shortcode string `json:"shortcode" url:"shortcode,omitempty"` }
type CreatePost ¶ added in v0.19.0
type CreatePost struct { Body Optional[string] `json:"body" url:"body,omitempty"` CommunityID int64 `json:"community_id" url:"community_id,omitempty"` Honeypot Optional[string] `json:"honeypot" url:"honeypot,omitempty"` LanguageID Optional[int64] `json:"language_id" url:"language_id,omitempty"` Name string `json:"name" url:"name,omitempty"` NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"` URL Optional[string] `json:"url" url:"url,omitempty"` }
type CreatePostLike ¶ added in v0.19.0
type CreatePostReport ¶ added in v0.19.0
type CreatePrivateMessage ¶ added in v0.19.0
type CreatePrivateMessageReport ¶ added in v0.19.0
type CreateSite ¶ added in v0.19.0
type CreateSite struct { ActorNameMaxLength Optional[int64] `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"` AllowedInstances Optional[[]string] `json:"allowed_instances" url:"allowed_instances,omitempty"` ApplicationEmailAdmins Optional[bool] `json:"application_email_admins" url:"application_email_admins,omitempty"` ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"` Banner Optional[string] `json:"banner" url:"banner,omitempty"` BlockedInstances Optional[[]string] `json:"blocked_instances" url:"blocked_instances,omitempty"` CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"` CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"` CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"` DefaultPostListingType Optional[ListingType] `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"` DefaultTheme Optional[string] `json:"default_theme" url:"default_theme,omitempty"` Description Optional[string] `json:"description" url:"description,omitempty"` DiscussionLanguages Optional[[]int64] `json:"discussion_languages" url:"discussion_languages,omitempty"` EnableDownvotes Optional[bool] `json:"enable_downvotes" url:"enable_downvotes,omitempty"` EnableNSFW Optional[bool] `json:"enable_nsfw" url:"enable_nsfw,omitempty"` FederationDebug Optional[bool] `json:"federation_debug" url:"federation_debug,omitempty"` FederationEnabled Optional[bool] `json:"federation_enabled" url:"federation_enabled,omitempty"` HideModlogModNames Optional[bool] `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"` Icon Optional[string] `json:"icon" url:"icon,omitempty"` LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"` Name string `json:"name" url:"name,omitempty"` PrivateInstance Optional[bool] `json:"private_instance" url:"private_instance,omitempty"` RateLimitComment Optional[int64] `json:"rate_limit_comment" url:"rate_limit_comment,omitempty"` RateLimitCommentPerSecond Optional[int64] `json:"rate_limit_comment_per_second" url:"rate_limit_comment_per_second,omitempty"` RateLimitImage Optional[int64] `json:"rate_limit_image" url:"rate_limit_image,omitempty"` RateLimitImagePerSecond Optional[int64] `json:"rate_limit_image_per_second" url:"rate_limit_image_per_second,omitempty"` RateLimitMessage Optional[int64] `json:"rate_limit_message" url:"rate_limit_message,omitempty"` RateLimitMessagePerSecond Optional[int64] `json:"rate_limit_message_per_second" url:"rate_limit_message_per_second,omitempty"` RateLimitPost Optional[int64] `json:"rate_limit_post" url:"rate_limit_post,omitempty"` RateLimitPostPerSecond Optional[int64] `json:"rate_limit_post_per_second" url:"rate_limit_post_per_second,omitempty"` RateLimitRegister Optional[int64] `json:"rate_limit_register" url:"rate_limit_register,omitempty"` RateLimitRegisterPerSecond Optional[int64] `json:"rate_limit_register_per_second" url:"rate_limit_register_per_second,omitempty"` RateLimitSearch Optional[int64] `json:"rate_limit_search" url:"rate_limit_search,omitempty"` RateLimitSearchPerSecond Optional[int64] `json:"rate_limit_search_per_second" url:"rate_limit_search_per_second,omitempty"` RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"` RequireEmailVerification Optional[bool] `json:"require_email_verification" url:"require_email_verification,omitempty"` Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"` SlurFilterRegex Optional[string] `json:"slur_filter_regex" url:"slur_filter_regex,omitempty"` Taglines Optional[[]string] `json:"taglines" url:"taglines,omitempty"` }
type CustomEmoji ¶ added in v0.19.0
type CustomEmoji struct { AltText string `json:"alt_text" url:"alt_text,omitempty"` Category string `json:"category" url:"category,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ImageURL string `json:"image_url" url:"image_url,omitempty"` LocalSiteID int64 `json:"local_site_id" url:"local_site_id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Shortcode string `json:"shortcode" url:"shortcode,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type CustomEmojiKeyword ¶ added in v0.19.0
type CustomEmojiResponse ¶ added in v0.19.0
type CustomEmojiResponse struct { CustomEmoji CustomEmojiView `json:"custom_emoji" url:"custom_emoji,omitempty"` Error Optional[string] `json:"error"` }
type CustomEmojiView ¶ added in v0.19.0
type CustomEmojiView struct { CustomEmoji CustomEmoji `json:"custom_emoji" url:"custom_emoji,omitempty"` Keywords []CustomEmojiKeyword `json:"keywords" url:"keywords,omitempty"` }
type DeleteAccount ¶ added in v0.19.0
type DeleteComment ¶ added in v0.19.0
type DeleteCommunity ¶ added in v0.19.0
type DeleteCustomEmoji ¶ added in v0.19.0
type DeleteCustomEmoji struct {
ID int64 `json:"id" url:"id,omitempty"`
}
type DeletePost ¶ added in v0.19.0
type DeletePrivateMessage ¶ added in v0.19.0
type DistinguishComment ¶ added in v0.19.0
type EditComment ¶ added in v0.19.0
type EditCommunity ¶ added in v0.19.0
type EditCommunity struct { Banner Optional[string] `json:"banner" url:"banner,omitempty"` CommunityID int64 `json:"community_id" url:"community_id,omitempty"` Description Optional[string] `json:"description" url:"description,omitempty"` DiscussionLanguages Optional[[]int64] `json:"discussion_languages" url:"discussion_languages,omitempty"` Icon Optional[string] `json:"icon" url:"icon,omitempty"` NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"` PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"` Title Optional[string] `json:"title" url:"title,omitempty"` }
type EditCustomEmoji ¶ added in v0.19.0
type EditCustomEmoji struct { AltText string `json:"alt_text" url:"alt_text,omitempty"` Category string `json:"category" url:"category,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ImageURL string `json:"image_url" url:"image_url,omitempty"` Keywords []string `json:"keywords" url:"keywords,omitempty"` }
type EditPost ¶ added in v0.19.0
type EditPost struct { Body Optional[string] `json:"body" url:"body,omitempty"` LanguageID Optional[int64] `json:"language_id" url:"language_id,omitempty"` Name Optional[string] `json:"name" url:"name,omitempty"` NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"` PostID int64 `json:"post_id" url:"post_id,omitempty"` URL Optional[string] `json:"url" url:"url,omitempty"` }
type EditPrivateMessage ¶ added in v0.19.0
type EditSite ¶ added in v0.19.0
type EditSite struct { ActorNameMaxLength Optional[int64] `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"` AllowedInstances Optional[[]string] `json:"allowed_instances" url:"allowed_instances,omitempty"` ApplicationEmailAdmins Optional[bool] `json:"application_email_admins" url:"application_email_admins,omitempty"` ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"` Banner Optional[string] `json:"banner" url:"banner,omitempty"` BlockedInstances Optional[[]string] `json:"blocked_instances" url:"blocked_instances,omitempty"` CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"` CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"` CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"` DefaultPostListingType Optional[ListingType] `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"` DefaultTheme Optional[string] `json:"default_theme" url:"default_theme,omitempty"` Description Optional[string] `json:"description" url:"description,omitempty"` DiscussionLanguages Optional[[]int64] `json:"discussion_languages" url:"discussion_languages,omitempty"` EnableDownvotes Optional[bool] `json:"enable_downvotes" url:"enable_downvotes,omitempty"` EnableNSFW Optional[bool] `json:"enable_nsfw" url:"enable_nsfw,omitempty"` FederationDebug Optional[bool] `json:"federation_debug" url:"federation_debug,omitempty"` FederationEnabled Optional[bool] `json:"federation_enabled" url:"federation_enabled,omitempty"` HideModlogModNames Optional[bool] `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"` Icon Optional[string] `json:"icon" url:"icon,omitempty"` LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"` Name Optional[string] `json:"name" url:"name,omitempty"` PrivateInstance Optional[bool] `json:"private_instance" url:"private_instance,omitempty"` RateLimitComment Optional[int64] `json:"rate_limit_comment" url:"rate_limit_comment,omitempty"` RateLimitCommentPerSecond Optional[int64] `json:"rate_limit_comment_per_second" url:"rate_limit_comment_per_second,omitempty"` RateLimitImage Optional[int64] `json:"rate_limit_image" url:"rate_limit_image,omitempty"` RateLimitImagePerSecond Optional[int64] `json:"rate_limit_image_per_second" url:"rate_limit_image_per_second,omitempty"` RateLimitMessage Optional[int64] `json:"rate_limit_message" url:"rate_limit_message,omitempty"` RateLimitMessagePerSecond Optional[int64] `json:"rate_limit_message_per_second" url:"rate_limit_message_per_second,omitempty"` RateLimitPost Optional[int64] `json:"rate_limit_post" url:"rate_limit_post,omitempty"` RateLimitPostPerSecond Optional[int64] `json:"rate_limit_post_per_second" url:"rate_limit_post_per_second,omitempty"` RateLimitRegister Optional[int64] `json:"rate_limit_register" url:"rate_limit_register,omitempty"` RateLimitRegisterPerSecond Optional[int64] `json:"rate_limit_register_per_second" url:"rate_limit_register_per_second,omitempty"` RateLimitSearch Optional[int64] `json:"rate_limit_search" url:"rate_limit_search,omitempty"` RateLimitSearchPerSecond Optional[int64] `json:"rate_limit_search_per_second" url:"rate_limit_search_per_second,omitempty"` RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"` ReportsEmailAdmins Optional[bool] `json:"reports_email_admins" url:"reports_email_admins,omitempty"` RequireEmailVerification Optional[bool] `json:"require_email_verification" url:"require_email_verification,omitempty"` Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"` SlurFilterRegex Optional[string] `json:"slur_filter_regex" url:"slur_filter_regex,omitempty"` Taglines Optional[[]string] `json:"taglines" url:"taglines,omitempty"` }
type FeaturePost ¶ added in v0.19.0
type FeaturePost struct { FeatureType PostFeatureType `json:"feature_type" url:"feature_type,omitempty"` Featured bool `json:"featured" url:"featured,omitempty"` PostID int64 `json:"post_id" url:"post_id,omitempty"` }
type FederatedInstances ¶ added in v0.19.0
type FederatedInstances struct { Allowed []InstanceWithFederationState `json:"allowed" url:"allowed,omitempty"` Blocked []InstanceWithFederationState `json:"blocked" url:"blocked,omitempty"` Linked []InstanceWithFederationState `json:"linked" url:"linked,omitempty"` }
type FollowCommunity ¶ added in v0.19.0
type GetCaptchaResponse ¶ added in v0.19.0
type GetCaptchaResponse struct { Ok Optional[CaptchaResponse] `json:"ok" url:"ok,omitempty"` Error Optional[string] `json:"error"` }
type GetComment ¶ added in v0.19.0
type GetComment struct {
ID int64 `json:"id" url:"id,omitempty"`
}
type GetComments ¶ added in v0.19.0
type GetComments struct { CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"` CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"` DislikedOnly Optional[bool] `json:"disliked_only" url:"disliked_only,omitempty"` LikedOnly Optional[bool] `json:"liked_only" url:"liked_only,omitempty"` Limit Optional[int64] `json:"limit" url:"limit,omitempty"` MaxDepth Optional[int64] `json:"max_depth" url:"max_depth,omitempty"` Page Optional[int64] `json:"page" url:"page,omitempty"` ParentID Optional[int64] `json:"parent_id" url:"parent_id,omitempty"` PostID Optional[int64] `json:"post_id" url:"post_id,omitempty"` SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"` Sort Optional[CommentSortType] `json:"sort" url:"sort,omitempty"` Type Optional[ListingType] `json:"type_" url:"type_,omitempty"` }
type GetCommentsResponse ¶ added in v0.19.0
type GetCommentsResponse struct { Comments []CommentView `json:"comments" url:"comments,omitempty"` Error Optional[string] `json:"error"` }
type GetCommunity ¶ added in v0.19.0
type GetCommunityResponse ¶ added in v0.19.0
type GetCommunityResponse struct { CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"` DiscussionLanguages []int64 `json:"discussion_languages" url:"discussion_languages,omitempty"` Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"` Site Optional[Site] `json:"site" url:"site,omitempty"` Error Optional[string] `json:"error"` }
type GetFederatedInstancesResponse ¶ added in v0.19.0
type GetFederatedInstancesResponse struct { FederatedInstances Optional[FederatedInstances] `json:"federated_instances" url:"federated_instances,omitempty"` Error Optional[string] `json:"error"` }
type GetModlog ¶ added in v0.19.0
type GetModlog struct { CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"` Limit Optional[int64] `json:"limit" url:"limit,omitempty"` ModPersonID Optional[int64] `json:"mod_person_id" url:"mod_person_id,omitempty"` OtherPersonID Optional[int64] `json:"other_person_id" url:"other_person_id,omitempty"` Page Optional[int64] `json:"page" url:"page,omitempty"` Type Optional[ModlogActionType] `json:"type_" url:"type_,omitempty"` }
type GetModlogResponse ¶ added in v0.19.0
type GetModlogResponse struct { Added []ModAddView `json:"added" url:"added,omitempty"` AddedToCommunity []ModAddCommunityView `json:"added_to_community" url:"added_to_community,omitempty"` AdminPurgedComments []AdminPurgeCommentView `json:"admin_purged_comments" url:"admin_purged_comments,omitempty"` AdminPurgedCommunities []AdminPurgeCommunityView `json:"admin_purged_communities" url:"admin_purged_communities,omitempty"` AdminPurgedPersons []AdminPurgePersonView `json:"admin_purged_persons" url:"admin_purged_persons,omitempty"` AdminPurgedPosts []AdminPurgePostView `json:"admin_purged_posts" url:"admin_purged_posts,omitempty"` Banned []ModBanView `json:"banned" url:"banned,omitempty"` BannedFromCommunity []ModBanFromCommunityView `json:"banned_from_community" url:"banned_from_community,omitempty"` FeaturedPosts []ModFeaturePostView `json:"featured_posts" url:"featured_posts,omitempty"` HiddenCommunities []ModHideCommunityView `json:"hidden_communities" url:"hidden_communities,omitempty"` LockedPosts []ModLockPostView `json:"locked_posts" url:"locked_posts,omitempty"` RemovedComments []ModRemoveCommentView `json:"removed_comments" url:"removed_comments,omitempty"` RemovedCommunities []ModRemoveCommunityView `json:"removed_communities" url:"removed_communities,omitempty"` RemovedPosts []ModRemovePostView `json:"removed_posts" url:"removed_posts,omitempty"` TransferredToCommunity []ModTransferCommunityView `json:"transferred_to_community" url:"transferred_to_community,omitempty"` Error Optional[string] `json:"error"` }
type GetPersonDetails ¶ added in v0.19.0
type GetPersonDetails struct { CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"` Limit Optional[int64] `json:"limit" url:"limit,omitempty"` Page Optional[int64] `json:"page" url:"page,omitempty"` PersonID Optional[int64] `json:"person_id" url:"person_id,omitempty"` SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"` Sort Optional[SortType] `json:"sort" url:"sort,omitempty"` Username Optional[string] `json:"username" url:"username,omitempty"` }
type GetPersonDetailsResponse ¶ added in v0.19.0
type GetPersonDetailsResponse struct { Comments []CommentView `json:"comments" url:"comments,omitempty"` Moderates []CommunityModeratorView `json:"moderates" url:"moderates,omitempty"` PersonView PersonView `json:"person_view" url:"person_view,omitempty"` Posts []PostView `json:"posts" url:"posts,omitempty"` Error Optional[string] `json:"error"` }
type GetPersonMentions ¶ added in v0.19.0
type GetPersonMentionsResponse ¶ added in v0.19.0
type GetPersonMentionsResponse struct { Mentions []PersonMentionView `json:"mentions" url:"mentions,omitempty"` Error Optional[string] `json:"error"` }
type GetPostResponse ¶ added in v0.19.0
type GetPostResponse struct { CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"` CrossPosts []PostView `json:"cross_posts" url:"cross_posts,omitempty"` Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"` PostView PostView `json:"post_view" url:"post_view,omitempty"` Error Optional[string] `json:"error"` }
type GetPosts ¶ added in v0.19.0
type GetPosts struct { CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"` CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"` DislikedOnly Optional[bool] `json:"disliked_only" url:"disliked_only,omitempty"` LikedOnly Optional[bool] `json:"liked_only" url:"liked_only,omitempty"` Limit Optional[int64] `json:"limit" url:"limit,omitempty"` Page Optional[int64] `json:"page" url:"page,omitempty"` PageCursor Optional[string] `json:"page_cursor" url:"page_cursor,omitempty"` SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"` Sort Optional[SortType] `json:"sort" url:"sort,omitempty"` Type Optional[ListingType] `json:"type_" url:"type_,omitempty"` }
type GetPostsResponse ¶ added in v0.19.0
type GetPrivateMessages ¶ added in v0.19.0
type GetReplies ¶ added in v0.19.0
type GetRepliesResponse ¶ added in v0.19.0
type GetRepliesResponse struct { Replies []CommentReplyView `json:"replies" url:"replies,omitempty"` Error Optional[string] `json:"error"` }
type GetReportCount ¶ added in v0.19.0
type GetReportCountResponse ¶ added in v0.19.0
type GetReportCountResponse struct { CommentReports int64 `json:"comment_reports" url:"comment_reports,omitempty"` CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"` PostReports int64 `json:"post_reports" url:"post_reports,omitempty"` PrivateMessageReports Optional[int64] `json:"private_message_reports" url:"private_message_reports,omitempty"` Error Optional[string] `json:"error"` }
type GetSiteMetadata ¶ added in v0.19.0
type GetSiteMetadata struct {
URL string `json:"url" url:"url,omitempty"`
}
type GetSiteMetadataResponse ¶ added in v0.19.0
type GetSiteMetadataResponse struct { Metadata SiteMetadata `json:"metadata" url:"metadata,omitempty"` Error Optional[string] `json:"error"` }
type GetSiteResponse ¶ added in v0.19.0
type GetSiteResponse struct { Admins []PersonView `json:"admins" url:"admins,omitempty"` AllLanguages []Language `json:"all_languages" url:"all_languages,omitempty"` CustomEmojis []CustomEmojiView `json:"custom_emojis" url:"custom_emojis,omitempty"` DiscussionLanguages []int64 `json:"discussion_languages" url:"discussion_languages,omitempty"` MyUser Optional[MyUserInfo] `json:"my_user" url:"my_user,omitempty"` SiteView SiteView `json:"site_view" url:"site_view,omitempty"` Taglines []Tagline `json:"taglines" url:"taglines,omitempty"` Version string `json:"version" url:"version,omitempty"` Error Optional[string] `json:"error"` }
type GetUnreadCountResponse ¶ added in v0.19.0
type GetUnreadRegistrationApplicationCountResponse ¶ added in v0.19.0
type HideCommunity ¶ added in v0.19.0
type Instance ¶ added in v0.19.0
type Instance struct { Domain string `json:"domain" url:"domain,omitempty"` ID int64 `json:"id" url:"id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Software Optional[string] `json:"software" url:"software,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` Version Optional[string] `json:"version" url:"version,omitempty"` }
type InstanceBlockView ¶ added in v0.19.0
type InstanceWithFederationState ¶ added in v0.19.0
type InstanceWithFederationState struct { Domain string `json:"domain" url:"domain,omitempty"` FederationState Optional[ReadableFederationState] `json:"federation_state" url:"federation_state,omitempty"` ID int64 `json:"id" url:"id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Software Optional[string] `json:"software" url:"software,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` Version Optional[string] `json:"version" url:"version,omitempty"` }
type ListCommentReports ¶ added in v0.19.0
type ListCommentReports struct { CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"` Limit Optional[int64] `json:"limit" url:"limit,omitempty"` Page Optional[int64] `json:"page" url:"page,omitempty"` UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"` }
type ListCommentReportsResponse ¶ added in v0.19.0
type ListCommentReportsResponse struct { CommentReports []CommentReportView `json:"comment_reports" url:"comment_reports,omitempty"` Error Optional[string] `json:"error"` }
type ListCommunities ¶ added in v0.19.0
type ListCommunities struct { Limit Optional[int64] `json:"limit" url:"limit,omitempty"` Page Optional[int64] `json:"page" url:"page,omitempty"` ShowNSFW Optional[bool] `json:"show_nsfw" url:"show_nsfw,omitempty"` Sort Optional[SortType] `json:"sort" url:"sort,omitempty"` Type Optional[ListingType] `json:"type_" url:"type_,omitempty"` }
type ListCommunitiesResponse ¶ added in v0.19.0
type ListCommunitiesResponse struct { Communities []CommunityView `json:"communities" url:"communities,omitempty"` Error Optional[string] `json:"error"` }
type ListPostReports ¶ added in v0.19.0
type ListPostReports struct { CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"` Limit Optional[int64] `json:"limit" url:"limit,omitempty"` Page Optional[int64] `json:"page" url:"page,omitempty"` UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"` }
type ListPostReportsResponse ¶ added in v0.19.0
type ListPostReportsResponse struct { PostReports []PostReportView `json:"post_reports" url:"post_reports,omitempty"` Error Optional[string] `json:"error"` }
type ListPrivateMessageReports ¶ added in v0.19.0
type ListPrivateMessageReportsResponse ¶ added in v0.19.0
type ListPrivateMessageReportsResponse struct { PrivateMessageReports []PrivateMessageReportView `json:"private_message_reports" url:"private_message_reports,omitempty"` Error Optional[string] `json:"error"` }
type ListRegistrationApplications ¶ added in v0.19.0
type ListRegistrationApplicationsResponse ¶ added in v0.19.0
type ListRegistrationApplicationsResponse struct { RegistrationApplications []RegistrationApplicationView `json:"registration_applications" url:"registration_applications,omitempty"` Error Optional[string] `json:"error"` }
type ListingType ¶ added in v0.19.0
type ListingType string
const ( ListingTypeAll ListingType = "All" ListingTypeLocal ListingType = "Local" ListingTypeSubscribed ListingType = "Subscribed" ListingTypeModeratorView ListingType = "ModeratorView" )
type LocalSite ¶ added in v0.19.0
type LocalSite struct { ActorNameMaxLength int64 `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"` ApplicationEmailAdmins bool `json:"application_email_admins" url:"application_email_admins,omitempty"` ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"` CaptchaDifficulty string `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"` CaptchaEnabled bool `json:"captcha_enabled" url:"captcha_enabled,omitempty"` CommunityCreationAdminOnly bool `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"` DefaultPostListingType ListingType `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"` DefaultTheme string `json:"default_theme" url:"default_theme,omitempty"` EnableDownvotes bool `json:"enable_downvotes" url:"enable_downvotes,omitempty"` EnableNSFW bool `json:"enable_nsfw" url:"enable_nsfw,omitempty"` FederationEnabled bool `json:"federation_enabled" url:"federation_enabled,omitempty"` FederationSignedFetch bool `json:"federation_signed_fetch" url:"federation_signed_fetch,omitempty"` HideModlogModNames bool `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"` ID int64 `json:"id" url:"id,omitempty"` LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"` PrivateInstance bool `json:"private_instance" url:"private_instance,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` RegistrationMode RegistrationMode `json:"registration_mode" url:"registration_mode,omitempty"` ReportsEmailAdmins bool `json:"reports_email_admins" url:"reports_email_admins,omitempty"` RequireEmailVerification bool `json:"require_email_verification" url:"require_email_verification,omitempty"` SiteID int64 `json:"site_id" url:"site_id,omitempty"` SiteSetup bool `json:"site_setup" url:"site_setup,omitempty"` SlurFilterRegex Optional[string] `json:"slur_filter_regex" url:"slur_filter_regex,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type LocalSiteRateLimit ¶ added in v0.19.0
type LocalSiteRateLimit struct { Comment int64 `json:"comment" url:"comment,omitempty"` CommentPerSecond int64 `json:"comment_per_second" url:"comment_per_second,omitempty"` Image int64 `json:"image" url:"image,omitempty"` ImagePerSecond int64 `json:"image_per_second" url:"image_per_second,omitempty"` ImportUserSettings int64 `json:"import_user_settings" url:"import_user_settings,omitempty"` ImportUserSettingsPerSecond int64 `json:"import_user_settings_per_second" url:"import_user_settings_per_second,omitempty"` LocalSiteID int64 `json:"local_site_id" url:"local_site_id,omitempty"` Message int64 `json:"message" url:"message,omitempty"` MessagePerSecond int64 `json:"message_per_second" url:"message_per_second,omitempty"` Post int64 `json:"post" url:"post,omitempty"` PostPerSecond int64 `json:"post_per_second" url:"post_per_second,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Register int64 `json:"register" url:"register,omitempty"` RegisterPerSecond int64 `json:"register_per_second" url:"register_per_second,omitempty"` Search int64 `json:"search" url:"search,omitempty"` SearchPerSecond int64 `json:"search_per_second" url:"search_per_second,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type LocalUser ¶ added in v0.19.0
type LocalUser struct { AcceptedApplication bool `json:"accepted_application" url:"accepted_application,omitempty"` Admin bool `json:"admin" url:"admin,omitempty"` AutoExpand bool `json:"auto_expand" url:"auto_expand,omitempty"` BlurNSFW bool `json:"blur_nsfw" url:"blur_nsfw,omitempty"` CollapseBotComments bool `json:"collapse_bot_comments" url:"collapse_bot_comments,omitempty"` DefaultListingType ListingType `json:"default_listing_type" url:"default_listing_type,omitempty"` DefaultSortType SortType `json:"default_sort_type" url:"default_sort_type,omitempty"` Email Optional[string] `json:"email" url:"email,omitempty"` EmailVerified bool `json:"email_verified" url:"email_verified,omitempty"` EnableAnimatedImages bool `json:"enable_animated_images" url:"enable_animated_images,omitempty"` ID int64 `json:"id" url:"id,omitempty"` InfiniteScrollEnabled bool `json:"infinite_scroll_enabled" url:"infinite_scroll_enabled,omitempty"` InterfaceLanguage string `json:"interface_language" url:"interface_language,omitempty"` OpenLinksInNewTab bool `json:"open_links_in_new_tab" url:"open_links_in_new_tab,omitempty"` PersonID int64 `json:"person_id" url:"person_id,omitempty"` PostListingMode PostListingMode `json:"post_listing_mode" url:"post_listing_mode,omitempty"` SendNotificationsToEmail bool `json:"send_notifications_to_email" url:"send_notifications_to_email,omitempty"` ShowAvatars bool `json:"show_avatars" url:"show_avatars,omitempty"` ShowBotAccounts bool `json:"show_bot_accounts" url:"show_bot_accounts,omitempty"` ShowNSFW bool `json:"show_nsfw" url:"show_nsfw,omitempty"` ShowReadPosts bool `json:"show_read_posts" url:"show_read_posts,omitempty"` ShowScores bool `json:"show_scores" url:"show_scores,omitempty"` Theme string `json:"theme" url:"theme,omitempty"` TOTP2FAEnabled bool `json:"totp_2fa_enabled" url:"totp_2fa_enabled,omitempty"` }
type LocalUserView ¶ added in v0.19.0
type LocalUserView struct { Counts PersonAggregates `json:"counts" url:"counts,omitempty"` LocalUser LocalUser `json:"local_user" url:"local_user,omitempty"` Person Person `json:"person" url:"person,omitempty"` }
type LoginResponse ¶ added in v0.19.0
type MarkCommentReplyAsRead ¶ added in v0.19.0
type MarkPersonMentionAsRead ¶ added in v0.19.0
type MarkPostAsRead ¶ added in v0.19.0
type MarkPrivateMessageAsRead ¶ added in v0.19.0
type ModAdd ¶ added in v0.19.0
type ModAdd struct { ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` OtherPersonID int64 `json:"other_person_id" url:"other_person_id,omitempty"` Removed bool `json:"removed" url:"removed,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModAddCommunity ¶ added in v0.19.0
type ModAddCommunity struct { CommunityID int64 `json:"community_id" url:"community_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` OtherPersonID int64 `json:"other_person_id" url:"other_person_id,omitempty"` Removed bool `json:"removed" url:"removed,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModAddCommunityView ¶ added in v0.19.0
type ModAddCommunityView struct { Community Community `json:"community" url:"community,omitempty"` ModAddCommunity ModAddCommunity `json:"mod_add_community" url:"mod_add_community,omitempty"` ModdedPerson Person `json:"modded_person" url:"modded_person,omitempty"` Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"` }
type ModAddView ¶ added in v0.19.0
type ModBan ¶ added in v0.19.0
type ModBan struct { Banned bool `json:"banned" url:"banned,omitempty"` Expires Optional[string] `json:"expires" url:"expires,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` OtherPersonID int64 `json:"other_person_id" url:"other_person_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModBanFromCommunity ¶ added in v0.19.0
type ModBanFromCommunity struct { Banned bool `json:"banned" url:"banned,omitempty"` CommunityID int64 `json:"community_id" url:"community_id,omitempty"` Expires Optional[string] `json:"expires" url:"expires,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` OtherPersonID int64 `json:"other_person_id" url:"other_person_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModBanFromCommunityView ¶ added in v0.19.0
type ModBanFromCommunityView struct { BannedPerson Person `json:"banned_person" url:"banned_person,omitempty"` Community Community `json:"community" url:"community,omitempty"` ModBanFromCommunity ModBanFromCommunity `json:"mod_ban_from_community" url:"mod_ban_from_community,omitempty"` Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"` }
type ModBanView ¶ added in v0.19.0
type ModFeaturePost ¶ added in v0.19.0
type ModFeaturePost struct { Featured bool `json:"featured" url:"featured,omitempty"` ID int64 `json:"id" url:"id,omitempty"` IsFeaturedCommunity bool `json:"is_featured_community" url:"is_featured_community,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` PostID int64 `json:"post_id" url:"post_id,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModFeaturePostView ¶ added in v0.19.0
type ModFeaturePostView struct { Community Community `json:"community" url:"community,omitempty"` ModFeaturePost ModFeaturePost `json:"mod_feature_post" url:"mod_feature_post,omitempty"` Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"` Post Post `json:"post" url:"post,omitempty"` }
type ModHideCommunity ¶ added in v0.19.0
type ModHideCommunity struct { CommunityID int64 `json:"community_id" url:"community_id,omitempty"` Hidden bool `json:"hidden" url:"hidden,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModHideCommunityView ¶ added in v0.19.0
type ModHideCommunityView struct { Admin Optional[Person] `json:"admin" url:"admin,omitempty"` Community Community `json:"community" url:"community,omitempty"` ModHideCommunity ModHideCommunity `json:"mod_hide_community" url:"mod_hide_community,omitempty"` }
type ModLockPost ¶ added in v0.19.0
type ModLockPostView ¶ added in v0.19.0
type ModLockPostView struct { Community Community `json:"community" url:"community,omitempty"` ModLockPost ModLockPost `json:"mod_lock_post" url:"mod_lock_post,omitempty"` Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"` Post Post `json:"post" url:"post,omitempty"` }
type ModRemoveComment ¶ added in v0.19.0
type ModRemoveComment struct { CommentID int64 `json:"comment_id" url:"comment_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` Removed bool `json:"removed" url:"removed,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModRemoveCommentView ¶ added in v0.19.0
type ModRemoveCommentView struct { Comment Comment `json:"comment" url:"comment,omitempty"` Commenter Person `json:"commenter" url:"commenter,omitempty"` Community Community `json:"community" url:"community,omitempty"` ModRemoveComment ModRemoveComment `json:"mod_remove_comment" url:"mod_remove_comment,omitempty"` Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"` Post Post `json:"post" url:"post,omitempty"` }
type ModRemoveCommunity ¶ added in v0.19.0
type ModRemoveCommunity struct { CommunityID int64 `json:"community_id" url:"community_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` Removed bool `json:"removed" url:"removed,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModRemoveCommunityView ¶ added in v0.19.0
type ModRemoveCommunityView struct { Community Community `json:"community" url:"community,omitempty"` ModRemoveCommunity ModRemoveCommunity `json:"mod_remove_community" url:"mod_remove_community,omitempty"` Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"` }
type ModRemovePost ¶ added in v0.19.0
type ModRemovePost struct { ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` PostID int64 `json:"post_id" url:"post_id,omitempty"` Reason Optional[string] `json:"reason" url:"reason,omitempty"` Removed bool `json:"removed" url:"removed,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModRemovePostView ¶ added in v0.19.0
type ModRemovePostView struct { Community Community `json:"community" url:"community,omitempty"` ModRemovePost ModRemovePost `json:"mod_remove_post" url:"mod_remove_post,omitempty"` Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"` Post Post `json:"post" url:"post,omitempty"` }
type ModTransferCommunity ¶ added in v0.19.0
type ModTransferCommunity struct { CommunityID int64 `json:"community_id" url:"community_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"` OtherPersonID int64 `json:"other_person_id" url:"other_person_id,omitempty"` When time.Time `json:"when_" url:"when_,omitempty"` }
type ModTransferCommunityView ¶ added in v0.19.0
type ModTransferCommunityView struct { Community Community `json:"community" url:"community,omitempty"` ModTransferCommunity ModTransferCommunity `json:"mod_transfer_community" url:"mod_transfer_community,omitempty"` ModdedPerson Person `json:"modded_person" url:"modded_person,omitempty"` Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"` }
type ModlogActionType ¶ added in v0.19.0
type ModlogActionType string
const ( ModlogActionTypeAll ModlogActionType = "All" ModlogActionTypeModRemovePost ModlogActionType = "ModRemovePost" ModlogActionTypeModLockPost ModlogActionType = "ModLockPost" ModlogActionTypeModFeaturePost ModlogActionType = "ModFeaturePost" ModlogActionTypeModRemoveComment ModlogActionType = "ModRemoveComment" ModlogActionTypeModRemoveCommunity ModlogActionType = "ModRemoveCommunity" ModlogActionTypeModBanFromCommunity ModlogActionType = "ModBanFromCommunity" ModlogActionTypeModAddCommunity ModlogActionType = "ModAddCommunity" ModlogActionTypeModTransferCommunity ModlogActionType = "ModTransferCommunity" ModlogActionTypeModAdd ModlogActionType = "ModAdd" ModlogActionTypeModBan ModlogActionType = "ModBan" ModlogActionTypeModHideCommunity ModlogActionType = "ModHideCommunity" ModlogActionTypeAdminPurgePerson ModlogActionType = "AdminPurgePerson" ModlogActionTypeAdminPurgeCommunity ModlogActionType = "AdminPurgeCommunity" ModlogActionTypeAdminPurgePost ModlogActionType = "AdminPurgePost" ModlogActionTypeAdminPurgeComment ModlogActionType = "AdminPurgeComment" )
type MyUserInfo ¶ added in v0.19.0
type MyUserInfo struct { CommunityBlocks []CommunityBlockView `json:"community_blocks" url:"community_blocks,omitempty"` DiscussionLanguages []int64 `json:"discussion_languages" url:"discussion_languages,omitempty"` Follows []CommunityFollowerView `json:"follows" url:"follows,omitempty"` InstanceBlocks []InstanceBlockView `json:"instance_blocks" url:"instance_blocks,omitempty"` LocalUserView LocalUserView `json:"local_user_view" url:"local_user_view,omitempty"` Moderates []CommunityModeratorView `json:"moderates" url:"moderates,omitempty"` PersonBlocks []PersonBlockView `json:"person_blocks" url:"person_blocks,omitempty"` }
type Optional ¶ added in v0.19.0
type Optional[T any] struct { // contains filtered or unexported fields }
Optional represents an optional value
func NewOptional ¶ added in v0.19.0
NewOptional creates an optional with value v
func NewOptionalNil ¶ added in v0.19.0
NewOptionalNil creates a new nil optional value
func (Optional[T]) EncodeValues ¶ added in v0.19.0
EncodeValues encodes the optional as a URL query parameter
func (Optional[T]) GoString ¶ added in v0.19.0
GoString returns the Go representation of the optional value
func (Optional[T]) IsValid ¶ added in v0.19.0
IsValid returns true if the value of the optional is not nil
func (Optional[T]) MarshalJSON ¶ added in v0.19.0
MarshalJSON encodes the optional value as JSON
func (Optional[T]) String ¶ added in v0.19.0
String returns the string representation of the optional value
func (*Optional[T]) UnmarshalJSON ¶ added in v0.19.0
UnmarshalJSON decodes JSON into the optional value
func (Optional[T]) ValueOr ¶ added in v0.19.0
func (o Optional[T]) ValueOr(fallback T) T
ValueOr returns the value inside the optional if it exists, or else it returns fallback
func (Optional[T]) ValueOrZero ¶ added in v0.19.0
func (o Optional[T]) ValueOrZero() T
ValueOrZero returns the value inside the optional if it exists, or else it returns the zero value of T
type PasswordChangeAfterReset ¶ added in v0.19.0
type PasswordReset ¶ added in v0.19.0
type PasswordReset struct {
Email string `json:"email" url:"email,omitempty"`
}
type Person ¶ added in v0.19.0
type Person struct { ActorID string `json:"actor_id" url:"actor_id,omitempty"` Avatar Optional[string] `json:"avatar" url:"avatar,omitempty"` BanExpires Optional[string] `json:"ban_expires" url:"ban_expires,omitempty"` Banned bool `json:"banned" url:"banned,omitempty"` Banner Optional[string] `json:"banner" url:"banner,omitempty"` Bio Optional[string] `json:"bio" url:"bio,omitempty"` BotAccount bool `json:"bot_account" url:"bot_account,omitempty"` Deleted bool `json:"deleted" url:"deleted,omitempty"` DisplayName Optional[string] `json:"display_name" url:"display_name,omitempty"` ID int64 `json:"id" url:"id,omitempty"` InstanceID int64 `json:"instance_id" url:"instance_id,omitempty"` Local bool `json:"local" url:"local,omitempty"` MatrixUserID Optional[string] `json:"matrix_user_id" url:"matrix_user_id,omitempty"` Name string `json:"name" url:"name,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type PersonAggregates ¶ added in v0.19.0
type PersonBlockView ¶ added in v0.19.0
type PersonMention ¶ added in v0.19.0
type PersonMention struct { CommentID int64 `json:"comment_id" url:"comment_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Read bool `json:"read" url:"read,omitempty"` RecipientID int64 `json:"recipient_id" url:"recipient_id,omitempty"` }
type PersonMentionResponse ¶ added in v0.19.0
type PersonMentionResponse struct { PersonMentionView PersonMentionView `json:"person_mention_view" url:"person_mention_view,omitempty"` Error Optional[string] `json:"error"` }
type PersonMentionView ¶ added in v0.19.0
type PersonMentionView struct { Comment Comment `json:"comment" url:"comment,omitempty"` Community Community `json:"community" url:"community,omitempty"` Counts CommentAggregates `json:"counts" url:"counts,omitempty"` Creator Person `json:"creator" url:"creator,omitempty"` CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"` CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"` CreatorIsAdmin bool `json:"creator_is_admin" url:"creator_is_admin,omitempty"` CreatorIsModerator bool `json:"creator_is_moderator" url:"creator_is_moderator,omitempty"` MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"` PersonMention PersonMention `json:"person_mention" url:"person_mention,omitempty"` Post Post `json:"post" url:"post,omitempty"` Recipient Person `json:"recipient" url:"recipient,omitempty"` Saved bool `json:"saved" url:"saved,omitempty"` Subscribed SubscribedType `json:"subscribed" url:"subscribed,omitempty"` }
type PersonView ¶ added in v0.19.0
type PersonView struct { Counts PersonAggregates `json:"counts" url:"counts,omitempty"` IsAdmin bool `json:"is_admin" url:"is_admin,omitempty"` Person Person `json:"person" url:"person,omitempty"` }
type Post ¶ added in v0.19.0
type Post struct { ApID string `json:"ap_id" url:"ap_id,omitempty"` Body Optional[string] `json:"body" url:"body,omitempty"` CommunityID int64 `json:"community_id" url:"community_id,omitempty"` CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"` Deleted bool `json:"deleted" url:"deleted,omitempty"` EmbedDescription Optional[string] `json:"embed_description" url:"embed_description,omitempty"` EmbedTitle Optional[string] `json:"embed_title" url:"embed_title,omitempty"` EmbedVideoURL Optional[string] `json:"embed_video_url" url:"embed_video_url,omitempty"` FeaturedCommunity bool `json:"featured_community" url:"featured_community,omitempty"` FeaturedLocal bool `json:"featured_local" url:"featured_local,omitempty"` ID int64 `json:"id" url:"id,omitempty"` LanguageID int64 `json:"language_id" url:"language_id,omitempty"` Local bool `json:"local" url:"local,omitempty"` Locked bool `json:"locked" url:"locked,omitempty"` Name string `json:"name" url:"name,omitempty"` NSFW bool `json:"nsfw" url:"nsfw,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Removed bool `json:"removed" url:"removed,omitempty"` ThumbnailURL Optional[string] `json:"thumbnail_url" url:"thumbnail_url,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` URL Optional[string] `json:"url" url:"url,omitempty"` }
type PostAggregates ¶ added in v0.19.0
type PostAggregates struct { Comments int64 `json:"comments" url:"comments,omitempty"` Downvotes int64 `json:"downvotes" url:"downvotes,omitempty"` PostID int64 `json:"post_id" url:"post_id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Score int64 `json:"score" url:"score,omitempty"` Upvotes int64 `json:"upvotes" url:"upvotes,omitempty"` }
type PostFeatureType ¶ added in v0.19.0
type PostFeatureType string
const ( PostFeatureTypeLocal PostFeatureType = "Local" PostFeatureTypeCommunity PostFeatureType = "Community" )
type PostListingMode ¶ added in v0.19.0
type PostListingMode string
const ( PostListingModeList PostListingMode = "List" PostListingModeCard PostListingMode = "Card" PostListingModeSmallCard PostListingMode = "SmallCard" )
type PostReport ¶ added in v0.19.0
type PostReport struct { CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` OriginalPostBody Optional[string] `json:"original_post_body" url:"original_post_body,omitempty"` OriginalPostName string `json:"original_post_name" url:"original_post_name,omitempty"` OriginalPostURL Optional[string] `json:"original_post_url" url:"original_post_url,omitempty"` PostID int64 `json:"post_id" url:"post_id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Reason string `json:"reason" url:"reason,omitempty"` Resolved bool `json:"resolved" url:"resolved,omitempty"` ResolverID Optional[int64] `json:"resolver_id" url:"resolver_id,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type PostReportResponse ¶ added in v0.19.0
type PostReportResponse struct { PostReportView PostReportView `json:"post_report_view" url:"post_report_view,omitempty"` Error Optional[string] `json:"error"` }
type PostReportView ¶ added in v0.19.0
type PostReportView struct { Community Community `json:"community" url:"community,omitempty"` Counts PostAggregates `json:"counts" url:"counts,omitempty"` Creator Person `json:"creator" url:"creator,omitempty"` CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"` MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"` Post Post `json:"post" url:"post,omitempty"` PostCreator Person `json:"post_creator" url:"post_creator,omitempty"` PostReport PostReport `json:"post_report" url:"post_report,omitempty"` Resolver Optional[Person] `json:"resolver" url:"resolver,omitempty"` }
type PostResponse ¶ added in v0.19.0
type PostView ¶ added in v0.19.0
type PostView struct { Community Community `json:"community" url:"community,omitempty"` Counts PostAggregates `json:"counts" url:"counts,omitempty"` Creator Person `json:"creator" url:"creator,omitempty"` CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"` CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"` CreatorIsAdmin bool `json:"creator_is_admin" url:"creator_is_admin,omitempty"` CreatorIsModerator bool `json:"creator_is_moderator" url:"creator_is_moderator,omitempty"` MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"` Post Post `json:"post" url:"post,omitempty"` Read bool `json:"read" url:"read,omitempty"` Saved bool `json:"saved" url:"saved,omitempty"` Subscribed SubscribedType `json:"subscribed" url:"subscribed,omitempty"` UnreadComments int64 `json:"unread_comments" url:"unread_comments,omitempty"` }
type PrivateMessage ¶ added in v0.19.0
type PrivateMessage struct { ApID string `json:"ap_id" url:"ap_id,omitempty"` Content string `json:"content" url:"content,omitempty"` CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"` Deleted bool `json:"deleted" url:"deleted,omitempty"` ID int64 `json:"id" url:"id,omitempty"` Local bool `json:"local" url:"local,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Read bool `json:"read" url:"read,omitempty"` RecipientID int64 `json:"recipient_id" url:"recipient_id,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type PrivateMessageReport ¶ added in v0.19.0
type PrivateMessageReport struct { CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"` ID int64 `json:"id" url:"id,omitempty"` OriginalPMText string `json:"original_pm_text" url:"original_pm_text,omitempty"` PrivateMessageID int64 `json:"private_message_id" url:"private_message_id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Reason string `json:"reason" url:"reason,omitempty"` Resolved bool `json:"resolved" url:"resolved,omitempty"` ResolverID Optional[int64] `json:"resolver_id" url:"resolver_id,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type PrivateMessageReportResponse ¶ added in v0.19.0
type PrivateMessageReportResponse struct { PrivateMessageReportView PrivateMessageReportView `json:"private_message_report_view" url:"private_message_report_view,omitempty"` Error Optional[string] `json:"error"` }
type PrivateMessageReportView ¶ added in v0.19.0
type PrivateMessageReportView struct { Creator Person `json:"creator" url:"creator,omitempty"` PrivateMessage PrivateMessage `json:"private_message" url:"private_message,omitempty"` PrivateMessageCreator Person `json:"private_message_creator" url:"private_message_creator,omitempty"` PrivateMessageReport PrivateMessageReport `json:"private_message_report" url:"private_message_report,omitempty"` Resolver Optional[Person] `json:"resolver" url:"resolver,omitempty"` }
type PrivateMessageResponse ¶ added in v0.19.0
type PrivateMessageResponse struct { PrivateMessageView PrivateMessageView `json:"private_message_view" url:"private_message_view,omitempty"` Error Optional[string] `json:"error"` }
type PrivateMessageView ¶ added in v0.19.0
type PrivateMessageView struct { Creator Person `json:"creator" url:"creator,omitempty"` PrivateMessage PrivateMessage `json:"private_message" url:"private_message,omitempty"` Recipient Person `json:"recipient" url:"recipient,omitempty"` }
type PrivateMessagesResponse ¶ added in v0.19.0
type PrivateMessagesResponse struct { PrivateMessages []PrivateMessageView `json:"private_messages" url:"private_messages,omitempty"` Error Optional[string] `json:"error"` }
type PurgeComment ¶ added in v0.19.0
type PurgeCommunity ¶ added in v0.19.0
type PurgePerson ¶ added in v0.19.0
type ReadableFederationState ¶ added in v0.19.0
type ReadableFederationState struct { FailCount int64 `json:"fail_count" url:"fail_count,omitempty"` InstanceID int64 `json:"instance_id" url:"instance_id,omitempty"` LastRetry Optional[string] `json:"last_retry" url:"last_retry,omitempty"` LastSuccessfulID Optional[int64] `json:"last_successful_id" url:"last_successful_id,omitempty"` LastSuccessfulPublishedTime Optional[string] `json:"last_successful_published_time" url:"last_successful_published_time,omitempty"` NextRetry Optional[string] `json:"next_retry" url:"next_retry,omitempty"` }
type Register ¶ added in v0.19.0
type Register struct { Answer Optional[string] `json:"answer" url:"answer,omitempty"` CaptchaAnswer Optional[string] `json:"captcha_answer" url:"captcha_answer,omitempty"` CaptchaUUID Optional[string] `json:"captcha_uuid" url:"captcha_uuid,omitempty"` Email Optional[string] `json:"email" url:"email,omitempty"` Honeypot Optional[string] `json:"honeypot" url:"honeypot,omitempty"` Password string `json:"password" url:"password,omitempty"` PasswordVerify string `json:"password_verify" url:"password_verify,omitempty"` ShowNSFW bool `json:"show_nsfw" url:"show_nsfw,omitempty"` Username string `json:"username" url:"username,omitempty"` }
type RegistrationApplication ¶ added in v0.19.0
type RegistrationApplication struct { AdminID Optional[int64] `json:"admin_id" url:"admin_id,omitempty"` Answer string `json:"answer" url:"answer,omitempty"` DenyReason Optional[string] `json:"deny_reason" url:"deny_reason,omitempty"` ID int64 `json:"id" url:"id,omitempty"` LocalUserID int64 `json:"local_user_id" url:"local_user_id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` }
type RegistrationApplicationResponse ¶ added in v0.19.0
type RegistrationApplicationResponse struct { RegistrationApplication RegistrationApplicationView `json:"registration_application" url:"registration_application,omitempty"` Error Optional[string] `json:"error"` }
type RegistrationApplicationView ¶ added in v0.19.0
type RegistrationApplicationView struct { Admin Optional[Person] `json:"admin" url:"admin,omitempty"` Creator Person `json:"creator" url:"creator,omitempty"` CreatorLocalUser LocalUser `json:"creator_local_user" url:"creator_local_user,omitempty"` RegistrationApplication RegistrationApplication `json:"registration_application" url:"registration_application,omitempty"` }
type RegistrationMode ¶ added in v0.19.0
type RegistrationMode string
const ( RegistrationModeClosed RegistrationMode = "Closed" RegistrationModeRequireApplication RegistrationMode = "RequireApplication" RegistrationModeOpen RegistrationMode = "Open" )
type RemoveComment ¶ added in v0.19.0
type RemoveCommunity ¶ added in v0.19.0
type RemovePost ¶ added in v0.19.0
type ResolveCommentReport ¶ added in v0.19.0
type ResolveObject ¶ added in v0.19.0
type ResolveObject struct {
Q string `json:"q" url:"q,omitempty"`
}
type ResolveObjectResponse ¶ added in v0.19.0
type ResolveObjectResponse struct { Comment Optional[CommentView] `json:"comment" url:"comment,omitempty"` Community Optional[CommunityView] `json:"community" url:"community,omitempty"` Person Optional[PersonView] `json:"person" url:"person,omitempty"` Post Optional[PostView] `json:"post" url:"post,omitempty"` Error Optional[string] `json:"error"` }
type ResolvePostReport ¶ added in v0.19.0
type ResolvePrivateMessageReport ¶ added in v0.19.0
type SaveComment ¶ added in v0.19.0
type SaveUserSettings ¶ added in v0.19.0
type SaveUserSettings struct { AutoExpand Optional[bool] `json:"auto_expand" url:"auto_expand,omitempty"` Avatar Optional[string] `json:"avatar" url:"avatar,omitempty"` Banner Optional[string] `json:"banner" url:"banner,omitempty"` Bio Optional[string] `json:"bio" url:"bio,omitempty"` BlurNSFW Optional[bool] `json:"blur_nsfw" url:"blur_nsfw,omitempty"` BotAccount Optional[bool] `json:"bot_account" url:"bot_account,omitempty"` CollapseBotComments Optional[bool] `json:"collapse_bot_comments" url:"collapse_bot_comments,omitempty"` DefaultListingType Optional[ListingType] `json:"default_listing_type" url:"default_listing_type,omitempty"` DefaultSortType Optional[SortType] `json:"default_sort_type" url:"default_sort_type,omitempty"` DiscussionLanguages Optional[[]int64] `json:"discussion_languages" url:"discussion_languages,omitempty"` DisplayName Optional[string] `json:"display_name" url:"display_name,omitempty"` Email Optional[string] `json:"email" url:"email,omitempty"` EnableAnimatedImages Optional[bool] `json:"enable_animated_images" url:"enable_animated_images,omitempty"` InfiniteScrollEnabled Optional[bool] `json:"infinite_scroll_enabled" url:"infinite_scroll_enabled,omitempty"` InterfaceLanguage Optional[string] `json:"interface_language" url:"interface_language,omitempty"` MatrixUserID Optional[string] `json:"matrix_user_id" url:"matrix_user_id,omitempty"` OpenLinksInNewTab Optional[bool] `json:"open_links_in_new_tab" url:"open_links_in_new_tab,omitempty"` PostListingMode Optional[PostListingMode] `json:"post_listing_mode" url:"post_listing_mode,omitempty"` SendNotificationsToEmail Optional[bool] `json:"send_notifications_to_email" url:"send_notifications_to_email,omitempty"` ShowAvatars Optional[bool] `json:"show_avatars" url:"show_avatars,omitempty"` ShowBotAccounts Optional[bool] `json:"show_bot_accounts" url:"show_bot_accounts,omitempty"` ShowNSFW Optional[bool] `json:"show_nsfw" url:"show_nsfw,omitempty"` ShowReadPosts Optional[bool] `json:"show_read_posts" url:"show_read_posts,omitempty"` ShowScores Optional[bool] `json:"show_scores" url:"show_scores,omitempty"` Theme Optional[string] `json:"theme" url:"theme,omitempty"` }
type Search ¶ added in v0.19.0
type Search struct { CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"` CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"` CreatorID Optional[int64] `json:"creator_id" url:"creator_id,omitempty"` Limit Optional[int64] `json:"limit" url:"limit,omitempty"` ListingType Optional[ListingType] `json:"listing_type" url:"listing_type,omitempty"` Page Optional[int64] `json:"page" url:"page,omitempty"` Q string `json:"q" url:"q,omitempty"` Sort Optional[SortType] `json:"sort" url:"sort,omitempty"` Type Optional[SearchType] `json:"type_" url:"type_,omitempty"` }
type SearchResponse ¶ added in v0.19.0
type SearchResponse struct { Comments []CommentView `json:"comments" url:"comments,omitempty"` Communities []CommunityView `json:"communities" url:"communities,omitempty"` Posts []PostView `json:"posts" url:"posts,omitempty"` Type SearchType `json:"type_" url:"type_,omitempty"` Users []PersonView `json:"users" url:"users,omitempty"` Error Optional[string] `json:"error"` }
type SearchType ¶ added in v0.19.0
type SearchType string
const ( SearchTypeAll SearchType = "All" SearchTypeComments SearchType = "Comments" SearchTypePosts SearchType = "Posts" SearchTypeCommunities SearchType = "Communities" SearchTypeUsers SearchType = "Users" SearchTypeUrl SearchType = "Url" )
type Site ¶ added in v0.19.0
type Site struct { ActorID string `json:"actor_id" url:"actor_id,omitempty"` Banner Optional[string] `json:"banner" url:"banner,omitempty"` Description Optional[string] `json:"description" url:"description,omitempty"` Icon Optional[string] `json:"icon" url:"icon,omitempty"` ID int64 `json:"id" url:"id,omitempty"` InboxURL string `json:"inbox_url" url:"inbox_url,omitempty"` InstanceID int64 `json:"instance_id" url:"instance_id,omitempty"` LastRefreshedAt string `json:"last_refreshed_at" url:"last_refreshed_at,omitempty"` Name string `json:"name" url:"name,omitempty"` PrivateKey Optional[string] `json:"private_key" url:"private_key,omitempty"` PublicKey string `json:"public_key" url:"public_key,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type SiteAggregates ¶ added in v0.19.0
type SiteAggregates struct { Comments int64 `json:"comments" url:"comments,omitempty"` Communities int64 `json:"communities" url:"communities,omitempty"` Posts int64 `json:"posts" url:"posts,omitempty"` SiteID int64 `json:"site_id" url:"site_id,omitempty"` Users int64 `json:"users" url:"users,omitempty"` UsersActiveDay int64 `json:"users_active_day" url:"users_active_day,omitempty"` UsersActiveHalfYear int64 `json:"users_active_half_year" url:"users_active_half_year,omitempty"` UsersActiveMonth int64 `json:"users_active_month" url:"users_active_month,omitempty"` UsersActiveWeek int64 `json:"users_active_week" url:"users_active_week,omitempty"` }
type SiteMetadata ¶ added in v0.19.0
type SiteMetadata struct { Description Optional[string] `json:"description" url:"description,omitempty"` EmbedVideoURL Optional[string] `json:"embed_video_url" url:"embed_video_url,omitempty"` Image Optional[string] `json:"image" url:"image,omitempty"` Title Optional[string] `json:"title" url:"title,omitempty"` }
type SiteResponse ¶ added in v0.19.0
type SiteView ¶ added in v0.19.0
type SiteView struct { Counts SiteAggregates `json:"counts" url:"counts,omitempty"` LocalSite LocalSite `json:"local_site" url:"local_site,omitempty"` LocalSiteRateLimit LocalSiteRateLimit `json:"local_site_rate_limit" url:"local_site_rate_limit,omitempty"` Site Site `json:"site" url:"site,omitempty"` }
type SortType ¶ added in v0.19.0
type SortType string
const ( SortTypeActive SortType = "Active" SortTypeHot SortType = "Hot" SortTypeNew SortType = "New" SortTypeOld SortType = "Old" SortTypeTopDay SortType = "TopDay" SortTypeTopWeek SortType = "TopWeek" SortTypeTopMonth SortType = "TopMonth" SortTypeTopYear SortType = "TopYear" SortTypeTopAll SortType = "TopAll" SortTypeMostComments SortType = "MostComments" SortTypeNewComments SortType = "NewComments" SortTypeTopHour SortType = "TopHour" SortTypeTopSixHour SortType = "TopSixHour" SortTypeTopTwelveHour SortType = "TopTwelveHour" SortTypeTopThreeMonths SortType = "TopThreeMonths" SortTypeTopSixMonths SortType = "TopSixMonths" SortTypeTopNineMonths SortType = "TopNineMonths" SortTypeControversial SortType = "Controversial" SortTypeScaled SortType = "Scaled" )
type SubscribedType ¶ added in v0.19.0
type SubscribedType string
const ( SubscribedTypeSubscribed SubscribedType = "Subscribed" SubscribedTypeNotSubscribed SubscribedType = "NotSubscribed" SubscribedTypePending SubscribedType = "Pending" )
type SuccessResponse ¶ added in v0.19.0
type Tagline ¶ added in v0.19.0
type Tagline struct { Content string `json:"content" url:"content,omitempty"` ID int64 `json:"id" url:"id,omitempty"` LocalSiteID int64 `json:"local_site_id" url:"local_site_id,omitempty"` Published time.Time `json:"published" url:"published,omitempty"` Updated time.Time `json:"updated" url:"updated,omitempty"` }
type TransferCommunity ¶ added in v0.19.0
type VerifyEmail ¶ added in v0.19.0
type VerifyEmail struct {
Token string `json:"token" url:"token,omitempty"`
}