Monorepo for Tangled
tangled.org
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.label.listOpsBy
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 LabelListOpsByNSID = "sh.tangled.label.listOpsBy"
15)
16
17// LabelListOpsBy_Output is the output of a sh.tangled.label.listOpsBy call.
18type LabelListOpsBy_Output struct {
19 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
20 Items []*LabelListOps_ListItem `json:"items" cborgen:"items"`
21}
22
23// LabelListOpsBy calls the XRPC method "sh.tangled.label.listOpsBy".
24//
25// cursor: Pagination cursor
26// order: Sort direction by createdAt.
27// subject: Actor DID whose label-op authorings to list.
28func LabelListOpsBy(ctx context.Context, c util.LexClient, cursor string, limit int64, order string, subject string) (*LabelListOpsBy_Output, error) {
29 var out LabelListOpsBy_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.label.listOpsBy", params, nil, &out); err != nil {
43 return nil, err
44 }
45
46 return &out, nil
47}