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

package atproto

// schema: com.atproto.sync.getBlocks

import (
	"bytes"
	"context"

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

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

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

	return buf.Bytes(), nil
}
