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

package bsky

// schema: app.bsky.unspecced.getPopular

import (
	"context"

	"github.com/bluesky-social/indigo/xrpc"
)

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

// UnspeccedGetPopular calls the XRPC method "app.bsky.unspecced.getPopular".
func UnspeccedGetPopular(ctx context.Context, c *xrpc.Client, cursor string, includeNsfw bool, limit int64) (*UnspeccedGetPopular_Output, error) {
	var out UnspeccedGetPopular_Output

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

	return &out, nil
}
