fork of indigo with slightly nicer lexgen
at main 2.0 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.searchActorsSkeleton 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13// UnspeccedSearchActorsSkeleton_Output is the output of a app.bsky.unspecced.searchActorsSkeleton call. 14type UnspeccedSearchActorsSkeleton_Output struct { 15 Actors []*UnspeccedDefs_SkeletonSearchActor `json:"actors" cborgen:"actors"` 16 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 // hitsTotal: Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. 18 HitsTotal *int64 `json:"hitsTotal,omitempty" cborgen:"hitsTotal,omitempty"` 19} 20 21// UnspeccedSearchActorsSkeleton calls the XRPC method "app.bsky.unspecced.searchActorsSkeleton". 22// 23// cursor: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. 24// q: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. 25// typeahead: If true, acts as fast/simple 'typeahead' query. 26// viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. 27func UnspeccedSearchActorsSkeleton(ctx context.Context, c util.LexClient, cursor string, limit int64, q string, typeahead bool, viewer string) (*UnspeccedSearchActorsSkeleton_Output, error) { 28 var out UnspeccedSearchActorsSkeleton_Output 29 30 params := map[string]interface{}{} 31 if cursor != "" { 32 params["cursor"] = cursor 33 } 34 if limit != 0 { 35 params["limit"] = limit 36 } 37 params["q"] = q 38 if typeahead { 39 params["typeahead"] = typeahead 40 } 41 if viewer != "" { 42 params["viewer"] = viewer 43 } 44 if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.searchActorsSkeleton", params, nil, &out); err != nil { 45 return nil, err 46 } 47 48 return &out, nil 49}