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

package tangled

// schema: sh.tangled.git.temp.getEntity

import (
	"context"

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

const (
	GitTempGetEntityNSID = "sh.tangled.git.temp.getEntity"
)

// GitTempGetEntity calls the XRPC method "sh.tangled.git.temp.getEntity".
//
// path: path of the entity
// ref: Git reference (branch, tag, or commit SHA)
// repo: AT-URI of the repository
func GitTempGetEntity(ctx context.Context, c util.LexClient, path string, ref string, repo string) (*GitTempDefs_Blob, error) {
	var out GitTempDefs_Blob

	params := map[string]interface{}{}
	params["path"] = path
	if ref != "" {
		params["ref"] = ref
	}
	params["repo"] = repo
	if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getEntity", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
