A fork of https://github.com/teal-fm/piper
at main 33 lines 1.1 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package atproto 4 5// schema: com.atproto.server.getAccountInviteCodes 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/xrpc" 11) 12 13// ServerGetAccountInviteCodes_Output is the output of a com.atproto.server.getAccountInviteCodes call. 14type ServerGetAccountInviteCodes_Output struct { 15 Codes []*ServerDefs_InviteCode `json:"codes" cborgen:"codes"` 16} 17 18// ServerGetAccountInviteCodes calls the XRPC method "com.atproto.server.getAccountInviteCodes". 19// 20// createAvailable: Controls whether any new 'earned' but not 'created' invites should be created. 21func ServerGetAccountInviteCodes(ctx context.Context, c *xrpc.Client, createAvailable bool, includeUsed bool) (*ServerGetAccountInviteCodes_Output, error) { 22 var out ServerGetAccountInviteCodes_Output 23 24 params := map[string]interface{}{ 25 "createAvailable": createAvailable, 26 "includeUsed": includeUsed, 27 } 28 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getAccountInviteCodes", params, nil, &out); err != nil { 29 return nil, err 30 } 31 32 return &out, nil 33}