ref: f02f6adb3fbd547fb52e13b86925469bae0c6a2a
dir: /notifications.go/
package main
import (
"context"
"github.com/mattn/go-mastodon"
)
func (hc *Hellclient) GetUnreadNotifications() (notifications []*mastodon.Notification, err error) {
markers, err := hc.client.GetTimelineMarkers(context.Background(), []string{"notifications"})
if err != nil {
return
}
LastID := markers["notifications"].LastID
page := &mastodon.Pagination {SinceID: LastID}
notifications, err = hc.client.GetNotificationsExclude(context.Background(), nil, page)
return
}
func (hc *Hellclient) PrintNotifications(notifications []*mastodon.Notification) {
for _, notification := range notifications {
PrintObjectProperties(notification, hc.debugMap)
}
return
}