comAtprotoServerCreateInviteCode function

Future<XRPCResponse<ServerCreateInviteCodeOutput>> comAtprotoServerCreateInviteCode({
  1. required int useCount,
  2. String? forAccount,
  3. required ServiceContext $ctx,
  4. Map<String, String>? $headers,
  5. Map<String, String>? $unknown,
})

Create an invite code.

Implementation

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