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

package bsky

// schema: app.bsky.feed.getFeedSkeleton

import (
	"context"

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

// FeedGetFeedSkeleton_Output is the output of a app.bsky.feed.getFeedSkeleton call.
type FeedGetFeedSkeleton_Output struct {
	Cursor *string                      `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
	Feed   []*FeedDefs_SkeletonFeedPost `json:"feed" cborgen:"feed"`
	// reqId: Unique identifier per request that may be passed back alongside interactions.
	ReqId *string `json:"reqId,omitempty" cborgen:"reqId,omitempty"`
}

// FeedGetFeedSkeleton calls the XRPC method "app.bsky.feed.getFeedSkeleton".
//
// feed: Reference to feed generator record describing the specific feed being requested.
func FeedGetFeedSkeleton(ctx context.Context, c util.LexClient, cursor string, feed string, limit int64) (*FeedGetFeedSkeleton_Output, error) {
	var out FeedGetFeedSkeleton_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.getFeedSkeleton", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
