A fork of https://github.com/teal-fm/piper
at main 55 lines 2.7 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package bsky 4 5// schema: app.bsky.notification.listNotifications 6 7import ( 8 "context" 9 10 comatprototypes "github.com/bluesky-social/indigo/api/atproto" 11 "github.com/bluesky-social/indigo/lex/util" 12 "github.com/bluesky-social/indigo/xrpc" 13) 14 15// NotificationListNotifications_Notification is a "notification" in the app.bsky.notification.listNotifications schema. 16type NotificationListNotifications_Notification struct { 17 Author *ActorDefs_ProfileView `json:"author" cborgen:"author"` 18 Cid string `json:"cid" cborgen:"cid"` 19 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 20 IsRead bool `json:"isRead" cborgen:"isRead"` 21 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 22 // reason: Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', 'starterpack-joined', 'verified', and 'unverified'. 23 Reason string `json:"reason" cborgen:"reason"` 24 ReasonSubject *string `json:"reasonSubject,omitempty" cborgen:"reasonSubject,omitempty"` 25 Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 26 Uri string `json:"uri" cborgen:"uri"` 27} 28 29// NotificationListNotifications_Output is the output of a app.bsky.notification.listNotifications call. 30type NotificationListNotifications_Output struct { 31 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 32 Notifications []*NotificationListNotifications_Notification `json:"notifications" cborgen:"notifications"` 33 Priority *bool `json:"priority,omitempty" cborgen:"priority,omitempty"` 34 SeenAt *string `json:"seenAt,omitempty" cborgen:"seenAt,omitempty"` 35} 36 37// NotificationListNotifications calls the XRPC method "app.bsky.notification.listNotifications". 38// 39// reasons: Notification reasons to include in response. 40func NotificationListNotifications(ctx context.Context, c *xrpc.Client, cursor string, limit int64, priority bool, reasons []string, seenAt string) (*NotificationListNotifications_Output, error) { 41 var out NotificationListNotifications_Output 42 43 params := map[string]interface{}{ 44 "cursor": cursor, 45 "limit": limit, 46 "priority": priority, 47 "reasons": reasons, 48 "seenAt": seenAt, 49 } 50 if err := c.Do(ctx, xrpc.Query, "", "app.bsky.notification.listNotifications", params, nil, &out); err != nil { 51 return nil, err 52 } 53 54 return &out, nil 55}