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.sync.listReposByCollection
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/xrpc"
11)
12
13// SyncListReposByCollection_Output is the output of a com.atproto.sync.listReposByCollection call.
14type SyncListReposByCollection_Output struct {
15 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
16 Repos []*SyncListReposByCollection_Repo `json:"repos" cborgen:"repos"`
17}
18
19// SyncListReposByCollection_Repo is a "repo" in the com.atproto.sync.listReposByCollection schema.
20type SyncListReposByCollection_Repo struct {
21 Did string `json:"did" cborgen:"did"`
22}
23
24// SyncListReposByCollection calls the XRPC method "com.atproto.sync.listReposByCollection".
25//
26// limit: Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.
27func SyncListReposByCollection(ctx context.Context, c *xrpc.Client, collection string, cursor string, limit int64) (*SyncListReposByCollection_Output, error) {
28 var out SyncListReposByCollection_Output
29
30 params := map[string]interface{}{
31 "collection": collection,
32 "cursor": cursor,
33 "limit": limit,
34 }
35 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listReposByCollection", params, nil, &out); err != nil {
36 return nil, err
37 }
38
39 return &out, nil
40}