fork of indigo with slightly nicer lexgen
at main 971 B view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package bsky 4 5// schema: app.bsky.notification.getUnreadCount 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13// NotificationGetUnreadCount_Output is the output of a app.bsky.notification.getUnreadCount call. 14type NotificationGetUnreadCount_Output struct { 15 Count int64 `json:"count" cborgen:"count"` 16} 17 18// NotificationGetUnreadCount calls the XRPC method "app.bsky.notification.getUnreadCount". 19func NotificationGetUnreadCount(ctx context.Context, c util.LexClient, priority bool, seenAt string) (*NotificationGetUnreadCount_Output, error) { 20 var out NotificationGetUnreadCount_Output 21 22 params := map[string]interface{}{} 23 if priority { 24 params["priority"] = priority 25 } 26 if seenAt != "" { 27 params["seenAt"] = seenAt 28 } 29 if err := c.LexDo(ctx, util.Query, "", "app.bsky.notification.getUnreadCount", params, nil, &out); err != nil { 30 return nil, err 31 } 32 33 return &out, nil 34}