forked from
tangled.org/core
Monorepo for Tangled
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.feed.listReactionsBy
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 FeedListReactionsByNSID = "sh.tangled.feed.listReactionsBy"
15)
16
17// FeedListReactionsBy_Output is the output of a sh.tangled.feed.listReactionsBy call.
18type FeedListReactionsBy_Output struct {
19 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
20 Items []*FeedListReactions_ListItem `json:"items" cborgen:"items"`
21}
22
23// FeedListReactionsBy calls the XRPC method "sh.tangled.feed.listReactionsBy".
24//
25// cursor: Pagination cursor
26// order: Sort direction by createdAt.
27// subject: Actor DID whose reaction authorings to list.
28func FeedListReactionsBy(ctx context.Context, c util.LexClient, cursor string, limit int64, order string, subject string) (*FeedListReactionsBy_Output, error) {
29 var out FeedListReactionsBy_Output
30
31 params := map[string]interface{}{}
32 if cursor != "" {
33 params["cursor"] = cursor
34 }
35 if limit != 0 {
36 params["limit"] = limit
37 }
38 if order != "" {
39 params["order"] = order
40 }
41 params["subject"] = subject
42 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.feed.listReactionsBy", params, nil, &out); err != nil {
43 return nil, err
44 }
45
46 return &out, nil
47}