comAtprotoServerCreateInviteCodes function

Future<XRPCResponse<ServerCreateInviteCodesOutput>> comAtprotoServerCreateInviteCodes({
  1. required int codeCount,
  2. required int useCount,
  3. List<String>? forAccounts,
  4. required ServiceContext $ctx,
  5. Map<String, String>? $headers,
  6. Map<String, String>? $unknown,
})

Create invite codes.

Implementation

Future<XRPCResponse<ServerCreateInviteCodesOutput>>
comAtprotoServerCreateInviteCodes({
  required int codeCount,
  required int useCount,
  List<String>? forAccounts,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.comAtprotoServerCreateInviteCodes,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'codeCount': codeCount,
    'useCount': useCount,
    if (forAccounts != null) 'forAccounts': forAccounts,
  },
  to: const ServerCreateInviteCodesOutputConverter().fromJson,
);