A fork of https://github.com/teal-fm/piper
at main 33 lines 983 B view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package atproto 4 5// schema: com.atproto.admin.getInviteCodes 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/xrpc" 11) 12 13// AdminGetInviteCodes_Output is the output of a com.atproto.admin.getInviteCodes call. 14type AdminGetInviteCodes_Output struct { 15 Codes []*ServerDefs_InviteCode `json:"codes" cborgen:"codes"` 16 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17} 18 19// AdminGetInviteCodes calls the XRPC method "com.atproto.admin.getInviteCodes". 20func AdminGetInviteCodes(ctx context.Context, c *xrpc.Client, cursor string, limit int64, sort string) (*AdminGetInviteCodes_Output, error) { 21 var out AdminGetInviteCodes_Output 22 23 params := map[string]interface{}{ 24 "cursor": cursor, 25 "limit": limit, 26 "sort": sort, 27 } 28 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getInviteCodes", params, nil, &out); err != nil { 29 return nil, err 30 } 31 32 return &out, nil 33}