porting all github actions from bluesky-social/indigo to tangled CI
at main 1.2 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package bsky 4 5// schema: app.bsky.unspecced.getTrendingTopics 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13// UnspeccedGetTrendingTopics_Output is the output of a app.bsky.unspecced.getTrendingTopics call. 14type UnspeccedGetTrendingTopics_Output struct { 15 Suggested []*UnspeccedDefs_TrendingTopic `json:"suggested" cborgen:"suggested"` 16 Topics []*UnspeccedDefs_TrendingTopic `json:"topics" cborgen:"topics"` 17} 18 19// UnspeccedGetTrendingTopics calls the XRPC method "app.bsky.unspecced.getTrendingTopics". 20// 21// viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. 22func UnspeccedGetTrendingTopics(ctx context.Context, c util.LexClient, limit int64, viewer string) (*UnspeccedGetTrendingTopics_Output, error) { 23 var out UnspeccedGetTrendingTopics_Output 24 25 params := map[string]interface{}{} 26 if limit != 0 { 27 params["limit"] = limit 28 } 29 if viewer != "" { 30 params["viewer"] = viewer 31 } 32 if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getTrendingTopics", params, nil, &out); err != nil { 33 return nil, err 34 } 35 36 return &out, nil 37}