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

package bsky

// schema: app.bsky.unspecced.getTrendsSkeleton

import (
	"context"

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

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

// UnspeccedGetTrendsSkeleton calls the XRPC method "app.bsky.unspecced.getTrendsSkeleton".
//
// viewer: DID of the account making the request (not included for public/unauthenticated queries).
func UnspeccedGetTrendsSkeleton(ctx context.Context, c util.LexClient, limit int64, viewer string) (*UnspeccedGetTrendsSkeleton_Output, error) {
	var out UnspeccedGetTrendsSkeleton_Output

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

	return &out, nil
}
