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