Documentation
¶
Index ¶
Examples ¶
Constants ¶
View Source
const (
// MaximumNameLength is the maximum length of the name of the clip.
MaximumNameLength = 100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Permission []permissions.Permission `json:"permission"`
CallbackURL core.String `json:"callbackUrl,omitempty"`
}
CreateRequest represents a Create 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) Create ¶
func (s *Service) Create(request CreateRequest) (models.App, error)
Create clip.
Example ¶
client, _ := misskey.NewClientWithOptions(
misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN")),
)
resp, err := client.App().Create(app.CreateRequest{
Name: "test app",
Description: "my test app",
Permission: []permissions.Permission{
permissions.Write(permissions.Account),
permissions.Read(permissions.Account),
},
})
if err != nil {
log.Printf("[Apps/Create] %s", err)
return
}
log.Printf("[Apps/Create] %s created", resp.Name)
func (*Service) Show ¶
Show app.
Example ¶
client, _ := misskey.NewClientWithOptions(
misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN")),
)
resp, err := client.App().Show("8y7eu4z91l")
if err != nil {
log.Printf("[App/Show] %s", err)
return
}
log.Printf("[App/Show] %s", resp.Name)
type ShowRequest ¶
type ShowRequest struct {
AppID string `json:"appId"`
}
ShowRequest represents an Show request.
Click to show internal directories.
Click to hide internal directories.