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

package tangled

// schema: sh.tangled.repo.diff

import (
	"bytes"
	"context"

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

const (
	RepoDiffNSID = "sh.tangled.repo.diff"
)

// RepoDiff calls the XRPC method "sh.tangled.repo.diff".
//
// ref: Git reference (branch, tag, or commit SHA)
// repo: Repository identifier in format 'did:plc:.../repoName'
func RepoDiff(ctx context.Context, c util.LexClient, ref string, repo string) ([]byte, error) {
	buf := new(bytes.Buffer)

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

	return buf.Bytes(), nil
}
