/
graphgetFollowers.go
45 lines (36 loc) · 1.47 KB
/
graphgetFollowers.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
38
39
40
41
42
43
44
45
package schemagen
import (
"context"
"github.com/whyrusleeping/gosky/xrpc"
)
// schema: app.bsky.graph.getFollowers
func init() {
}
type GraphGetFollowers_Follower struct {
LexiconTypeID string `json:"$type,omitempty"`
Avatar *string `json:"avatar,omitempty" cborgen:"avatar"`
CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt"`
Declaration *SystemDeclRef `json:"declaration" cborgen:"declaration"`
Did string `json:"did" cborgen:"did"`
DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"`
Handle string `json:"handle" cborgen:"handle"`
IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
}
type GraphGetFollowers_Output struct {
LexiconTypeID string `json:"$type,omitempty"`
Cursor *string `json:"cursor,omitempty" cborgen:"cursor"`
Followers []*GraphGetFollowers_Follower `json:"followers" cborgen:"followers"`
Subject *ActorRef_WithInfo `json:"subject" cborgen:"subject"`
}
func GraphGetFollowers(ctx context.Context, c *xrpc.Client, before string, limit int64, user string) (*GraphGetFollowers_Output, error) {
var out GraphGetFollowers_Output
params := map[string]interface{}{
"before": before,
"limit": limit,
"user": user,
}
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getFollowers", params, nil, &out); err != nil {
return nil, err
}
return &out, nil
}