mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-06 03:48:45 +00:00
Add an option to hide unsupported notifications
This commit is contained in:
parent
1c8c661abb
commit
db29c3d874
5 changed files with 60 additions and 37 deletions
|
@ -23,9 +23,12 @@ type Notification struct {
|
|||
}
|
||||
|
||||
// GetNotifications return notifications.
|
||||
func (c *Client) GetNotifications(ctx context.Context, pg *Pagination, excludes []string) ([]*Notification, error) {
|
||||
func (c *Client) GetNotifications(ctx context.Context, pg *Pagination, includes, excludes []string) ([]*Notification, error) {
|
||||
var notifications []*Notification
|
||||
params := url.Values{}
|
||||
for _, include := range includes {
|
||||
params.Add("include_types[]", include)
|
||||
}
|
||||
for _, exclude := range excludes {
|
||||
params.Add("exclude_types[]", exclude)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue