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

package tangled

// schema: sh.tangled.repo.compare

import (
	"bytes"
	"context"

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

const (
	RepoCompareNSID = "sh.tangled.repo.compare"
)

// RepoCompare calls the XRPC method "sh.tangled.repo.compare".
//
// repo: Repository identifier in format 'did:plc:.../repoName'
// rev1: First revision (commit, branch, or tag)
// rev2: Second revision (commit, branch, or tag)
func RepoCompare(ctx context.Context, c util.LexClient, repo string, rev1 string, rev2 string) ([]byte, error) {
	buf := new(bytes.Buffer)

	params := map[string]interface{}{}
	params["repo"] = repo
	params["rev1"] = rev1
	params["rev2"] = rev2
	if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.compare", params, nil, buf); err != nil {
		return nil, err
	}

	return buf.Bytes(), nil
}
