A fork of https://github.com/teal-fm/piper
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package atproto
4
5// schema: com.atproto.label.queryLabels
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/xrpc"
11)
12
13// LabelQueryLabels_Output is the output of a com.atproto.label.queryLabels call.
14type LabelQueryLabels_Output struct {
15 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
16 Labels []*LabelDefs_Label `json:"labels" cborgen:"labels"`
17}
18
19// LabelQueryLabels calls the XRPC method "com.atproto.label.queryLabels".
20//
21// sources: Optional list of label sources (DIDs) to filter on.
22// uriPatterns: List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI.
23func LabelQueryLabels(ctx context.Context, c *xrpc.Client, cursor string, limit int64, sources []string, uriPatterns []string) (*LabelQueryLabels_Output, error) {
24 var out LabelQueryLabels_Output
25
26 params := map[string]interface{}{
27 "cursor": cursor,
28 "limit": limit,
29 "sources": sources,
30 "uriPatterns": uriPatterns,
31 }
32 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.label.queryLabels", params, nil, &out); err != nil {
33 return nil, err
34 }
35
36 return &out, nil
37}