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.repo.getPulls
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 RepoGetPullsNSID = "sh.tangled.repo.getPulls"
15)
16
17// RepoGetPulls_Output is the output of a sh.tangled.repo.getPulls call.
18type RepoGetPulls_Output struct {
19 Items []*RepoGetPulls_RecordView `json:"items" cborgen:"items"`
20}
21
22// RepoGetPulls_RecordView is a "recordView" in the sh.tangled.repo.getPulls schema.
23type RepoGetPulls_RecordView struct {
24 Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
25 Uri string `json:"uri" cborgen:"uri"`
26 // value: Embedded sh.tangled.repo.pull record.
27 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
28}
29
30// RepoGetPulls calls the XRPC method "sh.tangled.repo.getPulls".
31//
32// pulls: AT-URIs of the sh.tangled.repo.pull records to fetch. At most 50 per request.
33func RepoGetPulls(ctx context.Context, c util.LexClient, pulls []string) (*RepoGetPulls_Output, error) {
34 var out RepoGetPulls_Output
35
36 params := map[string]interface{}{}
37 params["pulls"] = pulls
38 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.getPulls", params, nil, &out); err != nil {
39 return nil, err
40 }
41
42 return &out, nil
43}