-
Notifications
You must be signed in to change notification settings - Fork 89
/
servergetAccountInviteCodes.go
33 lines (25 loc) · 1.07 KB
/
servergetAccountInviteCodes.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
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package atproto
// schema: com.atproto.server.getAccountInviteCodes
import (
"context"
"github.com/bluesky-social/indigo/xrpc"
)
// ServerGetAccountInviteCodes_Output is the output of a com.atproto.server.getAccountInviteCodes call.
type ServerGetAccountInviteCodes_Output struct {
Codes []*ServerDefs_InviteCode `json:"codes" cborgen:"codes"`
}
// ServerGetAccountInviteCodes calls the XRPC method "com.atproto.server.getAccountInviteCodes".
//
// createAvailable: Controls whether any new 'earned' but not 'created' invites should be created.
func ServerGetAccountInviteCodes(ctx context.Context, c *xrpc.Client, createAvailable bool, includeUsed bool) (*ServerGetAccountInviteCodes_Output, error) {
var out ServerGetAccountInviteCodes_Output
params := map[string]interface{}{
"createAvailable": createAvailable,
"includeUsed": includeUsed,
}
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getAccountInviteCodes", params, nil, &out); err != nil {
return nil, err
}
return &out, nil
}