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

package bsky

// schema: app.bsky.unspecced.getTrends

import (
	"context"

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

// UnspeccedGetTrends_Output is the output of a app.bsky.unspecced.getTrends call.
type UnspeccedGetTrends_Output struct {
	Trends []*UnspeccedDefs_TrendView `json:"trends" cborgen:"trends"`
}

// UnspeccedGetTrends calls the XRPC method "app.bsky.unspecced.getTrends".
func UnspeccedGetTrends(ctx context.Context, c util.LexClient, limit int64) (*UnspeccedGetTrends_Output, error) {
	var out UnspeccedGetTrends_Output

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

	return &out, nil
}
