mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 00:27:29 -06:00
[feature] Implement types[] param for notifications (#3009)
Counterpart of exclude_types[]. Also updates Swagger spec for types[] to use the correct param name and enumerate possible values. Fixes #3003
This commit is contained in:
parent
7ab404d643
commit
b08c1bd0cb
10 changed files with 459 additions and 13 deletions
|
|
@ -25,12 +25,13 @@ import (
|
|||
|
||||
// Notification contains functions for creating and getting notifications.
|
||||
type Notification interface {
|
||||
// GetNotifications returns a slice of notifications that pertain to the given accountID.
|
||||
// GetAccountNotifications returns a slice of notifications that pertain to the given accountID.
|
||||
//
|
||||
// Returned notifications will be ordered ID descending (ie., highest/newest to lowest/oldest).
|
||||
GetAccountNotifications(ctx context.Context, accountID string, maxID string, sinceID string, minID string, limit int, excludeTypes []string) ([]*gtsmodel.Notification, error)
|
||||
// If includeTypes is empty, *all* notification types will be included.
|
||||
GetAccountNotifications(ctx context.Context, accountID string, maxID string, sinceID string, minID string, limit int, includeTypes []string, excludeTypes []string) ([]*gtsmodel.Notification, error)
|
||||
|
||||
// GetNotification returns one notification according to its id.
|
||||
// GetNotificationByID returns one notification according to its id.
|
||||
GetNotificationByID(ctx context.Context, id string) (*gtsmodel.Notification, error)
|
||||
|
||||
// GetNotificationsByIDs returns a slice of notifications of the the provided IDs.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue