Documentation
¶
Index ¶
Examples ¶
Constants ¶
View Source
const ( // AllState for all reports. AllState ReportState = "" // ResolvedState for resolved reports. ResolvedState ReportState = "resolved" // UnresolvedState for unresolved reports. UnresolvedState ReportState = "unresolved" // OriginCombined for local and remote users. OriginCombined UserOrigin = "combined" // OriginLocal for only local users. OriginLocal UserOrigin = "local" // OriginRemote for only remote users. OriginRemote UserOrigin = "remote" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResolveReportRequest ¶
type ResolveReportRequest struct {
ID string `json:"reportId"`
}
ResolveReportRequest represents an ResolveReport Announcement request.
func (ResolveReportRequest) Validate ¶
func (r ResolveReportRequest) Validate() error
Validate the request.
type Service ¶
type Service struct {
Call core.RequestHandlerFunc
}
Service is the base for all the endpoints on this service.
func NewService ¶
func NewService(requestHandler core.RequestHandlerFunc) *Service
NewService creates a new Service instance.
func (*Service) ResolveReport ¶
ResolveReport lists all announcements.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN")))
err := client.Admin().Moderation().ResolveReport("8evj2lmh10")
if err != nil {
log.Printf("[Admin/Moderation] %s", err)
return
}
func (*Service) UserReports ¶
func (s *Service) UserReports(request UserReportsRequest) ([]models.Report, error)
UserReports lists all announcements.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN")))
response, err := client.Admin().Moderation().UserReports(moderation.UserReportsRequest{})
if err != nil {
log.Printf("[Admin/Moderation] %s", err)
return
}
for _, item := range response {
log.Printf("[Admin/Moderation] %s", item.Comment)
}
type UserReportsRequest ¶
type UserReportsRequest struct {
Limit uint `json:"limit,omitempty"`
SinceID string `json:"sinceId,omitempty"`
UntilID string `json:"untilId,omitempty"`
State ReportState `json:"state,omitempty"`
ReporterOrigin UserOrigin `json:"reporterOrigin,omitempty"`
TargetUserOrigin UserOrigin `json:"targetUserOrigin,omitempty"`
}
UserReportsRequest represents an UserReports Announcement request.
func (UserReportsRequest) Validate ¶
func (r UserReportsRequest) Validate() error
Validate the request.
Click to show internal directories.
Click to hide internal directories.