// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package atproto

// schema: com.atproto.sync.getRecord

import (
	"bytes"
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

// SyncGetRecord calls the XRPC method "com.atproto.sync.getRecord".
//
// did: The DID of the repo.
// rkey: Record Key
func SyncGetRecord(ctx context.Context, c util.LexClient, collection string, did string, rkey string) ([]byte, error) {
	buf := new(bytes.Buffer)

	params := map[string]interface{}{}
	params["collection"] = collection
	params["did"] = did
	params["rkey"] = rkey
	if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getRecord", params, nil, buf); err != nil {
		return nil, err
	}

	return buf.Bytes(), nil
}
