Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
CreateRequest represents an /reactions request.
type DeleteRequest ¶
type DeleteRequest struct {
NoteID string `json:"noteId"`
}
DeleteRequest represents an /reactions 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.Notes().Reactions().Create(reactions.CreateRequest{ NoteID: "8dsk7x47y3", Reaction: "👋", }) if err != nil { log.Printf("[Notes/Reaction/Create] %s", err) return }
Output:
func (*Service) Delete ¶
Delete endpoint.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN"))) err := client.Notes().Reactions().Delete("8dsk7x47y3") if err != nil { log.Printf("[Notes/Reaction/Delete] %s", err) return }
Output:
func (*Service) Show ¶
func (s *Service) Show(request ShowRequest) ([]models.Reaction, error)
Show endpoint.
Example ¶
client, _ := misskey.NewClientWithOptions(misskey.WithSimpleConfig("https://slippy.xyz", os.Getenv("MISSKEY_TOKEN"))) reactions, err := client.Notes().Reactions().Show(reactions.ShowRequest{ NoteID: "8dsk7x47y3", Limit: 10, }) if err != nil { log.Printf("[Notes/Show] %s", err) return } for _, reaction := range reactions { log.Printf("[Notes/Show] <%s> %s", reaction.User.Username, reaction.Type) }
Output:
Click to show internal directories.
Click to hide internal directories.