lemmy

package module
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: GPL-3.0 Imports: 10 Imported by: 8

README

Go-Lemmy

Go Reference

Go bindings to the Lemmy API, automatically generated from Lemmy's source code using the generator in cmd/gen.

Examples

Examples can be found in the examples directory.

How to generate

First, clone the lemmy-js-client repo at whatever version you need:

git clone https://github.com/LemmyNet/lemmy-js-client -b 0.18.3

Inside it, build the JSON docs file:

npm run docs -- --json docs.json

Next, build the generator:

go build ./cmd/gen

Remove all the existing generated code:

rm **/*.gen.go

Execute the generator:

./gen -json-file <path_to_docs.json> -out-dir .

And that's it! Your generated code should be ready for use.

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 AddAdmin added in v0.19.0

type AddAdmin struct {
	Added    bool  `json:"added" url:"added,omitempty"`
	PersonID int64 `json:"person_id" url:"person_id,omitempty"`
}

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 AddModToCommunity struct {
	Added       bool  `json:"added" url:"added,omitempty"`
	CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
	PersonID    int64 `json:"person_id" url:"person_id,omitempty"`
}

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 AdminPurgeCommunity struct {
	AdminPersonID int64            `json:"admin_person_id" url:"admin_person_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 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 AdminPurgePerson struct {
	AdminPersonID int64            `json:"admin_person_id" url:"admin_person_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 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 ApproveRegistrationApplication struct {
	Approve    bool             `json:"approve" url:"approve,omitempty"`
	DenyReason Optional[string] `json:"deny_reason" url:"deny_reason,omitempty"`
	ID         int64            `json:"id" url:"id,omitempty"`
}

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 BlockCommunity struct {
	Block       bool  `json:"block" url:"block,omitempty"`
	CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
}

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 BlockInstance struct {
	Block      bool  `json:"block" url:"block,omitempty"`
	InstanceID int64 `json:"instance_id" url:"instance_id,omitempty"`
}

type BlockInstanceResponse added in v0.19.0

type BlockInstanceResponse struct {
	Blocked bool             `json:"blocked" url:"blocked,omitempty"`
	Error   Optional[string] `json:"error"`
}

type BlockPerson added in v0.19.0

type BlockPerson struct {
	Block    bool  `json:"block" url:"block,omitempty"`
	PersonID int64 `json:"person_id" url:"person_id,omitempty"`
}

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 CaptchaResponse struct {
	PNG   string           `json:"png" url:"png,omitempty"`
	UUID  string           `json:"uuid" url:"uuid,omitempty"`
	WAV   string           `json:"wav" url:"wav,omitempty"`
	Error Optional[string] `json:"error"`
}

type ChangePassword added in v0.19.0

type ChangePassword struct {
	NewPassword       string `json:"new_password" url:"new_password,omitempty"`
	NewPasswordVerify string `json:"new_password_verify" url:"new_password_verify,omitempty"`
	OldPassword       string `json:"old_password" url:"old_password,omitempty"`
}

type Client

type Client struct {
	Token string
	// contains filtered or unexported fields
}

Client is a client for Lemmy's HTTP API

func New

func New(baseURL string) (*Client, error)

New creates a new Lemmy client with the default HTTP client.

func NewWithClient

func NewWithClient(baseURL string, client *http.Client) (*Client, error)

NewWithClient creates a new Lemmy client with the given HTTP client

func (*Client) AddAdmin

func (c *Client) AddAdmin(ctx context.Context, data AddAdmin) (*AddAdminResponse, error)

Add an admin to your site.

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) BanPerson

func (c *Client) BanPerson(ctx context.Context, data BanPerson) (*BanPersonResponse, error)

Ban a person from your site.

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

func (c *Client) ClientLogin(ctx context.Context, data Login) error

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) EditPost

func (c *Client) EditPost(ctx context.Context, data EditPost) (*PostResponse, error)

Edit a post.

func (*Client) EditPrivateMessage

func (c *Client) EditPrivateMessage(ctx context.Context, data EditPrivateMessage) (*PrivateMessageResponse, error)

Edit a private message.

func (*Client) EditSite

func (c *Client) EditSite(ctx context.Context, data EditSite) (*SiteResponse, error)

Edit your site.

func (*Client) ExportSettings added in v0.19.0

func (c *Client) ExportSettings(ctx context.Context) error

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) LockPost

func (c *Client) LockPost(ctx context.Context, data LockPost) (*PostResponse, error)

A moderator can lock a post ( IE disable new comments ).

func (*Client) Login

func (c *Client) Login(ctx context.Context, data Login) (*LoginResponse, error)

Log into lemmy.

func (*Client) Logins added in v0.19.0

func (c *Client) Logins(ctx context.Context) error

List login tokens for your user

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) Modlog

func (c *Client) Modlog(ctx context.Context, data GetModlog) (*GetModlogResponse, error)

Get the modlog.

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) Post

func (c *Client) Post(ctx context.Context, data GetPost) (*GetPostResponse, error)

Get / fetch a post.

func (*Client) PostReports

func (c *Client) PostReports(ctx context.Context, data ListPostReports) (*ListPostReportsResponse, error)

List post reports.

func (*Client) Posts

func (c *Client) Posts(ctx context.Context, data GetPosts) (*GetPostsResponse, error)

Get / fetch posts, with various filters.

func (*Client) PrivateMessageReports

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) PurgePost

func (c *Client) PurgePost(ctx context.Context, data PurgePost) (*SuccessResponse, error)

Purge / Delete a post from the database.

func (*Client) Register

func (c *Client) Register(ctx context.Context, data Register) (*LoginResponse, error)

Register a new user.

func (*Client) RegistrationApplications

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) SavePost

func (c *Client) SavePost(ctx context.Context, data SavePost) (*PostResponse, error)

Save a post.

func (*Client) SaveUserSettings

func (c *Client) SaveUserSettings(ctx context.Context, data SaveUserSettings) (*SuccessResponse, error)

Save your user settings.

func (*Client) Search

func (c *Client) Search(ctx context.Context, data Search) (*SearchResponse, error)

Search lemmy.

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 CommunityBlockView struct {
	Community Community `json:"community" url:"community,omitempty"`
	Person    Person    `json:"person" url:"person,omitempty"`
}

type CommunityFollowerView added in v0.19.0

type CommunityFollowerView struct {
	Community Community `json:"community" url:"community,omitempty"`
	Follower  Person    `json:"follower" url:"follower,omitempty"`
}

type CommunityModeratorView added in v0.19.0

type CommunityModeratorView struct {
	Community Community `json:"community" url:"community,omitempty"`
	Moderator Person    `json:"moderator" url:"moderator,omitempty"`
}

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 CreateComment struct {
	Content    string          `json:"content" url:"content,omitempty"`
	LanguageID Optional[int64] `json:"language_id" url:"language_id,omitempty"`
	ParentID   Optional[int64] `json:"parent_id" url:"parent_id,omitempty"`
	PostID     int64           `json:"post_id" url:"post_id,omitempty"`
}

type CreateCommentLike added in v0.19.0

type CreateCommentLike struct {
	CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
	Score     int64 `json:"score" url:"score,omitempty"`
}

type CreateCommentReport added in v0.19.0

type CreateCommentReport struct {
	CommentID int64  `json:"comment_id" url:"comment_id,omitempty"`
	Reason    string `json:"reason" url:"reason,omitempty"`
}

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 CreatePostLike struct {
	PostID int64 `json:"post_id" url:"post_id,omitempty"`
	Score  int64 `json:"score" url:"score,omitempty"`
}

type CreatePostReport added in v0.19.0

type CreatePostReport struct {
	PostID int64  `json:"post_id" url:"post_id,omitempty"`
	Reason string `json:"reason" url:"reason,omitempty"`
}

type CreatePrivateMessage added in v0.19.0

type CreatePrivateMessage struct {
	Content     string `json:"content" url:"content,omitempty"`
	RecipientID int64  `json:"recipient_id" url:"recipient_id,omitempty"`
}

type CreatePrivateMessageReport added in v0.19.0

type CreatePrivateMessageReport struct {
	PrivateMessageID int64  `json:"private_message_id" url:"private_message_id,omitempty"`
	Reason           string `json:"reason" url:"reason,omitempty"`
}

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 CustomEmojiKeyword struct {
	CustomEmojiID int64  `json:"custom_emoji_id" url:"custom_emoji_id,omitempty"`
	Keyword       string `json:"keyword" url:"keyword,omitempty"`
}

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 DeleteAccount struct {
	DeleteContent bool   `json:"delete_content" url:"delete_content,omitempty"`
	Password      string `json:"password" url:"password,omitempty"`
}

type DeleteComment added in v0.19.0

type DeleteComment struct {
	CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
	Deleted   bool  `json:"deleted" url:"deleted,omitempty"`
}

type DeleteCommunity added in v0.19.0

type DeleteCommunity struct {
	CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
	Deleted     bool  `json:"deleted" url:"deleted,omitempty"`
}

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 DeletePost struct {
	Deleted bool  `json:"deleted" url:"deleted,omitempty"`
	PostID  int64 `json:"post_id" url:"post_id,omitempty"`
}

type DeletePrivateMessage added in v0.19.0

type DeletePrivateMessage struct {
	Deleted          bool  `json:"deleted" url:"deleted,omitempty"`
	PrivateMessageID int64 `json:"private_message_id" url:"private_message_id,omitempty"`
}

type DistinguishComment added in v0.19.0

type DistinguishComment struct {
	CommentID     int64 `json:"comment_id" url:"comment_id,omitempty"`
	Distinguished bool  `json:"distinguished" url:"distinguished,omitempty"`
}

type EditComment added in v0.19.0

type EditComment struct {
	CommentID  int64            `json:"comment_id" url:"comment_id,omitempty"`
	Content    Optional[string] `json:"content" url:"content,omitempty"`
	LanguageID Optional[int64]  `json:"language_id" url:"language_id,omitempty"`
}

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 EditPrivateMessage struct {
	Content          string `json:"content" url:"content,omitempty"`
	PrivateMessageID int64  `json:"private_message_id" url:"private_message_id,omitempty"`
}

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 Error added in v0.19.0

type Error struct {
	ErrStr string
	Code   int
}

Error represents an error returned by the Lemmy API

func (Error) Error added in v0.19.0

func (le Error) Error() string

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 FollowCommunity struct {
	CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
	Follow      bool  `json:"follow" url:"follow,omitempty"`
}

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 GetCommunity struct {
	ID   Optional[int64]  `json:"id" url:"id,omitempty"`
	Name Optional[string] `json:"name" url:"name,omitempty"`
}

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 GetPersonMentions struct {
	Limit      Optional[int64]           `json:"limit" url:"limit,omitempty"`
	Page       Optional[int64]           `json:"page" url:"page,omitempty"`
	Sort       Optional[CommentSortType] `json:"sort" url:"sort,omitempty"`
	UnreadOnly Optional[bool]            `json:"unread_only" url:"unread_only,omitempty"`
}

type GetPersonMentionsResponse added in v0.19.0

type GetPersonMentionsResponse struct {
	Mentions []PersonMentionView `json:"mentions" url:"mentions,omitempty"`
	Error    Optional[string]    `json:"error"`
}

type GetPost added in v0.19.0

type GetPost struct {
	CommentID Optional[int64] `json:"comment_id" url:"comment_id,omitempty"`
	ID        Optional[int64] `json:"id" url:"id,omitempty"`
}

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 GetPostsResponse struct {
	NextPage Optional[string] `json:"next_page" url:"next_page,omitempty"`
	Posts    []PostView       `json:"posts" url:"posts,omitempty"`
	Error    Optional[string] `json:"error"`
}

type GetPrivateMessages added in v0.19.0

type GetPrivateMessages struct {
	CreatorID  Optional[int64] `json:"creator_id" url:"creator_id,omitempty"`
	Limit      Optional[int64] `json:"limit" url:"limit,omitempty"`
	Page       Optional[int64] `json:"page" url:"page,omitempty"`
	UnreadOnly Optional[bool]  `json:"unread_only" url:"unread_only,omitempty"`
}

type GetReplies added in v0.19.0

type GetReplies struct {
	Limit      Optional[int64]           `json:"limit" url:"limit,omitempty"`
	Page       Optional[int64]           `json:"page" url:"page,omitempty"`
	Sort       Optional[CommentSortType] `json:"sort" url:"sort,omitempty"`
	UnreadOnly Optional[bool]            `json:"unread_only" url:"unread_only,omitempty"`
}

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 GetReportCount struct {
	CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"`
}

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 GetUnreadCountResponse struct {
	Mentions        int64            `json:"mentions" url:"mentions,omitempty"`
	PrivateMessages int64            `json:"private_messages" url:"private_messages,omitempty"`
	Replies         int64            `json:"replies" url:"replies,omitempty"`
	Error           Optional[string] `json:"error"`
}

type GetUnreadRegistrationApplicationCountResponse added in v0.19.0

type GetUnreadRegistrationApplicationCountResponse struct {
	RegistrationApplications int64            `json:"registration_applications" url:"registration_applications,omitempty"`
	Error                    Optional[string] `json:"error"`
}

type HideCommunity added in v0.19.0

type HideCommunity struct {
	CommunityID int64            `json:"community_id" url:"community_id,omitempty"`
	Hidden      bool             `json:"hidden" url:"hidden,omitempty"`
	Reason      Optional[string] `json:"reason" url:"reason,omitempty"`
}

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 InstanceBlockView struct {
	Instance Instance       `json:"instance" url:"instance,omitempty"`
	Person   Person         `json:"person" url:"person,omitempty"`
	Site     Optional[Site] `json:"site" url:"site,omitempty"`
}

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 Language added in v0.19.0

type Language struct {
	Code string `json:"code" url:"code,omitempty"`
	ID   int64  `json:"id" url:"id,omitempty"`
	Name string `json:"name" url:"name,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 ListPrivateMessageReports struct {
	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 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 ListRegistrationApplications struct {
	Limit      Optional[int64] `json:"limit" url:"limit,omitempty"`
	Page       Optional[int64] `json:"page" url:"page,omitempty"`
	UnreadOnly Optional[bool]  `json:"unread_only" url:"unread_only,omitempty"`
}

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"`
	EnableKeyboardNavigation bool             `json:"enable_keyboard_navigation" url:"enable_keyboard_navigation,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 LockPost added in v0.19.0

type LockPost struct {
	Locked bool  `json:"locked" url:"locked,omitempty"`
	PostID int64 `json:"post_id" url:"post_id,omitempty"`
}

type Login added in v0.19.0

type Login struct {
	Password        string           `json:"password" url:"password,omitempty"`
	TOTP2FAToken    Optional[string] `json:"totp_2fa_token" url:"totp_2fa_token,omitempty"`
	UsernameOrEmail string           `json:"username_or_email" url:"username_or_email,omitempty"`
}

type LoginResponse added in v0.19.0

type LoginResponse struct {
	JWT                 Optional[string] `json:"jwt" url:"jwt,omitempty"`
	RegistrationCreated bool             `json:"registration_created" url:"registration_created,omitempty"`
	VerifyEmailSent     bool             `json:"verify_email_sent" url:"verify_email_sent,omitempty"`
	Error               Optional[string] `json:"error"`
}

type MarkCommentReplyAsRead added in v0.19.0

type MarkCommentReplyAsRead struct {
	CommentReplyID int64 `json:"comment_reply_id" url:"comment_reply_id,omitempty"`
	Read           bool  `json:"read" url:"read,omitempty"`
}

type MarkPersonMentionAsRead added in v0.19.0

type MarkPersonMentionAsRead struct {
	PersonMentionID int64 `json:"person_mention_id" url:"person_mention_id,omitempty"`
	Read            bool  `json:"read" url:"read,omitempty"`
}

type MarkPostAsRead added in v0.19.0

type MarkPostAsRead struct {
	PostID  Optional[int64]   `json:"post_id" url:"post_id,omitempty"`
	PostIDs Optional[[]int64] `json:"post_ids" url:"post_ids,omitempty"`
	Read    bool              `json:"read" url:"read,omitempty"`
}

type MarkPrivateMessageAsRead added in v0.19.0

type MarkPrivateMessageAsRead struct {
	PrivateMessageID int64 `json:"private_message_id" url:"private_message_id,omitempty"`
	Read             bool  `json:"read" url:"read,omitempty"`
}

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 ModAddView struct {
	ModAdd       ModAdd           `json:"mod_add" url:"mod_add,omitempty"`
	ModdedPerson Person           `json:"modded_person" url:"modded_person,omitempty"`
	Moderator    Optional[Person] `json:"moderator" url:"moderator,omitempty"`
}

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 ModBanView struct {
	BannedPerson Person           `json:"banned_person" url:"banned_person,omitempty"`
	ModBan       ModBan           `json:"mod_ban" url:"mod_ban,omitempty"`
	Moderator    Optional[Person] `json:"moderator" url:"moderator,omitempty"`
}

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 ModLockPost struct {
	ID          int64     `json:"id" url:"id,omitempty"`
	Locked      bool      `json:"locked" url:"locked,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 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

func NewOptional[T any](v T) Optional[T]

NewOptional creates an optional with value v

func NewOptionalNil added in v0.19.0

func NewOptionalNil[T any]() Optional[T]

NewOptionalNil creates a new nil optional value

func (Optional[T]) EncodeValues added in v0.19.0

func (o Optional[T]) EncodeValues(key string, v *url.Values) error

EncodeValues encodes the optional as a URL query parameter

func (Optional[T]) GoString added in v0.19.0

func (o Optional[T]) GoString() string

GoString returns the Go representation of the optional value

func (Optional[T]) IsValid added in v0.19.0

func (o Optional[T]) IsValid() bool

IsValid returns true if the value of the optional is not nil

func (Optional[T]) MarshalJSON added in v0.19.0

func (o Optional[T]) MarshalJSON() ([]byte, error)

MarshalJSON encodes the optional value as JSON

func (Optional[T]) Set added in v0.19.0

func (o Optional[T]) Set(v T) Optional[T]

Set sets the value of the optional

func (Optional[T]) SetNil added in v0.19.0

func (o Optional[T]) SetNil() Optional[T]

SetNil sets the optional value to nil

func (Optional[T]) String added in v0.19.0

func (o Optional[T]) String() string

String returns the string representation of the optional value

func (*Optional[T]) UnmarshalJSON added in v0.19.0

func (o *Optional[T]) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes JSON into the optional value

func (Optional[T]) Value added in v0.19.0

func (o Optional[T]) Value() (T, bool)

Value returns the value in the optional.

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 PasswordChangeAfterReset struct {
	Password       string `json:"password" url:"password,omitempty"`
	PasswordVerify string `json:"password_verify" url:"password_verify,omitempty"`
	Token          string `json:"token" url:"token,omitempty"`
}

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 PersonAggregates struct {
	CommentCount int64 `json:"comment_count" url:"comment_count,omitempty"`
	PersonID     int64 `json:"person_id" url:"person_id,omitempty"`
	PostCount    int64 `json:"post_count" url:"post_count,omitempty"`
}

type PersonBlockView added in v0.19.0

type PersonBlockView struct {
	Person Person `json:"person" url:"person,omitempty"`
	Target Person `json:"target" url:"target,omitempty"`
}

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 PostResponse struct {
	PostView PostView         `json:"post_view" url:"post_view,omitempty"`
	Error    Optional[string] `json:"error"`
}

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 PurgeComment struct {
	CommentID int64            `json:"comment_id" url:"comment_id,omitempty"`
	Reason    Optional[string] `json:"reason" url:"reason,omitempty"`
}

type PurgeCommunity added in v0.19.0

type PurgeCommunity struct {
	CommunityID int64            `json:"community_id" url:"community_id,omitempty"`
	Reason      Optional[string] `json:"reason" url:"reason,omitempty"`
}

type PurgePerson added in v0.19.0

type PurgePerson struct {
	PersonID int64            `json:"person_id" url:"person_id,omitempty"`
	Reason   Optional[string] `json:"reason" url:"reason,omitempty"`
}

type PurgePost added in v0.19.0

type PurgePost struct {
	PostID int64            `json:"post_id" url:"post_id,omitempty"`
	Reason Optional[string] `json:"reason" url:"reason,omitempty"`
}

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 RemoveComment struct {
	CommentID int64            `json:"comment_id" url:"comment_id,omitempty"`
	Reason    Optional[string] `json:"reason" url:"reason,omitempty"`
	Removed   bool             `json:"removed" url:"removed,omitempty"`
}

type RemoveCommunity added in v0.19.0

type RemoveCommunity struct {
	CommunityID int64            `json:"community_id" url:"community_id,omitempty"`
	Reason      Optional[string] `json:"reason" url:"reason,omitempty"`
	Removed     bool             `json:"removed" url:"removed,omitempty"`
}

type RemovePost added in v0.19.0

type RemovePost struct {
	PostID  int64            `json:"post_id" url:"post_id,omitempty"`
	Reason  Optional[string] `json:"reason" url:"reason,omitempty"`
	Removed bool             `json:"removed" url:"removed,omitempty"`
}

type ResolveCommentReport added in v0.19.0

type ResolveCommentReport struct {
	ReportID int64 `json:"report_id" url:"report_id,omitempty"`
	Resolved bool  `json:"resolved" url:"resolved,omitempty"`
}

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 ResolvePostReport struct {
	ReportID int64 `json:"report_id" url:"report_id,omitempty"`
	Resolved bool  `json:"resolved" url:"resolved,omitempty"`
}

type ResolvePrivateMessageReport added in v0.19.0

type ResolvePrivateMessageReport struct {
	ReportID int64 `json:"report_id" url:"report_id,omitempty"`
	Resolved bool  `json:"resolved" url:"resolved,omitempty"`
}

type SaveComment added in v0.19.0

type SaveComment struct {
	CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
	Save      bool  `json:"save" url:"save,omitempty"`
}

type SavePost added in v0.19.0

type SavePost struct {
	PostID int64 `json:"post_id" url:"post_id,omitempty"`
	Save   bool  `json:"save" url:"save,omitempty"`
}

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"`
	EnableKeyboardNavigation Optional[bool]            `json:"enable_keyboard_navigation" url:"enable_keyboard_navigation,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 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 SiteResponse struct {
	SiteView SiteView         `json:"site_view" url:"site_view,omitempty"`
	Taglines []Tagline        `json:"taglines" url:"taglines,omitempty"`
	Error    Optional[string] `json:"error"`
}

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 SuccessResponse struct {
	Success bool             `json:"success" url:"success,omitempty"`
	Error   Optional[string] `json:"error"`
}

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 TransferCommunity struct {
	CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
	PersonID    int64 `json:"person_id" url:"person_id,omitempty"`
}

type VerifyEmail added in v0.19.0

type VerifyEmail struct {
	Token string `json:"token" url:"token,omitempty"`
}

Directories

Path Synopsis
cmd
gen
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL