Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { Body string `json:"body"` Header core.String `json:"header"` Icon core.String `json:"icon"` }
CreateRequest represents an Create request.
type MarkAllAsReadRequest ¶
type MarkAllAsReadRequest struct{}
MarkAllAsReadRequest represents an MarkAllAsRead request.
func (MarkAllAsReadRequest) Validate ¶
func (r MarkAllAsReadRequest) 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) Create ¶
func (s *Service) Create(request CreateRequest) error
Create endpoint.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN"))) err := client.Notifications().Create(notifications.CreateRequest{ Header: core.NewString("Thi is the header"), Body: "Example notification", }) if err != nil { log.Printf("[Notifications] Error happened: %s", err) return }
Output:
func (*Service) MarkAllAsRead ¶
MarkAllAsRead endpoint.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN"))) err := client.Notifications().MarkAllAsRead() if err != nil { log.Printf("[Notifications] Error happened: %s", err) return }
Output:
Click to show internal directories.
Click to hide internal directories.