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.getBlocks
6
7import (
8 "bytes"
9 "context"
10
11 "github.com/bluesky-social/indigo/xrpc"
12)
13
14// SyncGetBlocks calls the XRPC method "com.atproto.sync.getBlocks".
15//
16// did: The DID of the repo.
17func SyncGetBlocks(ctx context.Context, c *xrpc.Client, cids []string, did string) ([]byte, error) {
18 buf := new(bytes.Buffer)
19
20 params := map[string]interface{}{
21 "cids": cids,
22 "did": did,
23 }
24 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getBlocks", params, nil, buf); err != nil {
25 return nil, err
26 }
27
28 return buf.Bytes(), nil
29}