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

package bsky

// schema: app.bsky.feed.getFeed

import (
	"context"

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

// FeedGetFeed_Output is the output of a app.bsky.feed.getFeed call.
type FeedGetFeed_Output struct {
	Cursor *string                  `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
	Feed   []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"`
}

// FeedGetFeed calls the XRPC method "app.bsky.feed.getFeed".
func FeedGetFeed(ctx context.Context, c util.LexClient, cursor string, feed string, limit int64) (*FeedGetFeed_Output, error) {
	var out FeedGetFeed_Output

	params := map[string]interface{}{}
	if cursor != "" {
		params["cursor"] = cursor
	}
	params["feed"] = feed
	if limit != 0 {
		params["limit"] = limit
	}
	if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getFeed", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
