// 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/xrpc"
)

// 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 *xrpc.Client, cursor string, feed string, limit int64) (*FeedGetFeed_Output, error) {
	var out FeedGetFeed_Output

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

	return &out, nil
}
