/
actorsearchActorsTypeahead.go
37 lines (29 loc) · 1.19 KB
/
actorsearchActorsTypeahead.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package bsky
// schema: app.bsky.actor.searchActorsTypeahead
import (
"context"
"github.com/bluesky-social/indigo/xrpc"
)
// ActorSearchActorsTypeahead_Output is the output of a app.bsky.actor.searchActorsTypeahead call.
type ActorSearchActorsTypeahead_Output struct {
Actors []*ActorDefs_ProfileViewBasic `json:"actors" cborgen:"actors"`
}
// ActorSearchActorsTypeahead calls the XRPC method "app.bsky.actor.searchActorsTypeahead".
//
// q: Search query prefix; not a full query string.
// term: DEPRECATED: use 'q' instead.
// viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.
func ActorSearchActorsTypeahead(ctx context.Context, c *xrpc.Client, limit int64, q string, term string, viewer string) (*ActorSearchActorsTypeahead_Output, error) {
var out ActorSearchActorsTypeahead_Output
params := map[string]interface{}{
"limit": limit,
"q": q,
"term": term,
"viewer": viewer,
}
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.searchActorsTypeahead", params, nil, &out); err != nil {
return nil, err
}
return &out, nil
}