// 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/lex/util"
)

// 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 util.LexClient, did string, since string) ([]byte, error) {
	buf := new(bytes.Buffer)

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

	return buf.Bytes(), nil
}
