Remove omitempty from json struct tags
This commit is contained in:
parent
ddd10da18d
commit
1ca785de16
@ -1,55 +1,55 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
type PersonAggregates struct {
|
type PersonAggregates struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
PostCount int `json:"post_count,omitempty" url:"post_count,omitempty"`
|
PostCount int `json:"post_count" url:"post_count,omitempty"`
|
||||||
PostScore int `json:"post_score,omitempty" url:"post_score,omitempty"`
|
PostScore int `json:"post_score" url:"post_score,omitempty"`
|
||||||
CommentCount int `json:"comment_count,omitempty" url:"comment_count,omitempty"`
|
CommentCount int `json:"comment_count" url:"comment_count,omitempty"`
|
||||||
CommentScore int `json:"comment_score,omitempty" url:"comment_score,omitempty"`
|
CommentScore int `json:"comment_score" url:"comment_score,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SiteAggregates struct {
|
type SiteAggregates struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
SiteID int `json:"site_id,omitempty" url:"site_id,omitempty"`
|
SiteID int `json:"site_id" url:"site_id,omitempty"`
|
||||||
Users int `json:"users,omitempty" url:"users,omitempty"`
|
Users int `json:"users" url:"users,omitempty"`
|
||||||
Posts int `json:"posts,omitempty" url:"posts,omitempty"`
|
Posts int `json:"posts" url:"posts,omitempty"`
|
||||||
Comments int `json:"comments,omitempty" url:"comments,omitempty"`
|
Comments int `json:"comments" url:"comments,omitempty"`
|
||||||
Communities int `json:"communities,omitempty" url:"communities,omitempty"`
|
Communities int `json:"communities" url:"communities,omitempty"`
|
||||||
UsersActiveDay int `json:"users_active_day,omitempty" url:"users_active_day,omitempty"`
|
UsersActiveDay int `json:"users_active_day" url:"users_active_day,omitempty"`
|
||||||
UsersActiveWeek int `json:"users_active_week,omitempty" url:"users_active_week,omitempty"`
|
UsersActiveWeek int `json:"users_active_week" url:"users_active_week,omitempty"`
|
||||||
UsersActiveMonth int `json:"users_active_month,omitempty" url:"users_active_month,omitempty"`
|
UsersActiveMonth int `json:"users_active_month" url:"users_active_month,omitempty"`
|
||||||
UsersActiveHalfYear int `json:"users_active_half_year,omitempty" url:"users_active_half_year,omitempty"`
|
UsersActiveHalfYear int `json:"users_active_half_year" url:"users_active_half_year,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PostAggregates struct {
|
type PostAggregates struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Comments int `json:"comments,omitempty" url:"comments,omitempty"`
|
Comments int `json:"comments" url:"comments,omitempty"`
|
||||||
Score int `json:"score,omitempty" url:"score,omitempty"`
|
Score int `json:"score" url:"score,omitempty"`
|
||||||
Upvotes int `json:"upvotes,omitempty" url:"upvotes,omitempty"`
|
Upvotes int `json:"upvotes" url:"upvotes,omitempty"`
|
||||||
Downvotes int `json:"downvotes,omitempty" url:"downvotes,omitempty"`
|
Downvotes int `json:"downvotes" url:"downvotes,omitempty"`
|
||||||
NewestCommentTimeNecro string `json:"newest_comment_time_necro,omitempty" url:"newest_comment_time_necro,omitempty"`
|
NewestCommentTimeNecro string `json:"newest_comment_time_necro" url:"newest_comment_time_necro,omitempty"`
|
||||||
NewestCommentTime string `json:"newest_comment_time,omitempty" url:"newest_comment_time,omitempty"`
|
NewestCommentTime string `json:"newest_comment_time" url:"newest_comment_time,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommunityAggregates struct {
|
type CommunityAggregates struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Subscribers int `json:"subscribers,omitempty" url:"subscribers,omitempty"`
|
Subscribers int `json:"subscribers" url:"subscribers,omitempty"`
|
||||||
Posts int `json:"posts,omitempty" url:"posts,omitempty"`
|
Posts int `json:"posts" url:"posts,omitempty"`
|
||||||
Comments int `json:"comments,omitempty" url:"comments,omitempty"`
|
Comments int `json:"comments" url:"comments,omitempty"`
|
||||||
UsersActiveDay int `json:"users_active_day,omitempty" url:"users_active_day,omitempty"`
|
UsersActiveDay int `json:"users_active_day" url:"users_active_day,omitempty"`
|
||||||
UsersActiveWeek int `json:"users_active_week,omitempty" url:"users_active_week,omitempty"`
|
UsersActiveWeek int `json:"users_active_week" url:"users_active_week,omitempty"`
|
||||||
UsersActiveMonth int `json:"users_active_month,omitempty" url:"users_active_month,omitempty"`
|
UsersActiveMonth int `json:"users_active_month" url:"users_active_month,omitempty"`
|
||||||
UsersActiveHalfYear int `json:"users_active_half_year,omitempty" url:"users_active_half_year,omitempty"`
|
UsersActiveHalfYear int `json:"users_active_half_year" url:"users_active_half_year,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentAggregates struct {
|
type CommentAggregates struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Score int `json:"score,omitempty" url:"score,omitempty"`
|
Score int `json:"score" url:"score,omitempty"`
|
||||||
Upvotes int `json:"upvotes,omitempty" url:"upvotes,omitempty"`
|
Upvotes int `json:"upvotes" url:"upvotes,omitempty"`
|
||||||
Downvotes int `json:"downvotes,omitempty" url:"downvotes,omitempty"`
|
Downvotes int `json:"downvotes" url:"downvotes,omitempty"`
|
||||||
ChildCount int `json:"child_count,omitempty" url:"child_count,omitempty"`
|
ChildCount int `json:"child_count" url:"child_count,omitempty"`
|
||||||
}
|
}
|
||||||
|
110
types/comment.go
110
types/comment.go
@ -1,105 +1,105 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
type CreateComment struct {
|
type CreateComment struct {
|
||||||
Content string `json:"content,omitempty" url:"content,omitempty"`
|
Content string `json:"content" url:"content,omitempty"`
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
ParentID Optional[int] `json:"parent_id,omitempty" url:"parent_id,omitempty"`
|
ParentID Optional[int] `json:"parent_id" url:"parent_id,omitempty"`
|
||||||
LanguageID Optional[int] `json:"language_id,omitempty" url:"language_id,omitempty"`
|
LanguageID Optional[int] `json:"language_id" url:"language_id,omitempty"`
|
||||||
FormID Optional[string] `json:"form_id,omitempty" url:"form_id,omitempty"`
|
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetComment struct {
|
type GetComment struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type EditComment struct {
|
type EditComment struct {
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Content Optional[string] `json:"content,omitempty" url:"content,omitempty"`
|
Content Optional[string] `json:"content" url:"content,omitempty"`
|
||||||
Distinguished Optional[bool] `json:"distinguished,omitempty" url:"distinguished,omitempty"`
|
Distinguished Optional[bool] `json:"distinguished" url:"distinguished,omitempty"`
|
||||||
LanguageID Optional[int] `json:"language_id,omitempty" url:"language_id,omitempty"`
|
LanguageID Optional[int] `json:"language_id" url:"language_id,omitempty"`
|
||||||
FormID Optional[string] `json:"form_id,omitempty" url:"form_id,omitempty"`
|
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeleteComment struct {
|
type DeleteComment struct {
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RemoveComment struct {
|
type RemoveComment struct {
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Removed bool `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed bool `json:"removed" url:"removed,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SaveComment struct {
|
type SaveComment struct {
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Save bool `json:"save,omitempty" url:"save,omitempty"`
|
Save bool `json:"save" url:"save,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentResponse struct {
|
type CommentResponse struct {
|
||||||
CommentView CommentView `json:"comment_view,omitempty" url:"comment_view,omitempty"`
|
CommentView CommentView `json:"comment_view" url:"comment_view,omitempty"`
|
||||||
RecipientIDs []int `json:"recipient_i_ds,omitempty" url:"recipient_i_ds,omitempty"`
|
RecipientIDs []int `json:"recipient_i_ds" url:"recipient_i_ds,omitempty"`
|
||||||
FormID Optional[string] `json:"form_id,omitempty" url:"form_id,omitempty"`
|
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateCommentLike struct {
|
type CreateCommentLike struct {
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Score int16 `json:"score,omitempty" url:"score,omitempty"`
|
Score int16 `json:"score" url:"score,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetComments struct {
|
type GetComments struct {
|
||||||
Type Optional[ListingType] `json:"type,omitempty" url:"type,omitempty"`
|
Type Optional[ListingType] `json:"type" url:"type,omitempty"`
|
||||||
Sort Optional[CommentSortType] `json:"sort,omitempty" url:"sort,omitempty"`
|
Sort Optional[CommentSortType] `json:"sort" url:"sort,omitempty"`
|
||||||
MaxDepth Optional[int] `json:"max_depth,omitempty" url:"max_depth,omitempty"`
|
MaxDepth Optional[int] `json:"max_depth" url:"max_depth,omitempty"`
|
||||||
Page Optional[int] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int] `json:"limit" url:"limit,omitempty"`
|
||||||
CommunityID Optional[int] `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
CommunityName Optional[string] `json:"community_name,omitempty" url:"community_name,omitempty"`
|
CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"`
|
||||||
PostID Optional[int] `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID Optional[int] `json:"post_id" url:"post_id,omitempty"`
|
||||||
ParentID Optional[int] `json:"parent_id,omitempty" url:"parent_id,omitempty"`
|
ParentID Optional[int] `json:"parent_id" url:"parent_id,omitempty"`
|
||||||
SavedOnly Optional[bool] `json:"saved_only,omitempty" url:"saved_only,omitempty"`
|
SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetCommentsResponse struct {
|
type GetCommentsResponse struct {
|
||||||
Comments []CommentView `json:"comments,omitempty" url:"comments,omitempty"`
|
Comments []CommentView `json:"comments" url:"comments,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateCommentReport struct {
|
type CreateCommentReport struct {
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Reason string `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason string `json:"reason" url:"reason,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentReportResponse struct {
|
type CommentReportResponse struct {
|
||||||
CommentReportView CommentReportView `json:"comment_report_view,omitempty" url:"comment_report_view,omitempty"`
|
CommentReportView CommentReportView `json:"comment_report_view" url:"comment_report_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResolveCommentReport struct {
|
type ResolveCommentReport struct {
|
||||||
ReportID int `json:"report_id,omitempty" url:"report_id,omitempty"`
|
ReportID int `json:"report_id" url:"report_id,omitempty"`
|
||||||
Resolved bool `json:"resolved,omitempty" url:"resolved,omitempty"`
|
Resolved bool `json:"resolved" url:"resolved,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListCommentReports struct {
|
type ListCommentReports struct {
|
||||||
Page Optional[int] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int] `json:"limit" url:"limit,omitempty"`
|
||||||
UnresolvedOnly Optional[bool] `json:"unresolved_only,omitempty" url:"unresolved_only,omitempty"`
|
UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"`
|
||||||
CommunityID Optional[int] `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListCommentReportsResponse struct {
|
type ListCommentReportsResponse struct {
|
||||||
CommentReports []CommentReportView `json:"comment_reports,omitempty" url:"comment_reports,omitempty"`
|
CommentReports []CommentReportView `json:"comment_reports" url:"comment_reports,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
@ -1,131 +1,131 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
type GetCommunity struct {
|
type GetCommunity struct {
|
||||||
ID Optional[int] `json:"id,omitempty" url:"id,omitempty"`
|
ID Optional[int] `json:"id" url:"id,omitempty"`
|
||||||
Name Optional[string] `json:"name,omitempty" url:"name,omitempty"`
|
Name Optional[string] `json:"name" url:"name,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetCommunityResponse struct {
|
type GetCommunityResponse struct {
|
||||||
CommunityView CommunityView `json:"community_view,omitempty" url:"community_view,omitempty"`
|
CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"`
|
||||||
Site Optional[Site] `json:"site,omitempty" url:"site,omitempty"`
|
Site Optional[Site] `json:"site" url:"site,omitempty"`
|
||||||
Moderators []CommunityModeratorView `json:"moderators,omitempty" url:"moderators,omitempty"`
|
Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"`
|
||||||
Online uint `json:"online,omitempty" url:"online,omitempty"`
|
Online uint `json:"online" url:"online,omitempty"`
|
||||||
DiscussionLanguages []int `json:"discussion_languages,omitempty" url:"discussion_languages,omitempty"`
|
DiscussionLanguages []int `json:"discussion_languages" url:"discussion_languages,omitempty"`
|
||||||
DefaultPostLanguage Optional[int] `json:"default_post_language,omitempty" url:"default_post_language,omitempty"`
|
DefaultPostLanguage Optional[int] `json:"default_post_language" url:"default_post_language,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateCommunity struct {
|
type CreateCommunity struct {
|
||||||
Name string `json:"name,omitempty" url:"name,omitempty"`
|
Name string `json:"name" url:"name,omitempty"`
|
||||||
Title string `json:"title,omitempty" url:"title,omitempty"`
|
Title string `json:"title" url:"title,omitempty"`
|
||||||
Description Optional[string] `json:"description,omitempty" url:"description,omitempty"`
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
||||||
Icon Optional[string] `json:"icon,omitempty" url:"icon,omitempty"`
|
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
|
||||||
Banner Optional[string] `json:"banner,omitempty" url:"banner,omitempty"`
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
||||||
NSFW Optional[bool] `json:"nsfw,omitempty" url:"nsfw,omitempty"`
|
NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"`
|
||||||
PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods,omitempty" url:"posting_restricted_to_mods,omitempty"`
|
PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommunityResponse struct {
|
type CommunityResponse struct {
|
||||||
CommunityView CommunityView `json:"community_view,omitempty" url:"community_view,omitempty"`
|
CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListCommunities struct {
|
type ListCommunities struct {
|
||||||
Type Optional[ListingType] `json:"type,omitempty" url:"type,omitempty"`
|
Type Optional[ListingType] `json:"type" url:"type,omitempty"`
|
||||||
Sort Optional[SortType] `json:"sort,omitempty" url:"sort,omitempty"`
|
Sort Optional[SortType] `json:"sort" url:"sort,omitempty"`
|
||||||
Page Optional[int64] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int64] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListCommunitiesResponse struct {
|
type ListCommunitiesResponse struct {
|
||||||
Communities []CommunityView `json:"communities,omitempty" url:"communities,omitempty"`
|
Communities []CommunityView `json:"communities" url:"communities,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type BanFromCommunity struct {
|
type BanFromCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
Ban bool `json:"ban,omitempty" url:"ban,omitempty"`
|
Ban bool `json:"ban" url:"ban,omitempty"`
|
||||||
RemoveData Optional[bool] `json:"remove_data,omitempty" url:"remove_data,omitempty"`
|
RemoveData Optional[bool] `json:"remove_data" url:"remove_data,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Expires Optional[int64] `json:"expires,omitempty" url:"expires,omitempty"`
|
Expires Optional[int64] `json:"expires" url:"expires,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BanFromCommunityResponse struct {
|
type BanFromCommunityResponse struct {
|
||||||
PersonView PersonViewSafe `json:"person_view,omitempty" url:"person_view,omitempty"`
|
PersonView PersonViewSafe `json:"person_view" url:"person_view,omitempty"`
|
||||||
Banned bool `json:"banned,omitempty" url:"banned,omitempty"`
|
Banned bool `json:"banned" url:"banned,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddModToCommunity struct {
|
type AddModToCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
Added bool `json:"added,omitempty" url:"added,omitempty"`
|
Added bool `json:"added" url:"added,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddModToCommunityResponse struct {
|
type AddModToCommunityResponse struct {
|
||||||
Moderators []CommunityModeratorView `json:"moderators,omitempty" url:"moderators,omitempty"`
|
Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type EditCommunity struct {
|
type EditCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Title Optional[string] `json:"title,omitempty" url:"title,omitempty"`
|
Title Optional[string] `json:"title" url:"title,omitempty"`
|
||||||
Description Optional[string] `json:"description,omitempty" url:"description,omitempty"`
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
||||||
Icon Optional[string] `json:"icon,omitempty" url:"icon,omitempty"`
|
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
|
||||||
Banner Optional[string] `json:"banner,omitempty" url:"banner,omitempty"`
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
||||||
NSFW Optional[bool] `json:"nsfw,omitempty" url:"nsfw,omitempty"`
|
NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"`
|
||||||
PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods,omitempty" url:"posting_restricted_to_mods,omitempty"`
|
PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"`
|
||||||
DiscussionLanguages Optional[[]int] `json:"discussion_languages,omitempty" url:"discussion_languages,omitempty"`
|
DiscussionLanguages Optional[[]int] `json:"discussion_languages" url:"discussion_languages,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type HideCommunity struct {
|
type HideCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Hidden bool `json:"hidden,omitempty" url:"hidden,omitempty"`
|
Hidden bool `json:"hidden" url:"hidden,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeleteCommunity struct {
|
type DeleteCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RemoveCommunity struct {
|
type RemoveCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Removed bool `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed bool `json:"removed" url:"removed,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Expires Optional[int64] `json:"expires,omitempty" url:"expires,omitempty"`
|
Expires Optional[int64] `json:"expires" url:"expires,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type FollowCommunity struct {
|
type FollowCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Follow bool `json:"follow,omitempty" url:"follow,omitempty"`
|
Follow bool `json:"follow" url:"follow,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BlockCommunity struct {
|
type BlockCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Block bool `json:"block,omitempty" url:"block,omitempty"`
|
Block bool `json:"block" url:"block,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BlockCommunityResponse struct {
|
type BlockCommunityResponse struct {
|
||||||
CommunityView CommunityView `json:"community_view,omitempty" url:"community_view,omitempty"`
|
CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"`
|
||||||
Blocked bool `json:"blocked,omitempty" url:"blocked,omitempty"`
|
Blocked bool `json:"blocked" url:"blocked,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type TransferCommunity struct {
|
type TransferCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
/*type SiteMetadata struct {
|
/*type SiteMetadata struct {
|
||||||
Title Optional[string] `json:"title,omitempty" url:"title,omitempty"`
|
Title Optional[string] `json:"title" url:"title,omitempty"`
|
||||||
Description Optional[string] `json:"description,omitempty" url:"description,omitempty"`
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
||||||
Image Optional[string] `json:"image,omitempty" url:"image,omitempty"`
|
Image Optional[string] `json:"image" url:"image,omitempty"`
|
||||||
HTML Optional[string] `json:"html,omitempty" url:"html,omitempty"`
|
HTML Optional[string] `json:"html" url:"html,omitempty"`
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
type UserOperation int
|
type UserOperation int
|
||||||
|
226
types/person.go
226
types/person.go
@ -1,178 +1,178 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
type Login struct {
|
type Login struct {
|
||||||
Password string `json:"password,omitempty" url:"password,omitempty"`
|
Password string `json:"password" url:"password,omitempty"`
|
||||||
UsernameOrEmail string `json:"username_or_email,omitempty" url:"username_or_email,omitempty"`
|
UsernameOrEmail string `json:"username_or_email" url:"username_or_email,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LoginResponse struct {
|
type LoginResponse struct {
|
||||||
JWT Optional[string] `json:"jwt,omitempty" url:"jwt,omitempty"`
|
JWT Optional[string] `json:"jwt" url:"jwt,omitempty"`
|
||||||
RegistrationCreated bool `json:"registration_created,omitempty" url:"registration_created,omitempty"`
|
RegistrationCreated bool `json:"registration_created" url:"registration_created,omitempty"`
|
||||||
VeriftEmailSent bool `json:"verify_email_sent,omitempty" url:"verify_email_sent,omitempty"`
|
VeriftEmailSent bool `json:"verify_email_sent" url:"verify_email_sent,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type Register struct {
|
type Register struct {
|
||||||
Username string `json:"username,omitempty" url:"username,omitempty"`
|
Username string `json:"username" url:"username,omitempty"`
|
||||||
Password string `json:"password,omitempty" url:"password,omitempty"`
|
Password string `json:"password" url:"password,omitempty"`
|
||||||
PasswordVerify string `json:"password_verify,omitempty" url:"password_verify,omitempty"`
|
PasswordVerify string `json:"password_verify" url:"password_verify,omitempty"`
|
||||||
ShowNSFW bool `json:"show_nsfw,omitempty" url:"show_nsfw,omitempty"`
|
ShowNSFW bool `json:"show_nsfw" url:"show_nsfw,omitempty"`
|
||||||
Email Optional[string] `json:"email,omitempty" url:"email,omitempty"`
|
Email Optional[string] `json:"email" url:"email,omitempty"`
|
||||||
CaptchaUuid Optional[string] `json:"captcha_uuid,omitempty" url:"captcha_uuid,omitempty"`
|
CaptchaUuid Optional[string] `json:"captcha_uuid" url:"captcha_uuid,omitempty"`
|
||||||
CaptchaAnswer Optional[string] `json:"captcha_answer,omitempty" url:"captcha_answer,omitempty"`
|
CaptchaAnswer Optional[string] `json:"captcha_answer" url:"captcha_answer,omitempty"`
|
||||||
Honeypot Optional[string] `json:"honeypot,omitempty" url:"honeypot,omitempty"`
|
Honeypot Optional[string] `json:"honeypot" url:"honeypot,omitempty"`
|
||||||
Answer Optional[string] `json:"answer,omitempty" url:"answer,omitempty"`
|
Answer Optional[string] `json:"answer" url:"answer,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetCaptcha struct{}
|
type GetCaptcha struct{}
|
||||||
|
|
||||||
type CaptchaResponse struct {
|
type CaptchaResponse struct {
|
||||||
Png string `json:"png,omitempty" url:"png,omitempty"`
|
Png string `json:"png" url:"png,omitempty"`
|
||||||
Wav string `json:"wav,omitempty" url:"wav,omitempty"`
|
Wav string `json:"wav" url:"wav,omitempty"`
|
||||||
Uuid string `json:"uuid,omitempty" url:"uuid,omitempty"`
|
Uuid string `json:"uuid" url:"uuid,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type SaveUserSettings struct {
|
type SaveUserSettings struct {
|
||||||
ShowNSFW Optional[bool] `json:"show_nsfw,omitempty" url:"show_nsfw,omitempty"`
|
ShowNSFW Optional[bool] `json:"show_nsfw" url:"show_nsfw,omitempty"`
|
||||||
ShowScores Optional[bool] `json:"show_scores,omitempty" url:"show_scores,omitempty"`
|
ShowScores Optional[bool] `json:"show_scores" url:"show_scores,omitempty"`
|
||||||
Theme Optional[string] `json:"theme,omitempty" url:"theme,omitempty"`
|
Theme Optional[string] `json:"theme" url:"theme,omitempty"`
|
||||||
DefaultSortType Optional[int16] `json:"default_sort_type,omitempty" url:"default_sort_type,omitempty"`
|
DefaultSortType Optional[int16] `json:"default_sort_type" url:"default_sort_type,omitempty"`
|
||||||
DefaultListingType Optional[int16] `json:"default_listing_type,omitempty" url:"default_listing_type,omitempty"`
|
DefaultListingType Optional[int16] `json:"default_listing_type" url:"default_listing_type,omitempty"`
|
||||||
InterfaceLanguage Optional[string] `json:"interface_language,omitempty" url:"interface_language,omitempty"`
|
InterfaceLanguage Optional[string] `json:"interface_language" url:"interface_language,omitempty"`
|
||||||
Avatar Optional[string] `json:"avatar,omitempty" url:"avatar,omitempty"`
|
Avatar Optional[string] `json:"avatar" url:"avatar,omitempty"`
|
||||||
Banner Optional[string] `json:"banner,omitempty" url:"banner,omitempty"`
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
||||||
DisplayName Optional[string] `json:"display_name,omitempty" url:"display_name,omitempty"`
|
DisplayName Optional[string] `json:"display_name" url:"display_name,omitempty"`
|
||||||
Email Optional[string] `json:"email,omitempty" url:"email,omitempty"`
|
Email Optional[string] `json:"email" url:"email,omitempty"`
|
||||||
Bio Optional[string] `json:"bio,omitempty" url:"bio,omitempty"`
|
Bio Optional[string] `json:"bio" url:"bio,omitempty"`
|
||||||
MatrixUserID Optional[string] `json:"matrix_user_id,omitempty" url:"matrix_user_id,omitempty"`
|
MatrixUserID Optional[string] `json:"matrix_user_id" url:"matrix_user_id,omitempty"`
|
||||||
ShowAvatars Optional[bool] `json:"show_avatars,omitempty" url:"show_avatars,omitempty"`
|
ShowAvatars Optional[bool] `json:"show_avatars" url:"show_avatars,omitempty"`
|
||||||
SendNotificationsToEmail Optional[bool] `json:"send_notifications_to_email,omitempty" url:"send_notifications_to_email,omitempty"`
|
SendNotificationsToEmail Optional[bool] `json:"send_notifications_to_email" url:"send_notifications_to_email,omitempty"`
|
||||||
BotAccount Optional[bool] `json:"bot_account,omitempty" url:"bot_account,omitempty"`
|
BotAccount Optional[bool] `json:"bot_account" url:"bot_account,omitempty"`
|
||||||
ShowBotAccounts Optional[bool] `json:"show_bot_accounts,omitempty" url:"show_bot_accounts,omitempty"`
|
ShowBotAccounts Optional[bool] `json:"show_bot_accounts" url:"show_bot_accounts,omitempty"`
|
||||||
ShowReadPosts Optional[bool] `json:"show_read_posts,omitempty" url:"show_read_posts,omitempty"`
|
ShowReadPosts Optional[bool] `json:"show_read_posts" url:"show_read_posts,omitempty"`
|
||||||
ShowNewPostNotifs Optional[bool] `json:"show_new_post_notifs,omitempty" url:"show_new_post_notifs,omitempty"`
|
ShowNewPostNotifs Optional[bool] `json:"show_new_post_notifs" url:"show_new_post_notifs,omitempty"`
|
||||||
DiscussionLanguages Optional[[]int] `json:"discussion_languages,omitempty" url:"discussion_languages,omitempty"`
|
DiscussionLanguages Optional[[]int] `json:"discussion_languages" url:"discussion_languages,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChangePassword struct {
|
type ChangePassword struct {
|
||||||
NewPassword string `json:"new_password,omitempty" url:"new_password,omitempty"`
|
NewPassword string `json:"new_password" url:"new_password,omitempty"`
|
||||||
NewPasswordVerify string `json:"new_password_verify,omitempty" url:"new_password_verify,omitempty"`
|
NewPasswordVerify string `json:"new_password_verify" url:"new_password_verify,omitempty"`
|
||||||
OldPassword string `json:"old_password,omitempty" url:"old_password,omitempty"`
|
OldPassword string `json:"old_password" url:"old_password,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPersonDetails struct {
|
type GetPersonDetails struct {
|
||||||
PersonID Optional[int] `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID Optional[int] `json:"person_id" url:"person_id,omitempty"`
|
||||||
Username Optional[string] `json:"username,omitempty" url:"username,omitempty"`
|
Username Optional[string] `json:"username" url:"username,omitempty"`
|
||||||
Sort Optional[SortType] `json:"sort,omitempty" url:"sort,omitempty"`
|
Sort Optional[SortType] `json:"sort" url:"sort,omitempty"`
|
||||||
Page Optional[int64] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int64] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
||||||
CommunityID Optional[int] `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
SavedOnly Optional[bool] `json:"saved_only,omitempty" url:"saved_only,omitempty"`
|
SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPersonDetailsResponse struct {
|
type GetPersonDetailsResponse struct {
|
||||||
PersonView PersonViewSafe `json:"person_view,omitempty" url:"person_view,omitempty"`
|
PersonView PersonViewSafe `json:"person_view" url:"person_view,omitempty"`
|
||||||
Comments []CommentView `json:"comments,omitempty" url:"comments,omitempty"`
|
Comments []CommentView `json:"comments" url:"comments,omitempty"`
|
||||||
Posts []PostView `json:"posts,omitempty" url:"posts,omitempty"`
|
Posts []PostView `json:"posts" url:"posts,omitempty"`
|
||||||
Moderates []CommunityModeratorView `json:"moderates,omitempty" url:"moderates,omitempty"`
|
Moderates []CommunityModeratorView `json:"moderates" url:"moderates,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetReplies struct {
|
type GetReplies struct {
|
||||||
Limit Optional[int] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int] `json:"limit" url:"limit,omitempty"`
|
||||||
Page Optional[int] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int] `json:"page" url:"page,omitempty"`
|
||||||
Sort Optional[CommentSortType] `json:"sort,omitempty" url:"sort,omitempty"`
|
Sort Optional[CommentSortType] `json:"sort" url:"sort,omitempty"`
|
||||||
UnreadOnly Optional[bool] `json:"unread_only,omitempty" url:"unread_only,omitempty"`
|
UnreadOnly Optional[bool] `json:"unread_only" url:"unread_only,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetRepliesResponse struct {
|
type GetRepliesResponse struct {
|
||||||
Replies []CommentReplyView `json:"replies,omitempty" url:"replies,omitempty"`
|
Replies []CommentReplyView `json:"replies" url:"replies,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPersonMentionsResponse struct {
|
type GetPersonMentionsResponse struct {
|
||||||
Mentions []PersonMentionView `json:"mentions,omitempty" url:"mentions,omitempty"`
|
Mentions []PersonMentionView `json:"mentions" url:"mentions,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type MarkAllAsRead struct {
|
type MarkAllAsRead struct {
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddAdmin struct {
|
type AddAdmin struct {
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
Added bool `json:"added,omitempty" url:"added,omitempty"`
|
Added bool `json:"added" url:"added,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddAdminResponse struct {
|
type AddAdminResponse struct {
|
||||||
Admins []PersonViewSafe `json:"admins,omitempty" url:"admins,omitempty"`
|
Admins []PersonViewSafe `json:"admins" url:"admins,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type BanPerson struct {
|
type BanPerson struct {
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
Ban bool `json:"ban,omitempty" url:"ban,omitempty"`
|
Ban bool `json:"ban" url:"ban,omitempty"`
|
||||||
RemoveData Optional[bool] `json:"remove_data,omitempty" url:"remove_data,omitempty"`
|
RemoveData Optional[bool] `json:"remove_data" url:"remove_data,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Expires Optional[int64] `json:"expires,omitempty" url:"expires,omitempty"`
|
Expires Optional[int64] `json:"expires" url:"expires,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetBannedPersons struct {
|
type GetBannedPersons struct {
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BanPersonResponse struct {
|
type BanPersonResponse struct {
|
||||||
PersonView PersonViewSafe `json:"person_view,omitempty" url:"person_view,omitempty"`
|
PersonView PersonViewSafe `json:"person_view" url:"person_view,omitempty"`
|
||||||
Banned bool `json:"banned,omitempty" url:"banned,omitempty"`
|
Banned bool `json:"banned" url:"banned,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type BlockPerson struct {
|
type BlockPerson struct {
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
Block bool `json:"block,omitempty" url:"block,omitempty"`
|
Block bool `json:"block" url:"block,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPersonMentions struct {
|
type GetPersonMentions struct {
|
||||||
Sort Optional[CommentSortType] `json:"sort,omitempty" url:"sort,omitempty"`
|
Sort Optional[CommentSortType] `json:"sort" url:"sort,omitempty"`
|
||||||
Page Optional[int64] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int64] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
||||||
UnreadOnly Optional[bool] `json:"unread_only,omitempty" url:"unread_only,omitempty"`
|
UnreadOnly Optional[bool] `json:"unread_only" url:"unread_only,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MarkPersonMentionAsRead struct {
|
type MarkPersonMentionAsRead struct {
|
||||||
PersonMentionID int `json:"person_mention_id,omitempty" url:"person_mention_id,omitempty"`
|
PersonMentionID int `json:"person_mention_id" url:"person_mention_id,omitempty"`
|
||||||
Read bool `json:"read,omitempty" url:"read,omitempty"`
|
Read bool `json:"read" url:"read,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PersonMentionResponse struct {
|
type PersonMentionResponse struct {
|
||||||
PersonMentionView PersonMentionView `json:"person_mention_view,omitempty" url:"person_mention_view,omitempty"`
|
PersonMentionView PersonMentionView `json:"person_mention_view" url:"person_mention_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type MarkCommentReplyAsRead struct {
|
type MarkCommentReplyAsRead struct {
|
||||||
CommentReplyID int `json:"comment_reply_id,omitempty" url:"comment_reply_id,omitempty"`
|
CommentReplyID int `json:"comment_reply_id" url:"comment_reply_id,omitempty"`
|
||||||
Read bool `json:"read,omitempty" url:"read,omitempty"`
|
Read bool `json:"read" url:"read,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentReplyResponse struct {
|
type CommentReplyResponse struct {
|
||||||
CommentReplyView CommentReplyView `json:"comment_reply_view,omitempty" url:"comment_reply_view,omitempty"`
|
CommentReplyView CommentReplyView `json:"comment_reply_view" url:"comment_reply_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeleteAccount struct {
|
type DeleteAccount struct {
|
||||||
Password string `json:"password,omitempty" url:"password,omitempty"`
|
Password string `json:"password" url:"password,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeleteAccountResponse struct {
|
type DeleteAccountResponse struct {
|
||||||
@ -180,7 +180,7 @@ type DeleteAccountResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type PasswordReset struct {
|
type PasswordReset struct {
|
||||||
Email string `json:"email,omitempty" url:"email,omitempty"`
|
Email string `json:"email" url:"email,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PasswordResetResponse struct {
|
type PasswordResetResponse struct {
|
||||||
@ -188,37 +188,37 @@ type PasswordResetResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type PasswordChangeAfterReset struct {
|
type PasswordChangeAfterReset struct {
|
||||||
Token string `json:"token,omitempty" url:"token,omitempty"`
|
Token string `json:"token" url:"token,omitempty"`
|
||||||
Password string `json:"password,omitempty" url:"password,omitempty"`
|
Password string `json:"password" url:"password,omitempty"`
|
||||||
PasswordVerify string `json:"password_verify,omitempty" url:"password_verify,omitempty"`
|
PasswordVerify string `json:"password_verify" url:"password_verify,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetReportCount struct {
|
type GetReportCount struct {
|
||||||
CommunityID Optional[int] `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetReportCountResponse struct {
|
type GetReportCountResponse struct {
|
||||||
CommunityID Optional[int] `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
CommentReports int64 `json:"comment_reports,omitempty" url:"comment_reports,omitempty"`
|
CommentReports int64 `json:"comment_reports" url:"comment_reports,omitempty"`
|
||||||
PostReports int64 `json:"post_reports,omitempty" url:"post_reports,omitempty"`
|
PostReports int64 `json:"post_reports" url:"post_reports,omitempty"`
|
||||||
PrivateMessageReports Optional[int64] `json:"private_message_reports,omitempty" url:"private_message_reports,omitempty"`
|
PrivateMessageReports Optional[int64] `json:"private_message_reports" url:"private_message_reports,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetUnreadCount struct {
|
type GetUnreadCount struct {
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetUnreadCountResponse struct {
|
type GetUnreadCountResponse struct {
|
||||||
Replies int64 `json:"replies,omitempty" url:"replies,omitempty"`
|
Replies int64 `json:"replies" url:"replies,omitempty"`
|
||||||
Mentions int64 `json:"mentions,omitempty" url:"mentions,omitempty"`
|
Mentions int64 `json:"mentions" url:"mentions,omitempty"`
|
||||||
PrivateMessages int64 `json:"private_messages,omitempty" url:"private_messages,omitempty"`
|
PrivateMessages int64 `json:"private_messages" url:"private_messages,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type VerifyEmail struct {
|
type VerifyEmail struct {
|
||||||
Token string `json:"token,omitempty" url:"token,omitempty"`
|
Token string `json:"token" url:"token,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type VerifyEmailResponse struct {
|
type VerifyEmailResponse struct {
|
||||||
@ -226,18 +226,18 @@ type VerifyEmailResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type BlockPersonResponse struct {
|
type BlockPersonResponse struct {
|
||||||
Blocked bool `json:"blocked,omitempty" url:"blocked,omitempty"`
|
Blocked bool `json:"blocked" url:"blocked,omitempty"`
|
||||||
PersonView PersonViewSafe `json:"person_view,omitempty" url:"person_view,omitempty"`
|
PersonView PersonViewSafe `json:"person_view" url:"person_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type BannedPersonsResponse struct {
|
type BannedPersonsResponse struct {
|
||||||
Banned []PersonViewSafe `json:"banned,omitempty" url:"banned,omitempty"`
|
Banned []PersonViewSafe `json:"banned" url:"banned,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type PasswordChange struct {
|
type PasswordChange struct {
|
||||||
Password string `json:"password,omitempty" url:"password,omitempty"`
|
Password string `json:"password" url:"password,omitempty"`
|
||||||
PasswordVerify string `json:"password_verify,omitempty" url:"password_verify,omitempty"`
|
PasswordVerify string `json:"password_verify" url:"password_verify,omitempty"`
|
||||||
Token string `json:"token,omitempty" url:"token,omitempty"`
|
Token string `json:"token" url:"token,omitempty"`
|
||||||
}
|
}
|
||||||
|
146
types/post.go
146
types/post.go
@ -1,146 +1,146 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
type CreatePost struct {
|
type CreatePost struct {
|
||||||
Name string `json:"name,omitempty" url:"name,omitempty"`
|
Name string `json:"name" url:"name,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
URL Optional[string] `json:"url,omitempty" url:"url,omitempty"`
|
URL Optional[string] `json:"url" url:"url,omitempty"`
|
||||||
Body Optional[string] `json:"body,omitempty" url:"body,omitempty"`
|
Body Optional[string] `json:"body" url:"body,omitempty"`
|
||||||
Honeypot Optional[string] `json:"honeypot,omitempty" url:"honeypot,omitempty"`
|
Honeypot Optional[string] `json:"honeypot" url:"honeypot,omitempty"`
|
||||||
NSFW Optional[bool] `json:"nsfw,omitempty" url:"nsfw,omitempty"`
|
NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"`
|
||||||
LanguageID Optional[int] `json:"language_id,omitempty" url:"language_id,omitempty"`
|
LanguageID Optional[int] `json:"language_id" url:"language_id,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PostResponse struct {
|
type PostResponse struct {
|
||||||
PostView PostView `json:"post_view,omitempty" url:"post_view,omitempty"`
|
PostView PostView `json:"post_view" url:"post_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPost struct {
|
type GetPost struct {
|
||||||
ID Optional[int] `json:"id,omitempty" url:"id,omitempty"`
|
ID Optional[int] `json:"id" url:"id,omitempty"`
|
||||||
CommentID Optional[int] `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID Optional[int] `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPostResponse struct {
|
type GetPostResponse struct {
|
||||||
PostView PostView `json:"post_view,omitempty" url:"post_view,omitempty"`
|
PostView PostView `json:"post_view" url:"post_view,omitempty"`
|
||||||
CommunityView CommunityView `json:"community_view,omitempty" url:"community_view,omitempty"`
|
CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"`
|
||||||
Moderators []CommunityModeratorView `json:"moderators,omitempty" url:"moderators,omitempty"`
|
Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"`
|
||||||
Online uint `json:"online,omitempty" url:"online,omitempty"`
|
Online uint `json:"online" url:"online,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPosts struct {
|
type GetPosts struct {
|
||||||
Type Optional[ListingType] `json:"type,omitempty" url:"type,omitempty"`
|
Type Optional[ListingType] `json:"type" url:"type,omitempty"`
|
||||||
Sort Optional[SortType] `json:"sort,omitempty" url:"sort,omitempty"`
|
Sort Optional[SortType] `json:"sort" url:"sort,omitempty"`
|
||||||
Page Optional[int64] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int64] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
||||||
CommunityID Optional[int] `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
CommunityName Optional[string] `json:"community_name,omitempty" url:"community_name,omitempty"`
|
CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"`
|
||||||
SavedOnly Optional[bool] `json:"saved_only,omitempty" url:"saved_only,omitempty"`
|
SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPostsResponse struct {
|
type GetPostsResponse struct {
|
||||||
Posts []PostView `json:"posts,omitempty" url:"posts,omitempty"`
|
Posts []PostView `json:"posts" url:"posts,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreatePostLike struct {
|
type CreatePostLike struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Score int16 `json:"score,omitempty" url:"score,omitempty"`
|
Score int16 `json:"score" url:"score,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type EditPost struct {
|
type EditPost struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Name Optional[string] `json:"name,omitempty" url:"name,omitempty"`
|
Name Optional[string] `json:"name" url:"name,omitempty"`
|
||||||
URL Optional[string] `json:"url,omitempty" url:"url,omitempty"`
|
URL Optional[string] `json:"url" url:"url,omitempty"`
|
||||||
Body Optional[string] `json:"body,omitempty" url:"body,omitempty"`
|
Body Optional[string] `json:"body" url:"body,omitempty"`
|
||||||
NSFW Optional[bool] `json:"nsfw,omitempty" url:"nsfw,omitempty"`
|
NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"`
|
||||||
LanguageID Optional[int] `json:"language_id,omitempty" url:"language_id,omitempty"`
|
LanguageID Optional[int] `json:"language_id" url:"language_id,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeletePost struct {
|
type DeletePost struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RemovePost struct {
|
type RemovePost struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Removed bool `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed bool `json:"removed" url:"removed,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MarkPostAsRead struct {
|
type MarkPostAsRead struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Read bool `json:"read,omitempty" url:"read,omitempty"`
|
Read bool `json:"read" url:"read,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LockPost struct {
|
type LockPost struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Locked bool `json:"locked,omitempty" url:"locked,omitempty"`
|
Locked bool `json:"locked" url:"locked,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type StickyPost struct {
|
type StickyPost struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Stickied bool `json:"stickied,omitempty" url:"stickied,omitempty"`
|
Stickied bool `json:"stickied" url:"stickied,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SavePost struct {
|
type SavePost struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Save bool `json:"save,omitempty" url:"save,omitempty"`
|
Save bool `json:"save" url:"save,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreatePostReport struct {
|
type CreatePostReport struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Reason string `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason string `json:"reason" url:"reason,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PostReportResponse struct {
|
type PostReportResponse struct {
|
||||||
PostReportView PostReportView `json:"post_report_view,omitempty" url:"post_report_view,omitempty"`
|
PostReportView PostReportView `json:"post_report_view" url:"post_report_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResolvePostReport struct {
|
type ResolvePostReport struct {
|
||||||
ReportID int `json:"report_id,omitempty" url:"report_id,omitempty"`
|
ReportID int `json:"report_id" url:"report_id,omitempty"`
|
||||||
Resolved bool `json:"resolved,omitempty" url:"resolved,omitempty"`
|
Resolved bool `json:"resolved" url:"resolved,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListPostReports struct {
|
type ListPostReports struct {
|
||||||
Page Optional[int64] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int64] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
||||||
UnresolvedOnly Optional[bool] `json:"unresolved_only,omitempty" url:"unresolved_only,omitempty"`
|
UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"`
|
||||||
CommunityID Optional[int] `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListPostReportsResponse struct {
|
type ListPostReportsResponse struct {
|
||||||
PostReports []PostReportView `json:"post_reports,omitempty" url:"post_reports,omitempty"`
|
PostReports []PostReportView `json:"post_reports" url:"post_reports,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetSiteMetadata struct {
|
type GetSiteMetadata struct {
|
||||||
URL string `json:"url,omitempty" url:"url,omitempty"`
|
URL string `json:"url" url:"url,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetSiteMetadataResponse struct {
|
type GetSiteMetadataResponse struct {
|
||||||
Metadata SiteMetadata `json:"metadata,omitempty" url:"metadata,omitempty"`
|
Metadata SiteMetadata `json:"metadata" url:"metadata,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type SiteMetadata struct {
|
type SiteMetadata struct {
|
||||||
Title Optional[string] `json:"title,omitempty" url:"title,omitempty"`
|
Title Optional[string] `json:"title" url:"title,omitempty"`
|
||||||
Description Optional[string] `json:"description,omitempty" url:"description,omitempty"`
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
||||||
Image Optional[string] `json:"image,omitempty" url:"image,omitempty"`
|
Image Optional[string] `json:"image" url:"image,omitempty"`
|
||||||
EmbedVideoURL Optional[string] `json:"embed_video_url,omitempty" url:"embed_video_url,omitempty"`
|
EmbedVideoURL Optional[string] `json:"embed_video_url" url:"embed_video_url,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -1,71 +1,71 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
type CreatePrivateMessage struct {
|
type CreatePrivateMessage struct {
|
||||||
Content string `json:"content,omitempty" url:"content,omitempty"`
|
Content string `json:"content" url:"content,omitempty"`
|
||||||
RecipientID int `json:"recipient_id,omitempty" url:"recipient_id,omitempty"`
|
RecipientID int `json:"recipient_id" url:"recipient_id,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type EditPrivateMessage struct {
|
type EditPrivateMessage struct {
|
||||||
PrivateMessageID int `json:"private_message_id,omitempty" url:"private_message_id,omitempty"`
|
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
|
||||||
Content string `json:"content,omitempty" url:"content,omitempty"`
|
Content string `json:"content" url:"content,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeletePrivateMessage struct {
|
type DeletePrivateMessage struct {
|
||||||
PrivateMessageID int `json:"private_message_id,omitempty" url:"private_message_id,omitempty"`
|
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MarkPrivateMessageAsRead struct {
|
type MarkPrivateMessageAsRead struct {
|
||||||
PrivateMessageID int `json:"private_message_id,omitempty" url:"private_message_id,omitempty"`
|
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
|
||||||
Read bool `json:"read,omitempty" url:"read,omitempty"`
|
Read bool `json:"read" url:"read,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetPrivateMessages struct {
|
type GetPrivateMessages struct {
|
||||||
UnreadOnly Optional[bool] `json:"unread_only,omitempty" url:"unread_only,omitempty"`
|
UnreadOnly Optional[bool] `json:"unread_only" url:"unread_only,omitempty"`
|
||||||
Page Optional[int64] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int64] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PrivateMessagesResponse struct {
|
type PrivateMessagesResponse struct {
|
||||||
PrivateMessages []PrivateMessageView `json:"private_messages,omitempty" url:"private_messages,omitempty"`
|
PrivateMessages []PrivateMessageView `json:"private_messages" url:"private_messages,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type PrivateMessageResponse struct {
|
type PrivateMessageResponse struct {
|
||||||
PrivateMessageView PrivateMessageView `json:"private_message_view,omitempty" url:"private_message_view,omitempty"`
|
PrivateMessageView PrivateMessageView `json:"private_message_view" url:"private_message_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreatePrivateMessageReport struct {
|
type CreatePrivateMessageReport struct {
|
||||||
PrivateMessageID int `json:"private_message_id,omitempty" url:"private_message_id,omitempty"`
|
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
|
||||||
Reason string `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason string `json:"reason" url:"reason,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PrivateMessageReportResponse struct {
|
type PrivateMessageReportResponse struct {
|
||||||
PrivateMessageReportView PrivateMessageReportView `json:"private_message_report_view,omitempty" url:"private_message_report_view,omitempty"`
|
PrivateMessageReportView PrivateMessageReportView `json:"private_message_report_view" url:"private_message_report_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResolvePrivateMessageReport struct {
|
type ResolvePrivateMessageReport struct {
|
||||||
ReportID int `json:"report_id,omitempty" url:"report_id,omitempty"`
|
ReportID int `json:"report_id" url:"report_id,omitempty"`
|
||||||
Resolved bool `json:"resolved,omitempty" url:"resolved,omitempty"`
|
Resolved bool `json:"resolved" url:"resolved,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListPrivateMessageReports struct {
|
type ListPrivateMessageReports struct {
|
||||||
Page Optional[int64] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int64] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
||||||
UnresolvedOnly Optional[bool] `json:"unresolved_only,omitempty" url:"unresolved_only,omitempty"`
|
UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListPrivateMessageReportsResponse struct {
|
type ListPrivateMessageReportsResponse struct {
|
||||||
PrivateMessageReports []PrivateMessageReportView `json:"private_message_reports,omitempty" url:"private_message_reports,omitempty"`
|
PrivateMessageReports []PrivateMessageReportView `json:"private_message_reports" url:"private_message_reports,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
342
types/site.go
342
types/site.go
@ -1,256 +1,256 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
type Search struct {
|
type Search struct {
|
||||||
CommunityID Optional[int] `json:"community_id" url:"community_id"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
CommunityName Optional[string] `json:"community_name" url:"community_name"`
|
CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"`
|
||||||
CreatorID Optional[int] `json:"creator_id" url:"creator_id"`
|
CreatorID Optional[int] `json:"creator_id" url:"creator_id,omitempty"`
|
||||||
Limit Optional[int] `json:"limit" url:"limit"`
|
Limit Optional[int] `json:"limit" url:"limit,omitempty"`
|
||||||
ListingType Optional[ListingType] `json:"listing_type" url:"listing_type"`
|
ListingType Optional[ListingType] `json:"listing_type" url:"listing_type,omitempty"`
|
||||||
Page Optional[int] `json:"page" url:"page"`
|
Page Optional[int] `json:"page" url:"page,omitempty"`
|
||||||
Query string `json:"q" url:"q"`
|
Query string `json:"q" url:"q,omitempty"`
|
||||||
Sort Optional[SortType] `json:"sort" url:"sort"`
|
Sort Optional[SortType] `json:"sort" url:"sort,omitempty"`
|
||||||
Type Optional[SearchType] `json:"type_" url:"type_"`
|
Type Optional[SearchType] `json:"type_" url:"type_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SearchResponse struct {
|
type SearchResponse struct {
|
||||||
Type string `json:"type,omitempty" url:"type,omitempty"`
|
Type string `json:"type" url:"type,omitempty"`
|
||||||
Comments []CommentView `json:"comments,omitempty" url:"comments,omitempty"`
|
Comments []CommentView `json:"comments" url:"comments,omitempty"`
|
||||||
Posts []PostView `json:"posts,omitempty" url:"posts,omitempty"`
|
Posts []PostView `json:"posts" url:"posts,omitempty"`
|
||||||
Communities []CommunityView `json:"communities,omitempty" url:"communities,omitempty"`
|
Communities []CommunityView `json:"communities" url:"communities,omitempty"`
|
||||||
Users []PersonViewSafe `json:"users,omitempty" url:"users,omitempty"`
|
Users []PersonViewSafe `json:"users" url:"users,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResolveObject struct {
|
type ResolveObject struct {
|
||||||
Query string `json:"q,omitempty" url:"q,omitempty"`
|
Query string `json:"q" url:"q,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResolveObjectResponse struct {
|
type ResolveObjectResponse struct {
|
||||||
Comment Optional[CommentView] `json:"comment,omitempty" url:"comment,omitempty"`
|
Comment Optional[CommentView] `json:"comment" url:"comment,omitempty"`
|
||||||
Post Optional[PostView] `json:"post,omitempty" url:"post,omitempty"`
|
Post Optional[PostView] `json:"post" url:"post,omitempty"`
|
||||||
Community Optional[CommunityView] `json:"community,omitempty" url:"community,omitempty"`
|
Community Optional[CommunityView] `json:"community" url:"community,omitempty"`
|
||||||
Person Optional[PersonViewSafe] `json:"person,omitempty" url:"person,omitempty"`
|
Person Optional[PersonViewSafe] `json:"person" url:"person,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetModlog struct {
|
type GetModlog struct {
|
||||||
ModPersonID Optional[int] `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID Optional[int] `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
CommunityID Optional[int] `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
||||||
Page Optional[int64] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int64] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
Type Optional[ModlogActionType] `json:"type,omitempty" url:"type,omitempty"`
|
Type Optional[ModlogActionType] `json:"type" url:"type,omitempty"`
|
||||||
OtherPersonID Optional[int] `json:"other_person_id,omitempty" url:"other_person_id,omitempty"`
|
OtherPersonID Optional[int] `json:"other_person_id" url:"other_person_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetModlogResponse struct {
|
type GetModlogResponse struct {
|
||||||
RemovedPosts []ModRemovePostView `json:"removed_posts,omitempty" url:"removed_posts,omitempty"`
|
RemovedPosts []ModRemovePostView `json:"removed_posts" url:"removed_posts,omitempty"`
|
||||||
LockedPosts []ModLockPostView `json:"locked_posts,omitempty" url:"locked_posts,omitempty"`
|
LockedPosts []ModLockPostView `json:"locked_posts" url:"locked_posts,omitempty"`
|
||||||
StickiedPosts []ModStickyPostView `json:"stickied_posts,omitempty" url:"stickied_posts,omitempty"`
|
StickiedPosts []ModStickyPostView `json:"stickied_posts" url:"stickied_posts,omitempty"`
|
||||||
RemovedComments []ModRemoveCommentView `json:"removed_comments,omitempty" url:"removed_comments,omitempty"`
|
RemovedComments []ModRemoveCommentView `json:"removed_comments" url:"removed_comments,omitempty"`
|
||||||
RemovedCommunities []ModRemoveCommunityView `json:"removed_communities,omitempty" url:"removed_communities,omitempty"`
|
RemovedCommunities []ModRemoveCommunityView `json:"removed_communities" url:"removed_communities,omitempty"`
|
||||||
BannedFromCommunity []ModBanFromCommunityView `json:"banned_from_community,omitempty" url:"banned_from_community,omitempty"`
|
BannedFromCommunity []ModBanFromCommunityView `json:"banned_from_community" url:"banned_from_community,omitempty"`
|
||||||
Banned []ModBanView `json:"banned,omitempty" url:"banned,omitempty"`
|
Banned []ModBanView `json:"banned" url:"banned,omitempty"`
|
||||||
AddedToCommunity []ModAddCommunityView `json:"added_to_community,omitempty" url:"added_to_community,omitempty"`
|
AddedToCommunity []ModAddCommunityView `json:"added_to_community" url:"added_to_community,omitempty"`
|
||||||
TransferredToCommunity []ModTransferCommunityView `json:"transferred_to_community,omitempty" url:"transferred_to_community,omitempty"`
|
TransferredToCommunity []ModTransferCommunityView `json:"transferred_to_community" url:"transferred_to_community,omitempty"`
|
||||||
Added []ModAddView `json:"added,omitempty" url:"added,omitempty"`
|
Added []ModAddView `json:"added" url:"added,omitempty"`
|
||||||
AdminPurgedPersons []AdminPurgePersonView `json:"admin_purged_persons,omitempty" url:"admin_purged_persons,omitempty"`
|
AdminPurgedPersons []AdminPurgePersonView `json:"admin_purged_persons" url:"admin_purged_persons,omitempty"`
|
||||||
AdminPurgedCommunities []AdminPurgeCommunityView `json:"admin_purged_communities,omitempty" url:"admin_purged_communities,omitempty"`
|
AdminPurgedCommunities []AdminPurgeCommunityView `json:"admin_purged_communities" url:"admin_purged_communities,omitempty"`
|
||||||
AdminPurgedPosts []AdminPurgePostView `json:"admin_purged_posts,omitempty" url:"admin_purged_posts,omitempty"`
|
AdminPurgedPosts []AdminPurgePostView `json:"admin_purged_posts" url:"admin_purged_posts,omitempty"`
|
||||||
AdminPurgedComments []AdminPurgeCommentView `json:"admin_purged_comments,omitempty" url:"admin_purged_comments,omitempty"`
|
AdminPurgedComments []AdminPurgeCommentView `json:"admin_purged_comments" url:"admin_purged_comments,omitempty"`
|
||||||
HiddenCommunities []ModHideCommunityView `json:"hidden_communities,omitempty" url:"hidden_communities,omitempty"`
|
HiddenCommunities []ModHideCommunityView `json:"hidden_communities" url:"hidden_communities,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateSite struct {
|
type CreateSite struct {
|
||||||
Name string `json:"name,omitempty" url:"name,omitempty"`
|
Name string `json:"name" url:"name,omitempty"`
|
||||||
Sidebar Optional[string] `json:"sidebar,omitempty" url:"sidebar,omitempty"`
|
Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"`
|
||||||
Description Optional[string] `json:"description,omitempty" url:"description,omitempty"`
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
||||||
Icon Optional[string] `json:"icon,omitempty" url:"icon,omitempty"`
|
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
|
||||||
Banner Optional[string] `json:"banner,omitempty" url:"banner,omitempty"`
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
||||||
EnableDownvotes Optional[bool] `json:"enable_downvotes,omitempty" url:"enable_downvotes,omitempty"`
|
EnableDownvotes Optional[bool] `json:"enable_downvotes" url:"enable_downvotes,omitempty"`
|
||||||
OpenRegistration Optional[bool] `json:"open_registration,omitempty" url:"open_registration,omitempty"`
|
OpenRegistration Optional[bool] `json:"open_registration" url:"open_registration,omitempty"`
|
||||||
EnableNSFW Optional[bool] `json:"enable_nsfw,omitempty" url:"enable_nsfw,omitempty"`
|
EnableNSFW Optional[bool] `json:"enable_nsfw" url:"enable_nsfw,omitempty"`
|
||||||
CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only,omitempty" url:"community_creation_admin_only,omitempty"`
|
CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"`
|
||||||
RequireEmailVerification Optional[bool] `json:"require_email_verification,omitempty" url:"require_email_verification,omitempty"`
|
RequireEmailVerification Optional[bool] `json:"require_email_verification" url:"require_email_verification,omitempty"`
|
||||||
RequireApplication Optional[bool] `json:"require_application,omitempty" url:"require_application,omitempty"`
|
RequireApplication Optional[bool] `json:"require_application" url:"require_application,omitempty"`
|
||||||
ApplicationQuestion Optional[string] `json:"application_question,omitempty" url:"application_question,omitempty"`
|
ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"`
|
||||||
PrivateInstance Optional[bool] `json:"private_instance,omitempty" url:"private_instance,omitempty"`
|
PrivateInstance Optional[bool] `json:"private_instance" url:"private_instance,omitempty"`
|
||||||
DefaultTheme Optional[string] `json:"default_theme,omitempty" url:"default_theme,omitempty"`
|
DefaultTheme Optional[string] `json:"default_theme" url:"default_theme,omitempty"`
|
||||||
DefaultPostListingType Optional[string] `json:"default_post_listing_type,omitempty" url:"default_post_listing_type,omitempty"`
|
DefaultPostListingType Optional[string] `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"`
|
||||||
LegalInformation Optional[string] `json:"legal_information,omitempty" url:"legal_information,omitempty"`
|
LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"`
|
||||||
ApplicationEmailAdmins Optional[bool] `json:"application_email_admins,omitempty" url:"application_email_admins,omitempty"`
|
ApplicationEmailAdmins Optional[bool] `json:"application_email_admins" url:"application_email_admins,omitempty"`
|
||||||
HideModlogModNames Optional[bool] `json:"hide_modlog_mod_names,omitempty" url:"hide_modlog_mod_names,omitempty"`
|
HideModlogModNames Optional[bool] `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"`
|
||||||
DiscussionLanguages Optional[[]int] `json:"discussion_languages,omitempty" url:"discussion_languages,omitempty"`
|
DiscussionLanguages Optional[[]int] `json:"discussion_languages" url:"discussion_languages,omitempty"`
|
||||||
SlurFilterRegex Optional[string] `json:"slur_filter_regex,omitempty" url:"slur_filter_regex,omitempty"`
|
SlurFilterRegex Optional[string] `json:"slur_filter_regex" url:"slur_filter_regex,omitempty"`
|
||||||
ActorNameMaxLength Optional[int] `json:"actor_name_max_length,omitempty" url:"actor_name_max_length,omitempty"`
|
ActorNameMaxLength Optional[int] `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"`
|
||||||
RateLimitMessage Optional[int] `json:"rate_limit_message,omitempty" url:"rate_limit_message,omitempty"`
|
RateLimitMessage Optional[int] `json:"rate_limit_message" url:"rate_limit_message,omitempty"`
|
||||||
RateLimitMessagePerSecond Optional[int] `json:"rate_limit_message_per_second,omitempty" url:"rate_limit_message_per_second,omitempty"`
|
RateLimitMessagePerSecond Optional[int] `json:"rate_limit_message_per_second" url:"rate_limit_message_per_second,omitempty"`
|
||||||
RateLimitPost Optional[int] `json:"rate_limit_post,omitempty" url:"rate_limit_post,omitempty"`
|
RateLimitPost Optional[int] `json:"rate_limit_post" url:"rate_limit_post,omitempty"`
|
||||||
RateLimitPostPerSecond Optional[int] `json:"rate_limit_post_per_second,omitempty" url:"rate_limit_post_per_second,omitempty"`
|
RateLimitPostPerSecond Optional[int] `json:"rate_limit_post_per_second" url:"rate_limit_post_per_second,omitempty"`
|
||||||
RateLimitRegister Optional[int] `json:"rate_limit_register,omitempty" url:"rate_limit_register,omitempty"`
|
RateLimitRegister Optional[int] `json:"rate_limit_register" url:"rate_limit_register,omitempty"`
|
||||||
RateLimitRegisterPerSecond Optional[int] `json:"rate_limit_register_per_second,omitempty" url:"rate_limit_register_per_second,omitempty"`
|
RateLimitRegisterPerSecond Optional[int] `json:"rate_limit_register_per_second" url:"rate_limit_register_per_second,omitempty"`
|
||||||
RateLimitImage Optional[int] `json:"rate_limit_image,omitempty" url:"rate_limit_image,omitempty"`
|
RateLimitImage Optional[int] `json:"rate_limit_image" url:"rate_limit_image,omitempty"`
|
||||||
RateLimitImagePerSecond Optional[int] `json:"rate_limit_image_per_second,omitempty" url:"rate_limit_image_per_second,omitempty"`
|
RateLimitImagePerSecond Optional[int] `json:"rate_limit_image_per_second" url:"rate_limit_image_per_second,omitempty"`
|
||||||
RateLimitComment Optional[int] `json:"rate_limit_comment,omitempty" url:"rate_limit_comment,omitempty"`
|
RateLimitComment Optional[int] `json:"rate_limit_comment" url:"rate_limit_comment,omitempty"`
|
||||||
RateLimitCommentPerSecond Optional[int] `json:"rate_limit_comment_per_second,omitempty" url:"rate_limit_comment_per_second,omitempty"`
|
RateLimitCommentPerSecond Optional[int] `json:"rate_limit_comment_per_second" url:"rate_limit_comment_per_second,omitempty"`
|
||||||
RateLimitSearch Optional[int] `json:"rate_limit_search,omitempty" url:"rate_limit_search,omitempty"`
|
RateLimitSearch Optional[int] `json:"rate_limit_search" url:"rate_limit_search,omitempty"`
|
||||||
RateLimitSearchPerSecond Optional[int] `json:"rate_limit_search_per_second,omitempty" url:"rate_limit_search_per_second,omitempty"`
|
RateLimitSearchPerSecond Optional[int] `json:"rate_limit_search_per_second" url:"rate_limit_search_per_second,omitempty"`
|
||||||
FederationEnabled Optional[bool] `json:"federation_enabled,omitempty" url:"federation_enabled,omitempty"`
|
FederationEnabled Optional[bool] `json:"federation_enabled" url:"federation_enabled,omitempty"`
|
||||||
FederationDebug Optional[bool] `json:"federation_debug,omitempty" url:"federation_debug,omitempty"`
|
FederationDebug Optional[bool] `json:"federation_debug" url:"federation_debug,omitempty"`
|
||||||
FederationWorkerCount Optional[int] `json:"federation_worker_count,omitempty" url:"federation_worker_count,omitempty"`
|
FederationWorkerCount Optional[int] `json:"federation_worker_count" url:"federation_worker_count,omitempty"`
|
||||||
CaptchaEnabled Optional[bool] `json:"captcha_enabled,omitempty" url:"captcha_enabled,omitempty"`
|
CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
|
||||||
CaptchaDifficulty Optional[string] `json:"captcha_difficulty,omitempty" url:"captcha_difficulty,omitempty"`
|
CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
|
||||||
AllowedInstances Optional[[]string] `json:"allowed_instances,omitempty" url:"allowed_instances,omitempty"`
|
AllowedInstances Optional[[]string] `json:"allowed_instances" url:"allowed_instances,omitempty"`
|
||||||
BlockedInstances Optional[[]string] `json:"blocked_instances,omitempty" url:"blocked_instances,omitempty"`
|
BlockedInstances Optional[[]string] `json:"blocked_instances" url:"blocked_instances,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type EditSite struct {
|
type EditSite struct {
|
||||||
Name Optional[string] `json:"name,omitempty" url:"name,omitempty"`
|
Name Optional[string] `json:"name" url:"name,omitempty"`
|
||||||
Sidebar Optional[string] `json:"sidebar,omitempty" url:"sidebar,omitempty"`
|
Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"`
|
||||||
Description Optional[string] `json:"description,omitempty" url:"description,omitempty"`
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
||||||
Icon Optional[string] `json:"icon,omitempty" url:"icon,omitempty"`
|
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
|
||||||
Banner Optional[string] `json:"banner,omitempty" url:"banner,omitempty"`
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
||||||
EnableDownvotes Optional[bool] `json:"enable_downvotes,omitempty" url:"enable_downvotes,omitempty"`
|
EnableDownvotes Optional[bool] `json:"enable_downvotes" url:"enable_downvotes,omitempty"`
|
||||||
OpenRegistration Optional[bool] `json:"open_registration,omitempty" url:"open_registration,omitempty"`
|
OpenRegistration Optional[bool] `json:"open_registration" url:"open_registration,omitempty"`
|
||||||
EnableNSFW Optional[bool] `json:"enable_nsfw,omitempty" url:"enable_nsfw,omitempty"`
|
EnableNSFW Optional[bool] `json:"enable_nsfw" url:"enable_nsfw,omitempty"`
|
||||||
CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only,omitempty" url:"community_creation_admin_only,omitempty"`
|
CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"`
|
||||||
RequireEmailVerification Optional[bool] `json:"require_email_verification,omitempty" url:"require_email_verification,omitempty"`
|
RequireEmailVerification Optional[bool] `json:"require_email_verification" url:"require_email_verification,omitempty"`
|
||||||
RequireApplication Optional[bool] `json:"require_application,omitempty" url:"require_application,omitempty"`
|
RequireApplication Optional[bool] `json:"require_application" url:"require_application,omitempty"`
|
||||||
ApplicationQuestion Optional[string] `json:"application_question,omitempty" url:"application_question,omitempty"`
|
ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"`
|
||||||
PrivateInstance Optional[bool] `json:"private_instance,omitempty" url:"private_instance,omitempty"`
|
PrivateInstance Optional[bool] `json:"private_instance" url:"private_instance,omitempty"`
|
||||||
DefaultTheme Optional[string] `json:"default_theme,omitempty" url:"default_theme,omitempty"`
|
DefaultTheme Optional[string] `json:"default_theme" url:"default_theme,omitempty"`
|
||||||
DefaultPostListingType Optional[string] `json:"default_post_listing_type,omitempty" url:"default_post_listing_type,omitempty"`
|
DefaultPostListingType Optional[string] `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"`
|
||||||
LegalInformation Optional[string] `json:"legal_information,omitempty" url:"legal_information,omitempty"`
|
LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"`
|
||||||
ApplicationEmailAdmins Optional[bool] `json:"application_email_admins,omitempty" url:"application_email_admins,omitempty"`
|
ApplicationEmailAdmins Optional[bool] `json:"application_email_admins" url:"application_email_admins,omitempty"`
|
||||||
HideModlogModNames Optional[bool] `json:"hide_modlog_mod_names,omitempty" url:"hide_modlog_mod_names,omitempty"`
|
HideModlogModNames Optional[bool] `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"`
|
||||||
DiscussionLanguages Optional[[]int] `json:"discussion_languages,omitempty" url:"discussion_languages,omitempty"`
|
DiscussionLanguages Optional[[]int] `json:"discussion_languages" url:"discussion_languages,omitempty"`
|
||||||
SlurFilterRegex Optional[string] `json:"slur_filter_regex,omitempty" url:"slur_filter_regex,omitempty"`
|
SlurFilterRegex Optional[string] `json:"slur_filter_regex" url:"slur_filter_regex,omitempty"`
|
||||||
ActorNameMaxLength Optional[int] `json:"actor_name_max_length,omitempty" url:"actor_name_max_length,omitempty"`
|
ActorNameMaxLength Optional[int] `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"`
|
||||||
RateLimitMessage Optional[int] `json:"rate_limit_message,omitempty" url:"rate_limit_message,omitempty"`
|
RateLimitMessage Optional[int] `json:"rate_limit_message" url:"rate_limit_message,omitempty"`
|
||||||
RateLimitMessagePerSecond Optional[int] `json:"rate_limit_message_per_second,omitempty" url:"rate_limit_message_per_second,omitempty"`
|
RateLimitMessagePerSecond Optional[int] `json:"rate_limit_message_per_second" url:"rate_limit_message_per_second,omitempty"`
|
||||||
RateLimitPost Optional[int] `json:"rate_limit_post,omitempty" url:"rate_limit_post,omitempty"`
|
RateLimitPost Optional[int] `json:"rate_limit_post" url:"rate_limit_post,omitempty"`
|
||||||
RateLimitPostPerSecond Optional[int] `json:"rate_limit_post_per_second,omitempty" url:"rate_limit_post_per_second,omitempty"`
|
RateLimitPostPerSecond Optional[int] `json:"rate_limit_post_per_second" url:"rate_limit_post_per_second,omitempty"`
|
||||||
RateLimitRegister Optional[int] `json:"rate_limit_register,omitempty" url:"rate_limit_register,omitempty"`
|
RateLimitRegister Optional[int] `json:"rate_limit_register" url:"rate_limit_register,omitempty"`
|
||||||
RateLimitRegisterPerSecond Optional[int] `json:"rate_limit_register_per_second,omitempty" url:"rate_limit_register_per_second,omitempty"`
|
RateLimitRegisterPerSecond Optional[int] `json:"rate_limit_register_per_second" url:"rate_limit_register_per_second,omitempty"`
|
||||||
RateLimitImage Optional[int] `json:"rate_limit_image,omitempty" url:"rate_limit_image,omitempty"`
|
RateLimitImage Optional[int] `json:"rate_limit_image" url:"rate_limit_image,omitempty"`
|
||||||
RateLimitImagePerSecond Optional[int] `json:"rate_limit_image_per_second,omitempty" url:"rate_limit_image_per_second,omitempty"`
|
RateLimitImagePerSecond Optional[int] `json:"rate_limit_image_per_second" url:"rate_limit_image_per_second,omitempty"`
|
||||||
RateLimitComment Optional[int] `json:"rate_limit_comment,omitempty" url:"rate_limit_comment,omitempty"`
|
RateLimitComment Optional[int] `json:"rate_limit_comment" url:"rate_limit_comment,omitempty"`
|
||||||
RateLimitCommentPerSecond Optional[int] `json:"rate_limit_comment_per_second,omitempty" url:"rate_limit_comment_per_second,omitempty"`
|
RateLimitCommentPerSecond Optional[int] `json:"rate_limit_comment_per_second" url:"rate_limit_comment_per_second,omitempty"`
|
||||||
RateLimitSearch Optional[int] `json:"rate_limit_search,omitempty" url:"rate_limit_search,omitempty"`
|
RateLimitSearch Optional[int] `json:"rate_limit_search" url:"rate_limit_search,omitempty"`
|
||||||
RateLimitSearchPerSecond Optional[int] `json:"rate_limit_search_per_second,omitempty" url:"rate_limit_search_per_second,omitempty"`
|
RateLimitSearchPerSecond Optional[int] `json:"rate_limit_search_per_second" url:"rate_limit_search_per_second,omitempty"`
|
||||||
FederationEnabled Optional[bool] `json:"federation_enabled,omitempty" url:"federation_enabled,omitempty"`
|
FederationEnabled Optional[bool] `json:"federation_enabled" url:"federation_enabled,omitempty"`
|
||||||
FederationDebug Optional[bool] `json:"federation_debug,omitempty" url:"federation_debug,omitempty"`
|
FederationDebug Optional[bool] `json:"federation_debug" url:"federation_debug,omitempty"`
|
||||||
FederationWorkerCount Optional[int] `json:"federation_worker_count,omitempty" url:"federation_worker_count,omitempty"`
|
FederationWorkerCount Optional[int] `json:"federation_worker_count" url:"federation_worker_count,omitempty"`
|
||||||
CaptchaEnabled Optional[bool] `json:"captcha_enabled,omitempty" url:"captcha_enabled,omitempty"`
|
CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
|
||||||
CaptchaDifficulty Optional[string] `json:"captcha_difficulty,omitempty" url:"captcha_difficulty,omitempty"`
|
CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
|
||||||
AllowedInstances Optional[[]string] `json:"allowed_instances,omitempty" url:"allowed_instances,omitempty"`
|
AllowedInstances Optional[[]string] `json:"allowed_instances" url:"allowed_instances,omitempty"`
|
||||||
BlockedInstances Optional[[]string] `json:"blocked_instances,omitempty" url:"blocked_instances,omitempty"`
|
BlockedInstances Optional[[]string] `json:"blocked_instances" url:"blocked_instances,omitempty"`
|
||||||
Taglines Optional[[]string] `json:"taglines,omitempty" url:"taglines,omitempty"`
|
Taglines Optional[[]string] `json:"taglines" url:"taglines,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetSite struct {
|
type GetSite struct {
|
||||||
Auth Optional[string] `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SiteResponse struct {
|
type SiteResponse struct {
|
||||||
SiteView SiteView `json:"site_view,omitempty" url:"site_view,omitempty"`
|
SiteView SiteView `json:"site_view" url:"site_view,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetSiteResponse struct {
|
type GetSiteResponse struct {
|
||||||
SiteView SiteView `json:"site_view,omitempty" url:"site_view,omitempty"`
|
SiteView SiteView `json:"site_view" url:"site_view,omitempty"`
|
||||||
Admins []PersonViewSafe `json:"admins,omitempty" url:"admins,omitempty"`
|
Admins []PersonViewSafe `json:"admins" url:"admins,omitempty"`
|
||||||
Online int `json:"online,omitempty" url:"online,omitempty"`
|
Online int `json:"online" url:"online,omitempty"`
|
||||||
Version string `json:"version,omitempty" url:"version,omitempty"`
|
Version string `json:"version" url:"version,omitempty"`
|
||||||
MyUser Optional[MyUserInfo] `json:"my_user,omitempty" url:"my_user,omitempty"`
|
MyUser Optional[MyUserInfo] `json:"my_user" url:"my_user,omitempty"`
|
||||||
FederatedInstances Optional[FederatedInstances] `json:"federated_instances,omitempty" url:"federated_instances,omitempty"`
|
FederatedInstances Optional[FederatedInstances] `json:"federated_instances" url:"federated_instances,omitempty"`
|
||||||
AllLanguages []Language `json:"all_languages,omitempty" url:"all_languages,omitempty"`
|
AllLanguages []Language `json:"all_languages" url:"all_languages,omitempty"`
|
||||||
DiscussionLanguages []int `json:"discussion_languages,omitempty" url:"discussion_languages,omitempty"`
|
DiscussionLanguages []int `json:"discussion_languages" url:"discussion_languages,omitempty"`
|
||||||
Taglines Optional[[]Tagline] `json:"taglines,omitempty" url:"taglines,omitempty"`
|
Taglines Optional[[]Tagline] `json:"taglines" url:"taglines,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type MyUserInfo struct {
|
type MyUserInfo struct {
|
||||||
LocalUserView LocalUserSettingsView `json:"local_user_view,omitempty" url:"local_user_view,omitempty"`
|
LocalUserView LocalUserSettingsView `json:"local_user_view" url:"local_user_view,omitempty"`
|
||||||
Follows []CommunityFollowerView `json:"follows,omitempty" url:"follows,omitempty"`
|
Follows []CommunityFollowerView `json:"follows" url:"follows,omitempty"`
|
||||||
Moderates []CommunityModeratorView `json:"moderates,omitempty" url:"moderates,omitempty"`
|
Moderates []CommunityModeratorView `json:"moderates" url:"moderates,omitempty"`
|
||||||
CommunityBlocks []CommunityBlockView `json:"community_blocks,omitempty" url:"community_blocks,omitempty"`
|
CommunityBlocks []CommunityBlockView `json:"community_blocks" url:"community_blocks,omitempty"`
|
||||||
PersonBlocks []PersonBlockView `json:"person_blocks,omitempty" url:"person_blocks,omitempty"`
|
PersonBlocks []PersonBlockView `json:"person_blocks" url:"person_blocks,omitempty"`
|
||||||
DiscussionLanguages []Language `json:"discussion_languages,omitempty" url:"discussion_languages,omitempty"`
|
DiscussionLanguages []Language `json:"discussion_languages" url:"discussion_languages,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LeaveAdmin struct {
|
type LeaveAdmin struct {
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type FederatedInstances struct {
|
type FederatedInstances struct {
|
||||||
Linked []string `json:"linked,omitempty" url:"linked,omitempty"`
|
Linked []string `json:"linked" url:"linked,omitempty"`
|
||||||
Allowed Optional[[]string] `json:"allowed,omitempty" url:"allowed,omitempty"`
|
Allowed Optional[[]string] `json:"allowed" url:"allowed,omitempty"`
|
||||||
Blocked Optional[[]string] `json:"blocked,omitempty" url:"blocked,omitempty"`
|
Blocked Optional[[]string] `json:"blocked" url:"blocked,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PurgePerson struct {
|
type PurgePerson struct {
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PurgeCommunity struct {
|
type PurgeCommunity struct {
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PurgePost struct {
|
type PurgePost struct {
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PurgeComment struct {
|
type PurgeComment struct {
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PurgeItemResponse struct {
|
type PurgeItemResponse struct {
|
||||||
Success bool `json:"success,omitempty" url:"success,omitempty"`
|
Success bool `json:"success" url:"success,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListRegistrationApplications struct {
|
type ListRegistrationApplications struct {
|
||||||
UnreadOnly Optional[bool] `json:"unread_only,omitempty" url:"unread_only,omitempty"`
|
UnreadOnly Optional[bool] `json:"unread_only" url:"unread_only,omitempty"`
|
||||||
Page Optional[int] `json:"page,omitempty" url:"page,omitempty"`
|
Page Optional[int] `json:"page" url:"page,omitempty"`
|
||||||
Limit Optional[int] `json:"limit,omitempty" url:"limit,omitempty"`
|
Limit Optional[int] `json:"limit" url:"limit,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListRegistrationApplicationsResponse struct {
|
type ListRegistrationApplicationsResponse struct {
|
||||||
RegistrationApplications []RegistrationApplicationView `json:"registration_applications,omitempty" url:"registration_applications,omitempty"`
|
RegistrationApplications []RegistrationApplicationView `json:"registration_applications" url:"registration_applications,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type ApproveRegistrationApplication struct {
|
type ApproveRegistrationApplication struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
Approve bool `json:"approve,omitempty" url:"approve,omitempty"`
|
Approve bool `json:"approve" url:"approve,omitempty"`
|
||||||
DenyReason Optional[string] `json:"deny_reason,omitempty" url:"deny_reason,omitempty"`
|
DenyReason Optional[string] `json:"deny_reason" url:"deny_reason,omitempty"`
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RegistrationApplicationResponse struct {
|
type RegistrationApplicationResponse struct {
|
||||||
RegistrationApplication RegistrationApplicationView `json:"registration_application,omitempty" url:"registration_application,omitempty"`
|
RegistrationApplication RegistrationApplicationView `json:"registration_application" url:"registration_application,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetUnreadRegistrationApplicationCount struct {
|
type GetUnreadRegistrationApplicationCount struct {
|
||||||
Auth string `json:"auth,omitempty" url:"auth,omitempty"`
|
Auth string `json:"auth" url:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetUnreadRegistrationApplicationCountResponse struct {
|
type GetUnreadRegistrationApplicationCountResponse struct {
|
||||||
RegistrationApplications int `json:"registration_applications,omitempty" url:"registration_applications,omitempty"`
|
RegistrationApplications int `json:"registration_applications" url:"registration_applications,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
584
types/source.go
584
types/source.go
@ -3,400 +3,400 @@ package types
|
|||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
type LocalUserSettings struct {
|
type LocalUserSettings struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
PersonID int `json:"person_id,omitempty" url:"person_id,omitempty"`
|
PersonID int `json:"person_id" url:"person_id,omitempty"`
|
||||||
Email Optional[string] `json:"email,omitempty" url:"email,omitempty"`
|
Email Optional[string] `json:"email" url:"email,omitempty"`
|
||||||
ShowNSFW bool `json:"show_nsfw,omitempty" url:"show_nsfw,omitempty"`
|
ShowNSFW bool `json:"show_nsfw" url:"show_nsfw,omitempty"`
|
||||||
Theme string `json:"theme,omitempty" url:"theme,omitempty"`
|
Theme string `json:"theme" url:"theme,omitempty"`
|
||||||
DefaultSortType int `json:"default_sort_type,omitempty" url:"default_sort_type,omitempty"`
|
DefaultSortType int `json:"default_sort_type" url:"default_sort_type,omitempty"`
|
||||||
DefaultListingType int `json:"default_listing_type,omitempty" url:"default_listing_type,omitempty"`
|
DefaultListingType int `json:"default_listing_type" url:"default_listing_type,omitempty"`
|
||||||
InterfaceLanguage string `json:"interface_language,omitempty" url:"interface_language,omitempty"`
|
InterfaceLanguage string `json:"interface_language" url:"interface_language,omitempty"`
|
||||||
ShowAvatars bool `json:"show_avatars,omitempty" url:"show_avatars,omitempty"`
|
ShowAvatars bool `json:"show_avatars" url:"show_avatars,omitempty"`
|
||||||
SendNotifications bool `json:"send_notifications_to_email,omitempty" url:"send_notifications_to_email,omitempty"`
|
SendNotifications bool `json:"send_notifications_to_email" url:"send_notifications_to_email,omitempty"`
|
||||||
ValidatorTime string `json:"validator_time,omitempty" url:"validator_time,omitempty"`
|
ValidatorTime string `json:"validator_time" url:"validator_time,omitempty"`
|
||||||
ShowBotAccounts bool `json:"show_bot_accounts,omitempty" url:"show_bot_accounts,omitempty"`
|
ShowBotAccounts bool `json:"show_bot_accounts" url:"show_bot_accounts,omitempty"`
|
||||||
ShowScores bool `json:"show_scores,omitempty" url:"show_scores,omitempty"`
|
ShowScores bool `json:"show_scores" url:"show_scores,omitempty"`
|
||||||
ShowReadPosts bool `json:"show_read_posts,omitempty" url:"show_read_posts,omitempty"`
|
ShowReadPosts bool `json:"show_read_posts" url:"show_read_posts,omitempty"`
|
||||||
ShowNewPostNotifs bool `json:"show_new_post_notifs,omitempty" url:"show_new_post_notifs,omitempty"`
|
ShowNewPostNotifs bool `json:"show_new_post_notifs" url:"show_new_post_notifs,omitempty"`
|
||||||
EmailVerified bool `json:"email_verified,omitempty" url:"email_verified,omitempty"`
|
EmailVerified bool `json:"email_verified" url:"email_verified,omitempty"`
|
||||||
AcceptedApplication bool `json:"accepted_application,omitempty" url:"accepted_application,omitempty"`
|
AcceptedApplication bool `json:"accepted_application" url:"accepted_application,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PersonSafe struct {
|
type PersonSafe struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
Name string `json:"name,omitempty" url:"name,omitempty"`
|
Name string `json:"name" url:"name,omitempty"`
|
||||||
DisplayName Optional[string] `json:"display_name,omitempty" url:"display_name,omitempty"`
|
DisplayName Optional[string] `json:"display_name" url:"display_name,omitempty"`
|
||||||
Avatar Optional[string] `json:"avatar,omitempty" url:"avatar,omitempty"`
|
Avatar Optional[string] `json:"avatar" url:"avatar,omitempty"`
|
||||||
Banned bool `json:"banned,omitempty" url:"banned,omitempty"`
|
Banned bool `json:"banned" url:"banned,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
ActorID string `json:"actor_id,omitempty" url:"actor_id,omitempty"`
|
ActorID string `json:"actor_id" url:"actor_id,omitempty"`
|
||||||
Bio Optional[string] `json:"bio,omitempty" url:"bio,omitempty"`
|
Bio Optional[string] `json:"bio" url:"bio,omitempty"`
|
||||||
Local bool `json:"local,omitempty" url:"local,omitempty"`
|
Local bool `json:"local" url:"local,omitempty"`
|
||||||
Banner Optional[string] `json:"banner,omitempty" url:"banner,omitempty"`
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
InboxURL string `json:"inbox_url,omitempty" url:"inbox_url,omitempty"`
|
InboxURL string `json:"inbox_url" url:"inbox_url,omitempty"`
|
||||||
SharedInboxURL Optional[string] `json:"shared_inbox_url,omitempty" url:"shared_inbox_url,omitempty"`
|
SharedInboxURL Optional[string] `json:"shared_inbox_url" url:"shared_inbox_url,omitempty"`
|
||||||
MatrixUserID Optional[string] `json:"matrix_user_id,omitempty" url:"matrix_user_id,omitempty"`
|
MatrixUserID Optional[string] `json:"matrix_user_id" url:"matrix_user_id,omitempty"`
|
||||||
Admin bool `json:"admin,omitempty" url:"admin,omitempty"`
|
Admin bool `json:"admin" url:"admin,omitempty"`
|
||||||
BotAccount bool `json:"bot_account,omitempty" url:"bot_account,omitempty"`
|
BotAccount bool `json:"bot_account" url:"bot_account,omitempty"`
|
||||||
BanExpires Optional[string] `json:"ban_expires,omitempty" url:"ban_expires,omitempty"`
|
BanExpires Optional[string] `json:"ban_expires" url:"ban_expires,omitempty"`
|
||||||
InstanceID int `json:"instance_id,omitempty" url:"instance_id,omitempty"`
|
InstanceID int `json:"instance_id" url:"instance_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Site struct {
|
type Site struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
Name string `json:"name,omitempty" url:"name,omitempty"`
|
Name string `json:"name" url:"name,omitempty"`
|
||||||
Sidebar Optional[string] `json:"sidebar,omitempty" url:"sidebar,omitempty"`
|
Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
Icon Optional[string] `json:"icon,omitempty" url:"icon,omitempty"`
|
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
|
||||||
Banner Optional[string] `json:"banner,omitempty" url:"banner,omitempty"`
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
||||||
Description Optional[string] `json:"description,omitempty" url:"description,omitempty"`
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
||||||
ActorID string `json:"actor_id,omitempty" url:"actor_id,omitempty"`
|
ActorID string `json:"actor_id" url:"actor_id,omitempty"`
|
||||||
LastRefreshedAt string `json:"last_refreshed_at,omitempty" url:"last_refreshed_at,omitempty"`
|
LastRefreshedAt string `json:"last_refreshed_at" url:"last_refreshed_at,omitempty"`
|
||||||
InboxURL string `json:"inbox_url,omitempty" url:"inbox_url,omitempty"`
|
InboxURL string `json:"inbox_url" url:"inbox_url,omitempty"`
|
||||||
PrivateKey Optional[string] `json:"private_key,omitempty" url:"private_key,omitempty"`
|
PrivateKey Optional[string] `json:"private_key" url:"private_key,omitempty"`
|
||||||
PublicKey string `json:"public_key,omitempty" url:"public_key,omitempty"`
|
PublicKey string `json:"public_key" url:"public_key,omitempty"`
|
||||||
InstanceID int `json:"instance_id,omitempty" url:"instance_id,omitempty"`
|
InstanceID int `json:"instance_id" url:"instance_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LocalSite struct {
|
type LocalSite struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
SiteID int `json:"site_id,omitempty" url:"site_id,omitempty"`
|
SiteID int `json:"site_id" url:"site_id,omitempty"`
|
||||||
SiteSetup bool `json:"site_setup,omitempty" url:"site_setup,omitempty"`
|
SiteSetup bool `json:"site_setup" url:"site_setup,omitempty"`
|
||||||
EnableDownvotes bool `json:"enable_downvotes,omitempty" url:"enable_downvotes,omitempty"`
|
EnableDownvotes bool `json:"enable_downvotes" url:"enable_downvotes,omitempty"`
|
||||||
OpenRegistration bool `json:"open_registration,omitempty" url:"open_registration,omitempty"`
|
OpenRegistration bool `json:"open_registration" url:"open_registration,omitempty"`
|
||||||
EnableNSFW bool `json:"enable_nsfw,omitempty" url:"enable_nsfw,omitempty"`
|
EnableNSFW bool `json:"enable_nsfw" url:"enable_nsfw,omitempty"`
|
||||||
AdminOnlyCommunityCreation bool `json:"community_creation_admin_only,omitempty" url:"community_creation_admin_only,omitempty"`
|
AdminOnlyCommunityCreation bool `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"`
|
||||||
RequireEmailVerification bool `json:"require_email_verification,omitempty" url:"require_email_verification,omitempty"`
|
RequireEmailVerification bool `json:"require_email_verification" url:"require_email_verification,omitempty"`
|
||||||
RequireApplication bool `json:"require_application,omitempty" url:"require_application,omitempty"`
|
RequireApplication bool `json:"require_application" url:"require_application,omitempty"`
|
||||||
ApplicationQuestion Optional[string] `json:"application_question,omitempty" url:"application_question,omitempty"`
|
ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"`
|
||||||
PrivateInstance bool `json:"private_instance,omitempty" url:"private_instance,omitempty"`
|
PrivateInstance bool `json:"private_instance" url:"private_instance,omitempty"`
|
||||||
DefaultTheme string `json:"default_theme,omitempty" url:"default_theme,omitempty"`
|
DefaultTheme string `json:"default_theme" url:"default_theme,omitempty"`
|
||||||
DefaultPostListingType string `json:"default_post_listing_type,omitempty" url:"default_post_listing_type,omitempty"`
|
DefaultPostListingType string `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"`
|
||||||
LegalInformation Optional[string] `json:"legal_information,omitempty" url:"legal_information,omitempty"`
|
LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"`
|
||||||
HideModlogModNames bool `json:"hide_modlog_mod_names,omitempty" url:"hide_modlog_mod_names,omitempty"`
|
HideModlogModNames bool `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"`
|
||||||
ApplicationEmailAdmins bool `json:"application_email_admins,omitempty" url:"application_email_admins,omitempty"`
|
ApplicationEmailAdmins bool `json:"application_email_admins" url:"application_email_admins,omitempty"`
|
||||||
SlurFilterRegex Optional[string] `json:"slur_filter_regex,omitempty" url:"slur_filter_regex,omitempty"`
|
SlurFilterRegex Optional[string] `json:"slur_filter_regex" url:"slur_filter_regex,omitempty"`
|
||||||
ActorNameMaxLength int `json:"actor_name_max_length,omitempty" url:"actor_name_max_length,omitempty"`
|
ActorNameMaxLength int `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"`
|
||||||
FederationEnabled bool `json:"federation_enabled,omitempty" url:"federation_enabled,omitempty"`
|
FederationEnabled bool `json:"federation_enabled" url:"federation_enabled,omitempty"`
|
||||||
FederationDebug bool `json:"federation_debug,omitempty" url:"federation_debug,omitempty"`
|
FederationDebug bool `json:"federation_debug" url:"federation_debug,omitempty"`
|
||||||
FederationStrictAllowlist bool `json:"federation_strict_allowlist,omitempty" url:"federation_strict_allowlist,omitempty"`
|
FederationStrictAllowlist bool `json:"federation_strict_allowlist" url:"federation_strict_allowlist,omitempty"`
|
||||||
FederationRetryLimit int `json:"federation_http_fetch_retry_limit,omitempty" url:"federation_http_fetch_retry_limit,omitempty"`
|
FederationRetryLimit int `json:"federation_http_fetch_retry_limit" url:"federation_http_fetch_retry_limit,omitempty"`
|
||||||
FederationWorkerCount int `json:"federation_worker_count,omitempty" url:"federation_worker_count,omitempty"`
|
FederationWorkerCount int `json:"federation_worker_count" url:"federation_worker_count,omitempty"`
|
||||||
CaptchaEnabled bool `json:"captcha_enabled,omitempty" url:"captcha_enabled,omitempty"`
|
CaptchaEnabled bool `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
|
||||||
CaptchaDifficulty string `json:"captcha_difficulty,omitempty" url:"captcha_difficulty,omitempty"`
|
CaptchaDifficulty string `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LocalSiteRateLimit struct {
|
type LocalSiteRateLimit struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
LocalSiteID int `json:"local_site_id,omitempty" url:"local_site_id,omitempty"`
|
LocalSiteID int `json:"local_site_id" url:"local_site_id,omitempty"`
|
||||||
Message int `json:"message,omitempty" url:"message,omitempty"`
|
Message int `json:"message" url:"message,omitempty"`
|
||||||
MessagePerSecond int `json:"message_per_second,omitempty" url:"message_per_second,omitempty"`
|
MessagePerSecond int `json:"message_per_second" url:"message_per_second,omitempty"`
|
||||||
Post int `json:"post,omitempty" url:"post,omitempty"`
|
Post int `json:"post" url:"post,omitempty"`
|
||||||
PostPerSecond int `json:"post_per_second,omitempty" url:"post_per_second,omitempty"`
|
PostPerSecond int `json:"post_per_second" url:"post_per_second,omitempty"`
|
||||||
Register int `json:"register,omitempty" url:"register,omitempty"`
|
Register int `json:"register" url:"register,omitempty"`
|
||||||
RegisterPerSecond int `json:"register_per_second,omitempty" url:"register_per_second,omitempty"`
|
RegisterPerSecond int `json:"register_per_second" url:"register_per_second,omitempty"`
|
||||||
Image int `json:"image,omitempty" url:"image,omitempty"`
|
Image int `json:"image" url:"image,omitempty"`
|
||||||
ImagePerSecond int `json:"image_per_second,omitempty" url:"image_per_second,omitempty"`
|
ImagePerSecond int `json:"image_per_second" url:"image_per_second,omitempty"`
|
||||||
Comment int `json:"comment,omitempty" url:"comment,omitempty"`
|
Comment int `json:"comment" url:"comment,omitempty"`
|
||||||
CommentPerSecond int `json:"comment_per_second,omitempty" url:"comment_per_second,omitempty"`
|
CommentPerSecond int `json:"comment_per_second" url:"comment_per_second,omitempty"`
|
||||||
Search int `json:"search,omitempty" url:"search,omitempty"`
|
Search int `json:"search" url:"search,omitempty"`
|
||||||
SearchPerSecond int `json:"search_per_second,omitempty" url:"search_per_second,omitempty"`
|
SearchPerSecond int `json:"search_per_second" url:"search_per_second,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PrivateMessage struct {
|
type PrivateMessage struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
CreatorID int `json:"creator_id,omitempty" url:"creator_id,omitempty"`
|
CreatorID int `json:"creator_id" url:"creator_id,omitempty"`
|
||||||
RecipientID int `json:"recipient_id,omitempty" url:"recipient_id,omitempty"`
|
RecipientID int `json:"recipient_id" url:"recipient_id,omitempty"`
|
||||||
Content string `json:"content,omitempty" url:"content,omitempty"`
|
Content string `json:"content" url:"content,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
Read bool `json:"read,omitempty" url:"read,omitempty"`
|
Read bool `json:"read" url:"read,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
ApID string `json:"ap_id,omitempty" url:"ap_id,omitempty"`
|
ApID string `json:"ap_id" url:"ap_id,omitempty"`
|
||||||
Local bool `json:"local,omitempty" url:"local,omitempty"`
|
Local bool `json:"local" url:"local,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PostReport struct {
|
type PostReport struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
CreatorID int `json:"creator_id,omitempty" url:"creator_id,omitempty"`
|
CreatorID int `json:"creator_id" url:"creator_id,omitempty"`
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
OriginalPostName string `json:"original_post_name,omitempty" url:"original_post_name,omitempty"`
|
OriginalPostName string `json:"original_post_name" url:"original_post_name,omitempty"`
|
||||||
OriginalPostURL Optional[string] `json:"original_post_url,omitempty" url:"original_post_url,omitempty"`
|
OriginalPostURL Optional[string] `json:"original_post_url" url:"original_post_url,omitempty"`
|
||||||
OriginalPostBody Optional[string] `json:"original_post_body,omitempty" url:"original_post_body,omitempty"`
|
OriginalPostBody Optional[string] `json:"original_post_body" url:"original_post_body,omitempty"`
|
||||||
Reason string `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason string `json:"reason" url:"reason,omitempty"`
|
||||||
Resolved bool `json:"resolved,omitempty" url:"resolved,omitempty"`
|
Resolved bool `json:"resolved" url:"resolved,omitempty"`
|
||||||
ResolverID Optional[int] `json:"resolver_id,omitempty" url:"resolver_id,omitempty"`
|
ResolverID Optional[int] `json:"resolver_id" url:"resolver_id,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Post struct {
|
type Post struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
Name string `json:"name,omitempty" url:"name,omitempty"`
|
Name string `json:"name" url:"name,omitempty"`
|
||||||
URL Optional[string] `json:"url,omitempty" url:"url,omitempty"`
|
URL Optional[string] `json:"url" url:"url,omitempty"`
|
||||||
Body Optional[string] `json:"body,omitempty" url:"body,omitempty"`
|
Body Optional[string] `json:"body" url:"body,omitempty"`
|
||||||
CreatorID int `json:"creator_id,omitempty" url:"creator_id,omitempty"`
|
CreatorID int `json:"creator_id" url:"creator_id,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Removed bool `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed bool `json:"removed" url:"removed,omitempty"`
|
||||||
Locked bool `json:"locked,omitempty" url:"locked,omitempty"`
|
Locked bool `json:"locked" url:"locked,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
NSFW bool `json:"nsfw,omitempty" url:"nsfw,omitempty"`
|
NSFW bool `json:"nsfw" url:"nsfw,omitempty"`
|
||||||
Stickied bool `json:"stickied,omitempty" url:"stickied,omitempty"`
|
Stickied bool `json:"stickied" url:"stickied,omitempty"`
|
||||||
EmbedTitle Optional[string] `json:"embed_title,omitempty" url:"embed_title,omitempty"`
|
EmbedTitle Optional[string] `json:"embed_title" url:"embed_title,omitempty"`
|
||||||
EmbedDescription Optional[string] `json:"embed_description,omitempty" url:"embed_description,omitempty"`
|
EmbedDescription Optional[string] `json:"embed_description" url:"embed_description,omitempty"`
|
||||||
EmbedVideoURL Optional[string] `json:"embed_video_url,omitempty" url:"embed_video_url,omitempty"`
|
EmbedVideoURL Optional[string] `json:"embed_video_url" url:"embed_video_url,omitempty"`
|
||||||
ThumbnailURL Optional[string] `json:"thumbnail_url,omitempty" url:"thumbnail_url,omitempty"`
|
ThumbnailURL Optional[string] `json:"thumbnail_url" url:"thumbnail_url,omitempty"`
|
||||||
ApID string `json:"ap_id,omitempty" url:"ap_id,omitempty"`
|
ApID string `json:"ap_id" url:"ap_id,omitempty"`
|
||||||
Local bool `json:"local,omitempty" url:"local,omitempty"`
|
Local bool `json:"local" url:"local,omitempty"`
|
||||||
LanguageID int `json:"language_id,omitempty" url:"language_id,omitempty"`
|
LanguageID int `json:"language_id" url:"language_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PasswordResetRequest struct {
|
type PasswordResetRequest struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
LocalUserID int `json:"local_user_id,omitempty" url:"local_user_id,omitempty"`
|
LocalUserID int `json:"local_user_id" url:"local_user_id,omitempty"`
|
||||||
TokenEncrypted string `json:"token_encrypted,omitempty" url:"token_encrypted,omitempty"`
|
TokenEncrypted string `json:"token_encrypted" url:"token_encrypted,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModRemovePost struct {
|
type ModRemovePost struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Removed Optional[bool] `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed Optional[bool] `json:"removed" url:"removed,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModLockPost struct {
|
type ModLockPost struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Locked Optional[bool] `json:"locked,omitempty" url:"locked,omitempty"`
|
Locked Optional[bool] `json:"locked" url:"locked,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModStickyPost represents a post stickied by a moderator.
|
// ModStickyPost represents a post stickied by a moderator.
|
||||||
type ModStickyPost struct {
|
type ModStickyPost struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Stickied Optional[bool] `json:"stickied,omitempty" url:"stickied,omitempty"`
|
Stickied Optional[bool] `json:"stickied" url:"stickied,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModRemoveComment represents a comment removal by a moderator.
|
// ModRemoveComment represents a comment removal by a moderator.
|
||||||
type ModRemoveComment struct {
|
type ModRemoveComment struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Removed Optional[bool] `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed Optional[bool] `json:"removed" url:"removed,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModRemoveCommunity represents a community removal by a moderator.
|
// ModRemoveCommunity represents a community removal by a moderator.
|
||||||
type ModRemoveCommunity struct {
|
type ModRemoveCommunity struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Removed Optional[bool] `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed Optional[bool] `json:"removed" url:"removed,omitempty"`
|
||||||
Expires Optional[string] `json:"expires,omitempty" url:"expires,omitempty"`
|
Expires Optional[string] `json:"expires" url:"expires,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModBanFromCommunity represents a user being banned from a community by a moderator.
|
// ModBanFromCommunity represents a user being banned from a community by a moderator.
|
||||||
type ModBanFromCommunity struct {
|
type ModBanFromCommunity struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
OtherPersonID int `json:"other_person_id,omitempty" url:"other_person_id,omitempty"`
|
OtherPersonID int `json:"other_person_id" url:"other_person_id,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Banned Optional[bool] `json:"banned,omitempty" url:"banned,omitempty"`
|
Banned Optional[bool] `json:"banned" url:"banned,omitempty"`
|
||||||
Expires Optional[string] `json:"expires,omitempty" url:"expires,omitempty"`
|
Expires Optional[string] `json:"expires" url:"expires,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModBan represents a user being banned by a moderator.
|
// ModBan represents a user being banned by a moderator.
|
||||||
type ModBan struct {
|
type ModBan struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
OtherPersonID int `json:"other_person_id,omitempty" url:"other_person_id,omitempty"`
|
OtherPersonID int `json:"other_person_id" url:"other_person_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Banned Optional[bool] `json:"banned,omitempty" url:"banned,omitempty"`
|
Banned Optional[bool] `json:"banned" url:"banned,omitempty"`
|
||||||
Expires Optional[string] `json:"expires,omitempty" url:"expires,omitempty"`
|
Expires Optional[string] `json:"expires" url:"expires,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModAddCommunity represents a user being added as a moderator of a community.
|
// ModAddCommunity represents a user being added as a moderator of a community.
|
||||||
type ModAddCommunity struct {
|
type ModAddCommunity struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
OtherPersonID int `json:"other_person_id,omitempty" url:"other_person_id,omitempty"`
|
OtherPersonID int `json:"other_person_id" url:"other_person_id,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Removed Optional[bool] `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed Optional[bool] `json:"removed" url:"removed,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModTransferCommunity represents a community being transferred to another moderator.
|
// ModTransferCommunity represents a community being transferred to another moderator.
|
||||||
type ModTransferCommunity struct {
|
type ModTransferCommunity struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
OtherPersonID int `json:"other_person_id,omitempty" url:"other_person_id,omitempty"`
|
OtherPersonID int `json:"other_person_id" url:"other_person_id,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Removed Optional[bool] `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed Optional[bool] `json:"removed" url:"removed,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModAdd represents a user being added as a moderator.
|
// ModAdd represents a user being added as a moderator.
|
||||||
type ModAdd struct {
|
type ModAdd struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
OtherPersonID int `json:"other_person_id,omitempty" url:"other_person_id,omitempty"`
|
OtherPersonID int `json:"other_person_id" url:"other_person_id,omitempty"`
|
||||||
Removed Optional[bool] `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed Optional[bool] `json:"removed" url:"removed,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminPurgePerson struct {
|
type AdminPurgePerson struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
AdminPersonID int `json:"admin_person_id,omitempty" url:"admin_person_id,omitempty"`
|
AdminPersonID int `json:"admin_person_id" url:"admin_person_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminPurgeCommunity struct {
|
type AdminPurgeCommunity struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
AdminPersonID int `json:"admin_person_id,omitempty" url:"admin_person_id,omitempty"`
|
AdminPersonID int `json:"admin_person_id" url:"admin_person_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminPurgePost struct {
|
type AdminPurgePost struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
AdminPersonID int `json:"admin_person_id,omitempty" url:"admin_person_id,omitempty"`
|
AdminPersonID int `json:"admin_person_id" url:"admin_person_id,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminPurgeComment struct {
|
type AdminPurgeComment struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
AdminPersonID int `json:"admin_person_id,omitempty" url:"admin_person_id,omitempty"`
|
AdminPersonID int `json:"admin_person_id" url:"admin_person_id,omitempty"`
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
When string `json:"when_,omitempty" url:"when_,omitempty"`
|
When string `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommunitySafe struct {
|
type CommunitySafe struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
Name string `json:"name,omitempty" url:"name,omitempty"`
|
Name string `json:"name" url:"name,omitempty"`
|
||||||
Title string `json:"title,omitempty" url:"title,omitempty"`
|
Title string `json:"title" url:"title,omitempty"`
|
||||||
Description Optional[string] `json:"description,omitempty" url:"description,omitempty"`
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
||||||
Removed bool `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed bool `json:"removed" url:"removed,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
NSFW bool `json:"nsfw,omitempty" url:"nsfw,omitempty"`
|
NSFW bool `json:"nsfw" url:"nsfw,omitempty"`
|
||||||
ActorID string `json:"actor_id,omitempty" url:"actor_id,omitempty"`
|
ActorID string `json:"actor_id" url:"actor_id,omitempty"`
|
||||||
Local bool `json:"local,omitempty" url:"local,omitempty"`
|
Local bool `json:"local" url:"local,omitempty"`
|
||||||
Icon Optional[string] `json:"icon,omitempty" url:"icon,omitempty"`
|
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
|
||||||
Banner Optional[string] `json:"banner,omitempty" url:"banner,omitempty"`
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
||||||
Hidden bool `json:"hidden,omitempty" url:"hidden,omitempty"`
|
Hidden bool `json:"hidden" url:"hidden,omitempty"`
|
||||||
PostingRestrictedToMods bool `json:"posting_restricted_to_mods,omitempty" url:"posting_restricted_to_mods,omitempty"`
|
PostingRestrictedToMods bool `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"`
|
||||||
InstanceID int `json:"instance_id,omitempty" url:"instance_id,omitempty"`
|
InstanceID int `json:"instance_id" url:"instance_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentReport struct {
|
type CommentReport struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
CreatorID int `json:"creator_id,omitempty" url:"creator_id,omitempty"`
|
CreatorID int `json:"creator_id" url:"creator_id,omitempty"`
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
OriginalCommentText string `json:"original_comment_text,omitempty" url:"original_comment_text,omitempty"`
|
OriginalCommentText string `json:"original_comment_text" url:"original_comment_text,omitempty"`
|
||||||
Reason string `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason string `json:"reason" url:"reason,omitempty"`
|
||||||
Resolved bool `json:"resolved,omitempty" url:"resolved,omitempty"`
|
Resolved bool `json:"resolved" url:"resolved,omitempty"`
|
||||||
ResolverID Optional[int] `json:"resolver_id,omitempty" url:"resolver_id,omitempty"`
|
ResolverID Optional[int] `json:"resolver_id" url:"resolver_id,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Comment struct {
|
type Comment struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
CreatorID int `json:"creator_id,omitempty" url:"creator_id,omitempty"`
|
CreatorID int `json:"creator_id" url:"creator_id,omitempty"`
|
||||||
PostID int `json:"post_id,omitempty" url:"post_id,omitempty"`
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
Content string `json:"content,omitempty" url:"content,omitempty"`
|
Content string `json:"content" url:"content,omitempty"`
|
||||||
Removed bool `json:"removed,omitempty" url:"removed,omitempty"`
|
Removed bool `json:"removed" url:"removed,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
Deleted bool `json:"deleted,omitempty" url:"deleted,omitempty"`
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
||||||
APID string `json:"ap_id,omitempty" url:"ap_id,omitempty"`
|
APID string `json:"ap_id" url:"ap_id,omitempty"`
|
||||||
Local bool `json:"local,omitempty" url:"local,omitempty"`
|
Local bool `json:"local" url:"local,omitempty"`
|
||||||
Path string `json:"path,omitempty" url:"path,omitempty"`
|
Path string `json:"path" url:"path,omitempty"`
|
||||||
Distinguished bool `json:"distinguished,omitempty" url:"distinguished,omitempty"`
|
Distinguished bool `json:"distinguished" url:"distinguished,omitempty"`
|
||||||
LanguageID int `json:"language_id,omitempty" url:"language_id,omitempty"`
|
LanguageID int `json:"language_id" url:"language_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PersonMention struct {
|
type PersonMention struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
RecipientID int `json:"recipient_id,omitempty" url:"recipient_id,omitempty"`
|
RecipientID int `json:"recipient_id" url:"recipient_id,omitempty"`
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Read bool `json:"read,omitempty" url:"read,omitempty"`
|
Read bool `json:"read" url:"read,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Language struct {
|
type Language struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
Code string `json:"code,omitempty" url:"code,omitempty"`
|
Code string `json:"code" url:"code,omitempty"`
|
||||||
Name string `json:"name,omitempty" url:"name,omitempty"`
|
Name string `json:"name" url:"name,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PrivateMessageReport struct {
|
type PrivateMessageReport struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
CreatorID int `json:"creator_id,omitempty" url:"creator_id,omitempty"`
|
CreatorID int `json:"creator_id" url:"creator_id,omitempty"`
|
||||||
PrivateMessageID int `json:"private_message_id,omitempty" url:"private_message_id,omitempty"`
|
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
|
||||||
OriginalPMText string `json:"original_pm_text,omitempty" url:"original_pm_text,omitempty"`
|
OriginalPMText string `json:"original_pm_text" url:"original_pm_text,omitempty"`
|
||||||
Reason string `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason string `json:"reason" url:"reason,omitempty"`
|
||||||
Resolved bool `json:"resolved,omitempty" url:"resolved,omitempty"`
|
Resolved bool `json:"resolved" url:"resolved,omitempty"`
|
||||||
ResolverID Optional[int] `json:"resolver_id,omitempty" url:"resolver_id,omitempty"`
|
ResolverID Optional[int] `json:"resolver_id" url:"resolver_id,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RegistrationApplication struct {
|
type RegistrationApplication struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
LocalUserID int `json:"local_user_id,omitempty" url:"local_user_id,omitempty"`
|
LocalUserID int `json:"local_user_id" url:"local_user_id,omitempty"`
|
||||||
Answer string `json:"answer,omitempty" url:"answer,omitempty"`
|
Answer string `json:"answer" url:"answer,omitempty"`
|
||||||
AdminID Optional[int] `json:"admin_id,omitempty" url:"admin_id,omitempty"`
|
AdminID Optional[int] `json:"admin_id" url:"admin_id,omitempty"`
|
||||||
DenyReason Optional[string] `json:"deny_reason,omitempty" url:"deny_reason,omitempty"`
|
DenyReason Optional[string] `json:"deny_reason" url:"deny_reason,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModHideCommunityView struct {
|
type ModHideCommunityView struct {
|
||||||
ModHideCommunity ModHideCommunity `json:"mod_hide_community,omitempty" url:"mod_hide_community,omitempty"`
|
ModHideCommunity ModHideCommunity `json:"mod_hide_community" url:"mod_hide_community,omitempty"`
|
||||||
Admin Optional[PersonSafe] `json:"admin,omitempty" url:"admin,omitempty"`
|
Admin Optional[PersonSafe] `json:"admin" url:"admin,omitempty"`
|
||||||
Community CommunitySafe `json:"community,omitempty" url:"community,omitempty"`
|
Community CommunitySafe `json:"community" url:"community,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModHideCommunity struct {
|
type ModHideCommunity struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
CommunityID int `json:"community_id,omitempty" url:"community_id,omitempty"`
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
ModPersonID int `json:"mod_person_id,omitempty" url:"mod_person_id,omitempty"`
|
ModPersonID int `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
||||||
Reason Optional[string] `json:"reason,omitempty" url:"reason,omitempty"`
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
||||||
Hidden Optional[bool] `json:"hidden,omitempty" url:"hidden,omitempty"`
|
Hidden Optional[bool] `json:"hidden" url:"hidden,omitempty"`
|
||||||
When time.Time `json:"when_,omitempty" url:"when_,omitempty"`
|
When time.Time `json:"when_" url:"when_,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentReply struct {
|
type CommentReply struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
RecipientID int `json:"recipient_id,omitempty" url:"recipient_id,omitempty"`
|
RecipientID int `json:"recipient_id" url:"recipient_id,omitempty"`
|
||||||
CommentID int `json:"comment_id,omitempty" url:"comment_id,omitempty"`
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
||||||
Read bool `json:"read,omitempty" url:"read,omitempty"`
|
Read bool `json:"read" url:"read,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type LemmyResponse struct {
|
type LemmyResponse struct {
|
||||||
Error Optional[string] `json:"error,omitempty" url:"error,omitempty"`
|
Error Optional[string] `json:"error" url:"error,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type HTTPError struct {
|
type HTTPError struct {
|
||||||
|
308
types/views.go
308
types/views.go
@ -1,254 +1,254 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
type PersonViewSafe struct {
|
type PersonViewSafe struct {
|
||||||
Person PersonSafe `json:"person,omitempty" url:"person,omitempty"`
|
Person PersonSafe `json:"person" url:"person,omitempty"`
|
||||||
Counts PersonAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts PersonAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PersonMentionView struct {
|
type PersonMentionView struct {
|
||||||
PersonMention PersonMention `json:"person_mention,omitempty" url:"person_mention,omitempty"`
|
PersonMention PersonMention `json:"person_mention" url:"person_mention,omitempty"`
|
||||||
Comment Comment `json:"comment,omitempty" url:"comment,omitempty"`
|
Comment Comment `json:"comment" url:"comment,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
Recipient PersonSafe `json:"recipient,omitempty" url:"recipient,omitempty"`
|
Recipient PersonSafe `json:"recipient" url:"recipient,omitempty"`
|
||||||
Counts CommentAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts CommentAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
CreatorBannedFromCommunity bool `json:"creator_banned_from_community,omitempty" url:"creator_banned_from_community,omitempty"`
|
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
|
||||||
Subscribed bool `json:"subscribed,omitempty" url:"subscribed,omitempty"`
|
Subscribed bool `json:"subscribed" url:"subscribed,omitempty"`
|
||||||
Saved bool `json:"saved,omitempty" url:"saved,omitempty"`
|
Saved bool `json:"saved" url:"saved,omitempty"`
|
||||||
CreatorBlocked bool `json:"creator_blocked,omitempty" url:"creator_blocked,omitempty"`
|
CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"`
|
||||||
MyVote Optional[int] `json:"my_vote,omitempty" url:"my_vote,omitempty"`
|
MyVote Optional[int] `json:"my_vote" url:"my_vote,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LocalUserSettingsView struct {
|
type LocalUserSettingsView struct {
|
||||||
LocalUserSettings LocalUserSettings `json:"local_user_settings,omitempty" url:"local_user_settings,omitempty"`
|
LocalUserSettings LocalUserSettings `json:"local_user_settings" url:"local_user_settings,omitempty"`
|
||||||
Person PersonSafe `json:"person,omitempty" url:"person,omitempty"`
|
Person PersonSafe `json:"person" url:"person,omitempty"`
|
||||||
Counts PersonAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts PersonAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SiteView struct {
|
type SiteView struct {
|
||||||
Site Site `json:"site,omitempty" url:"site,omitempty"`
|
Site Site `json:"site" url:"site,omitempty"`
|
||||||
LocalSite LocalSite `json:"local_site,omitempty" url:"local_site,omitempty"`
|
LocalSite LocalSite `json:"local_site" url:"local_site,omitempty"`
|
||||||
LocalSiteRateLimit LocalSiteRateLimit `json:"local_site_rate_limit,omitempty" url:"local_site_rate_limit,omitempty"`
|
LocalSiteRateLimit LocalSiteRateLimit `json:"local_site_rate_limit" url:"local_site_rate_limit,omitempty"`
|
||||||
Taglines Optional[[]Tagline] `json:"taglines,omitempty" url:"taglines,omitempty"`
|
Taglines Optional[[]Tagline] `json:"taglines" url:"taglines,omitempty"`
|
||||||
Counts SiteAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts SiteAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PrivateMessageView struct {
|
type PrivateMessageView struct {
|
||||||
PrivateMessage PrivateMessage `json:"private_message,omitempty" url:"private_message,omitempty"`
|
PrivateMessage PrivateMessage `json:"private_message" url:"private_message,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
Recipient PersonSafe `json:"recipient,omitempty" url:"recipient,omitempty"`
|
Recipient PersonSafe `json:"recipient" url:"recipient,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PostView struct {
|
type PostView struct {
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
Community CommunitySafe `json:"community,omitempty" url:"community,omitempty"`
|
Community CommunitySafe `json:"community" url:"community,omitempty"`
|
||||||
CreatorBannedFromCommunity bool `json:"creator_banned_from_community,omitempty" url:"creator_banned_from_community,omitempty"`
|
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
|
||||||
Counts PostAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts PostAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
Subscribed bool `json:"subscribed,omitempty" url:"subscribed,omitempty"`
|
Subscribed bool `json:"subscribed" url:"subscribed,omitempty"`
|
||||||
Saved bool `json:"saved,omitempty" url:"saved,omitempty"`
|
Saved bool `json:"saved" url:"saved,omitempty"`
|
||||||
Read bool `json:"read,omitempty" url:"read,omitempty"`
|
Read bool `json:"read" url:"read,omitempty"`
|
||||||
CreatorBlocked bool `json:"creator_blocked,omitempty" url:"creator_blocked,omitempty"`
|
CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"`
|
||||||
MyVote Optional[int] `json:"my_vote,omitempty" url:"my_vote,omitempty"`
|
MyVote Optional[int] `json:"my_vote" url:"my_vote,omitempty"`
|
||||||
UnreadComments int `json:"unread_comments,omitempty" url:"unread_comments,omitempty"`
|
UnreadComments int `json:"unread_comments" url:"unread_comments,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PostReportView struct {
|
type PostReportView struct {
|
||||||
PostReport PostReport `json:"post_report,omitempty" url:"post_report,omitempty"`
|
PostReport PostReport `json:"post_report" url:"post_report,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
Community CommunitySafe `json:"community,omitempty" url:"community,omitempty"`
|
Community CommunitySafe `json:"community" url:"community,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
PostCreator PersonSafe `json:"post_creator,omitempty" url:"post_creator,omitempty"`
|
PostCreator PersonSafe `json:"post_creator" url:"post_creator,omitempty"`
|
||||||
CreatorBannedFromCommunity bool `json:"creator_banned_from_community,omitempty" url:"creator_banned_from_community,omitempty"`
|
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
|
||||||
MyVote Optional[int] `json:"my_vote,omitempty" url:"my_vote,omitempty"`
|
MyVote Optional[int] `json:"my_vote" url:"my_vote,omitempty"`
|
||||||
Counts PostAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts PostAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
Resolver Optional[PersonSafe] `json:"resolver,omitempty" url:"resolver,omitempty"`
|
Resolver Optional[PersonSafe] `json:"resolver" url:"resolver,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentView struct {
|
type CommentView struct {
|
||||||
Comment Comment `json:"comment,omitempty" url:"comment,omitempty"`
|
Comment Comment `json:"comment" url:"comment,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
Community CommunitySafe `json:"community,omitempty" url:"community,omitempty"`
|
Community CommunitySafe `json:"community" url:"community,omitempty"`
|
||||||
Counts CommentAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts CommentAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
CreatorBannedFromCommunity bool `json:"creator_banned_from_community,omitempty" url:"creator_banned_from_community,omitempty"`
|
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
|
||||||
Subscribed bool `json:"subscribed,omitempty" url:"subscribed,omitempty"`
|
Subscribed bool `json:"subscribed" url:"subscribed,omitempty"`
|
||||||
Saved bool `json:"saved,omitempty" url:"saved,omitempty"`
|
Saved bool `json:"saved" url:"saved,omitempty"`
|
||||||
CreatorBlocked bool `json:"creator_blocked,omitempty" url:"creator_blocked,omitempty"`
|
CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"`
|
||||||
MyVote Optional[int] `json:"my_vote,omitempty" url:"my_vote,omitempty"`
|
MyVote Optional[int] `json:"my_vote" url:"my_vote,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentReportView struct {
|
type CommentReportView struct {
|
||||||
CommentReport CommentReport `json:"comment_report,omitempty" url:"comment_report,omitempty"`
|
CommentReport CommentReport `json:"comment_report" url:"comment_report,omitempty"`
|
||||||
Comment Comment `json:"comment,omitempty" url:"comment,omitempty"`
|
Comment Comment `json:"comment" url:"comment,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
CommentCreator PersonSafe `json:"comment_creator,omitempty" url:"comment_creator,omitempty"`
|
CommentCreator PersonSafe `json:"comment_creator" url:"comment_creator,omitempty"`
|
||||||
Counts CommentAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts CommentAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
CreatorBannedFromCommunity bool `json:"creator_banned_from_community,omitempty" url:"creator_banned_from_community,omitempty"`
|
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
|
||||||
MyVote Optional[int] `json:"my_vote,omitempty" url:"my_vote,omitempty"`
|
MyVote Optional[int] `json:"my_vote" url:"my_vote,omitempty"`
|
||||||
Resolver Optional[PersonSafe] `json:"resolver,omitempty" url:"resolver,omitempty"`
|
Resolver Optional[PersonSafe] `json:"resolver" url:"resolver,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModAddCommunityView struct {
|
type ModAddCommunityView struct {
|
||||||
ModAddCommunity ModAddCommunity `json:"mod_add_community,omitempty" url:"mod_add_community,omitempty"`
|
ModAddCommunity ModAddCommunity `json:"mod_add_community" url:"mod_add_community,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
ModdedPerson PersonSafe `json:"modded_person,omitempty" url:"modded_person,omitempty"`
|
ModdedPerson PersonSafe `json:"modded_person" url:"modded_person,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModTransferCommunityView struct {
|
type ModTransferCommunityView struct {
|
||||||
ModTransferCommunity ModTransferCommunity `json:"mod_transfer_community,omitempty" url:"mod_transfer_community,omitempty"`
|
ModTransferCommunity ModTransferCommunity `json:"mod_transfer_community" url:"mod_transfer_community,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
ModdedPerson PersonSafe `json:"modded_person,omitempty" url:"modded_person,omitempty"`
|
ModdedPerson PersonSafe `json:"modded_person" url:"modded_person,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModAddView struct {
|
type ModAddView struct {
|
||||||
ModAdd ModAdd `json:"mod_add,omitempty" url:"mod_add,omitempty"`
|
ModAdd ModAdd `json:"mod_add" url:"mod_add,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
ModdedPerson PersonSafe `json:"modded_person,omitempty" url:"modded_person,omitempty"`
|
ModdedPerson PersonSafe `json:"modded_person" url:"modded_person,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModBanFromCommunityView struct {
|
type ModBanFromCommunityView struct {
|
||||||
ModBanFromCommunity ModBanFromCommunity `json:"mod_ban_from_community,omitempty" url:"mod_ban_from_community,omitempty"`
|
ModBanFromCommunity ModBanFromCommunity `json:"mod_ban_from_community" url:"mod_ban_from_community,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
BannedPerson PersonSafe `json:"banned_person,omitempty" url:"banned_person,omitempty"`
|
BannedPerson PersonSafe `json:"banned_person" url:"banned_person,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModBanView struct {
|
type ModBanView struct {
|
||||||
ModBan ModBan `json:"mod_ban,omitempty" url:"mod_ban,omitempty"`
|
ModBan ModBan `json:"mod_ban" url:"mod_ban,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
BannedPerson PersonSafe `json:"banned_person,omitempty" url:"banned_person,omitempty"`
|
BannedPerson PersonSafe `json:"banned_person" url:"banned_person,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModLockPostView struct {
|
type ModLockPostView struct {
|
||||||
ModLockPost ModLockPost `json:"mod_lock_post,omitempty" url:"mod_lock_post,omitempty"`
|
ModLockPost ModLockPost `json:"mod_lock_post" url:"mod_lock_post,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModRemoveCommentView struct {
|
type ModRemoveCommentView struct {
|
||||||
ModRemoveComment ModRemoveComment `json:"mod_remove_comment,omitempty" url:"mod_remove_comment,omitempty"`
|
ModRemoveComment ModRemoveComment `json:"mod_remove_comment" url:"mod_remove_comment,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
Comment Comment `json:"comment,omitempty" url:"comment,omitempty"`
|
Comment Comment `json:"comment" url:"comment,omitempty"`
|
||||||
Commenter PersonSafe `json:"commenter,omitempty" url:"commenter,omitempty"`
|
Commenter PersonSafe `json:"commenter" url:"commenter,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModRemoveCommunityView struct {
|
type ModRemoveCommunityView struct {
|
||||||
ModRemoveCommunity ModRemoveCommunity `json:"mod_remove_community,omitempty" url:"mod_remove_community,omitempty"`
|
ModRemoveCommunity ModRemoveCommunity `json:"mod_remove_community" url:"mod_remove_community,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModRemovePostView struct {
|
type ModRemovePostView struct {
|
||||||
ModRemovePost ModRemovePost `json:"mod_remove_post,omitempty" url:"mod_remove_post,omitempty"`
|
ModRemovePost ModRemovePost `json:"mod_remove_post" url:"mod_remove_post,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModStickyPostView struct {
|
type ModStickyPostView struct {
|
||||||
ModStickyPost ModStickyPost `json:"mod_sticky_post,omitempty" url:"mod_sticky_post,omitempty"`
|
ModStickyPost ModStickyPost `json:"mod_sticky_post" url:"mod_sticky_post,omitempty"`
|
||||||
Moderator Optional[PersonSafe] `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator Optional[PersonSafe] `json:"moderator" url:"moderator,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminPurgeCommunityView struct {
|
type AdminPurgeCommunityView struct {
|
||||||
AdminPurgeCommunity AdminPurgeCommunity `json:"admin_purge_community,omitempty" url:"admin_purge_community,omitempty"`
|
AdminPurgeCommunity AdminPurgeCommunity `json:"admin_purge_community" url:"admin_purge_community,omitempty"`
|
||||||
Admin Optional[PersonSafe] `json:"admin,omitempty" url:"admin,omitempty"`
|
Admin Optional[PersonSafe] `json:"admin" url:"admin,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminPurgePersonView struct {
|
type AdminPurgePersonView struct {
|
||||||
AdminPurgePerson AdminPurgePerson `json:"admin_purge_person,omitempty" url:"admin_purge_person,omitempty"`
|
AdminPurgePerson AdminPurgePerson `json:"admin_purge_person" url:"admin_purge_person,omitempty"`
|
||||||
Admin Optional[PersonSafe] `json:"admin,omitempty" url:"admin,omitempty"`
|
Admin Optional[PersonSafe] `json:"admin" url:"admin,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminPurgePostView struct {
|
type AdminPurgePostView struct {
|
||||||
AdminPurgePost AdminPurgePost `json:"admin_purge_post,omitempty" url:"admin_purge_post,omitempty"`
|
AdminPurgePost AdminPurgePost `json:"admin_purge_post" url:"admin_purge_post,omitempty"`
|
||||||
Admin Optional[PersonSafe] `json:"admin,omitempty" url:"admin,omitempty"`
|
Admin Optional[PersonSafe] `json:"admin" url:"admin,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdminPurgeCommentView struct {
|
type AdminPurgeCommentView struct {
|
||||||
AdminPurgeComment AdminPurgeComment `json:"admin_purge_comment,omitempty" url:"admin_purge_comment,omitempty"`
|
AdminPurgeComment AdminPurgeComment `json:"admin_purge_comment" url:"admin_purge_comment,omitempty"`
|
||||||
Admin Optional[PersonSafe] `json:"admin,omitempty" url:"admin,omitempty"`
|
Admin Optional[PersonSafe] `json:"admin" url:"admin,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommunityFollowerView struct {
|
type CommunityFollowerView struct {
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
Follower PersonSafe `json:"follower,omitempty" url:"follower,omitempty"`
|
Follower PersonSafe `json:"follower" url:"follower,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommunityBlockView struct {
|
type CommunityBlockView struct {
|
||||||
PersonSafe PersonSafe `json:"person_safe,omitempty" url:"person_safe,omitempty"`
|
PersonSafe PersonSafe `json:"person_safe" url:"person_safe,omitempty"`
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommunityModeratorView struct {
|
type CommunityModeratorView struct {
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
Moderator PersonSafe `json:"moderator,omitempty" url:"moderator,omitempty"`
|
Moderator PersonSafe `json:"moderator" url:"moderator,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommunityPersonBanView struct {
|
type CommunityPersonBanView struct {
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
Person PersonSafe `json:"person,omitempty" url:"person,omitempty"`
|
Person PersonSafe `json:"person" url:"person,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PersonBlockView struct {
|
type PersonBlockView struct {
|
||||||
PersonSafe PersonSafe `json:"person_safe,omitempty" url:"person_safe,omitempty"`
|
PersonSafe PersonSafe `json:"person_safe" url:"person_safe,omitempty"`
|
||||||
Target PersonSafe `json:"target,omitempty" url:"target,omitempty"`
|
Target PersonSafe `json:"target" url:"target,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommunityView struct {
|
type CommunityView struct {
|
||||||
CommunitySafe CommunitySafe `json:"community_safe,omitempty" url:"community_safe,omitempty"`
|
CommunitySafe CommunitySafe `json:"community_safe" url:"community_safe,omitempty"`
|
||||||
Subscribed bool `json:"subscribed,omitempty" url:"subscribed,omitempty"`
|
Subscribed bool `json:"subscribed" url:"subscribed,omitempty"`
|
||||||
Blocked bool `json:"blocked,omitempty" url:"blocked,omitempty"`
|
Blocked bool `json:"blocked" url:"blocked,omitempty"`
|
||||||
Counts CommunityAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts CommunityAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RegistrationApplicationView struct {
|
type RegistrationApplicationView struct {
|
||||||
RegistrationApplication RegistrationApplication `json:"registration_application,omitempty" url:"registration_application,omitempty"`
|
RegistrationApplication RegistrationApplication `json:"registration_application" url:"registration_application,omitempty"`
|
||||||
CreatorLocalUser LocalUserSettings `json:"creator_local_user,omitempty" url:"creator_local_user,omitempty"`
|
CreatorLocalUser LocalUserSettings `json:"creator_local_user" url:"creator_local_user,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
Admin Optional[PersonSafe] `json:"admin,omitempty" url:"admin,omitempty"`
|
Admin Optional[PersonSafe] `json:"admin" url:"admin,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PrivateMessageReportView struct {
|
type PrivateMessageReportView struct {
|
||||||
PrivateMessageReport PrivateMessageReport `json:"private_message_report,omitempty" url:"private_message_report,omitempty"`
|
PrivateMessageReport PrivateMessageReport `json:"private_message_report" url:"private_message_report,omitempty"`
|
||||||
PrivateMessage PrivateMessage `json:"private_message,omitempty" url:"private_message,omitempty"`
|
PrivateMessage PrivateMessage `json:"private_message" url:"private_message,omitempty"`
|
||||||
PrivateMessageCreator PersonSafe `json:"private_message_creator,omitempty" url:"private_message_creator,omitempty"`
|
PrivateMessageCreator PersonSafe `json:"private_message_creator" url:"private_message_creator,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
Resolver Optional[PersonSafe] `json:"resolver,omitempty" url:"resolver,omitempty"`
|
Resolver Optional[PersonSafe] `json:"resolver" url:"resolver,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Tagline struct {
|
type Tagline struct {
|
||||||
ID int `json:"id,omitempty" url:"id,omitempty"`
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
LocalSiteID int `json:"local_site_id,omitempty" url:"local_site_id,omitempty"`
|
LocalSiteID int `json:"local_site_id" url:"local_site_id,omitempty"`
|
||||||
Content string `json:"content,omitempty" url:"content,omitempty"`
|
Content string `json:"content" url:"content,omitempty"`
|
||||||
Published string `json:"published,omitempty" url:"published,omitempty"`
|
Published string `json:"published" url:"published,omitempty"`
|
||||||
Updated Optional[string] `json:"updated,omitempty" url:"updated,omitempty"`
|
Updated Optional[string] `json:"updated" url:"updated,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentReplyView struct {
|
type CommentReplyView struct {
|
||||||
CommentReply CommentReply `json:"comment_reply,omitempty" url:"comment_reply,omitempty"`
|
CommentReply CommentReply `json:"comment_reply" url:"comment_reply,omitempty"`
|
||||||
Comment Comment `json:"comment,omitempty" url:"comment,omitempty"`
|
Comment Comment `json:"comment" url:"comment,omitempty"`
|
||||||
Creator PersonSafe `json:"creator,omitempty" url:"creator,omitempty"`
|
Creator PersonSafe `json:"creator" url:"creator,omitempty"`
|
||||||
Post Post `json:"post,omitempty" url:"post,omitempty"`
|
Post Post `json:"post" url:"post,omitempty"`
|
||||||
Community CommunitySafe `json:"community,omitempty" url:"community,omitempty"`
|
Community CommunitySafe `json:"community" url:"community,omitempty"`
|
||||||
Recipient PersonSafe `json:"recipient,omitempty" url:"recipient,omitempty"`
|
Recipient PersonSafe `json:"recipient" url:"recipient,omitempty"`
|
||||||
Counts CommentAggregates `json:"counts,omitempty" url:"counts,omitempty"`
|
Counts CommentAggregates `json:"counts" url:"counts,omitempty"`
|
||||||
CreatorBannedFromCommunity bool `json:"creator_banned_from_community,omitempty" url:"creator_banned_from_community,omitempty"`
|
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
|
||||||
Subscribed bool `json:"subscribed,omitempty" url:"subscribed,omitempty"`
|
Subscribed bool `json:"subscribed" url:"subscribed,omitempty"`
|
||||||
Saved bool `json:"saved,omitempty" url:"saved,omitempty"`
|
Saved bool `json:"saved" url:"saved,omitempty"`
|
||||||
CreatorBlocked bool `json:"creator_blocked,omitempty" url:"creator_blocked,omitempty"`
|
CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"`
|
||||||
MyVote Optional[int] `json:"my_vote,omitempty" url:"my_vote,omitempty"`
|
MyVote Optional[int] `json:"my_vote" url:"my_vote,omitempty"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user