Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanRemoteRequest ¶
type CleanRemoteRequest struct{}
CleanRemoteRequest represents a CleanRemote request.
func (CleanRemoteRequest) Validate ¶
func (r CleanRemoteRequest) Validate() error
Validate the request.
type FilesRequest ¶
type FilesRequest struct { Limit uint `json:"limit,omitempty"` SinceID string `json:"sinceId,omitempty"` UntilID string `json:"untilId,omitempty"` Type core.String `json:"type,omitempty"` Origin models.UserOrigin `json:"origin,omitempty"` Hostname core.String `json:"hostname,omitempty"` }
FilesRequest represents a Files 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) Clean ¶
Clean local drive.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN"))) err := client.Admin().Drive().Clean() if err != nil { log.Printf("[Admin/Drive/Clean] %s", err) return }
Output:
func (*Service) CleanRemote ¶
CleanRemote drive.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN"))) err := client.Admin().Drive().CleanRemote() if err != nil { log.Printf("[Admin/Drive/CleanRemote] %s", err) return }
Output:
func (*Service) Files ¶
func (s *Service) Files(request FilesRequest) ([]models.File, error)
Files lists all emojies.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN"))) response, err := client.Admin().Drive().Files(drive.FilesRequest{}) if err != nil { log.Printf("[Admin/Drive/Files] %s", err) return } for _, item := range response { log.Printf("[Admin/Drive/Files] %s", item.URL) }
Output:
func (*Service) Show ¶
func (s *Service) Show(request ShowRequest) (models.File, error)
Show a file.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN"))) response, err := client.Admin().Drive().Show(drive.ShowRequest{}) if err != nil { log.Printf("[Admin/Drive/Show] %s", err) return } log.Printf("[Admin/Drive/Show] %s", response.URL)
Output:
type ShowRequest ¶
type ShowRequest struct { FileID string `json:"fileId,omitempty"` URL string `json:"url,omitempty"` }
ShowRequest represents a Show request.
Click to show internal directories.
Click to hide internal directories.