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

package tangled

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

import (
	"bytes"
	"context"

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

const (
	GitTempListBranchesNSID = "sh.tangled.git.temp.listBranches"
)

// GitTempListBranches calls the XRPC method "sh.tangled.git.temp.listBranches".
//
// cursor: Pagination cursor
// limit: Maximum number of branches to return
// repo: AT-URI of the repository
func GitTempListBranches(ctx context.Context, c util.LexClient, cursor string, limit int64, repo string) ([]byte, error) {
	buf := new(bytes.Buffer)

	params := map[string]interface{}{}
	if cursor != "" {
		params["cursor"] = cursor
	}
	if limit != 0 {
		params["limit"] = limit
	}
	params["repo"] = repo
	if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.listBranches", params, nil, buf); err != nil {
		return nil, err
	}

	return buf.Bytes(), nil
}
