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

package atproto

// schema: com.atproto.sync.getRepo

import (
	"bytes"
	"context"

	"github.com/bluesky-social/indigo/xrpc"
)

// SyncGetRepo calls the XRPC method "com.atproto.sync.getRepo".
//
// did: The DID of the repo.
// since: The revision ('rev') of the repo to create a diff from.
func SyncGetRepo(ctx context.Context, c *xrpc.Client, did string, since string) ([]byte, error) {
	buf := new(bytes.Buffer)

	params := map[string]interface{}{
		"did":   did,
		"since": since,
	}
	if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRepo", params, nil, buf); err != nil {
		return nil, err
	}

	return buf.Bytes(), nil
}
