Monorepo for Tangled tangled.org
1

Configure Feed

Select the types of activity you want to include in your feed.

core / api / tangled / feedlistReactions.go
1.6 kB 55 lines
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package tangled 4 5// schema: sh.tangled.feed.listReactions 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13const ( 14 FeedListReactionsNSID = "sh.tangled.feed.listReactions" 15) 16 17// FeedListReactions_ListItem is a "listItem" in the sh.tangled.feed.listReactions schema. 18type FeedListReactions_ListItem struct { 19 Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 20 Uri string `json:"uri" cborgen:"uri"` 21 // value: Embedded sh.tangled.feed.reaction record 22 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 23} 24 25// FeedListReactions_Output is the output of a sh.tangled.feed.listReactions call. 26type FeedListReactions_Output struct { 27 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 28 Items []*FeedListReactions_ListItem `json:"items" cborgen:"items"` 29} 30 31// FeedListReactions calls the XRPC method "sh.tangled.feed.listReactions". 32// 33// cursor: Pagination cursor 34// order: Sort direction by createdAt. 35// subject: Record AT-URI the reactions target. 36func FeedListReactions(ctx context.Context, c util.LexClient, cursor string, limit int64, order string, subject string) (*FeedListReactions_Output, error) { 37 var out FeedListReactions_Output 38 39 params := map[string]interface{}{} 40 if cursor != "" { 41 params["cursor"] = cursor 42 } 43 if limit != 0 { 44 params["limit"] = limit 45 } 46 if order != "" { 47 params["order"] = order 48 } 49 params["subject"] = subject 50 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.feed.listReactions", params, nil, &out); err != nil { 51 return nil, err 52 } 53 54 return &out, nil 55}