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