createInviteCode method

Future<XRPCResponse<CreateInviteCodeOutput>> createInviteCode({
  1. required int useCount,
  2. String? forAccount,
  3. Map<String, String>? $unknown,
  4. Map<String, String>? $headers,
  5. PostClient? $client,
})

Implementation

Future<XRPCResponse<CreateInviteCodeOutput>> createInviteCode({
  required int useCount,
  String? forAccount,
  Map<String, String>? $unknown,
  Map<String, String>? $headers,
  PostClient? $client,
}) async =>
    await _ctx.post<CreateInviteCodeOutput>(
      ns.comAtprotoServerCreateInviteCode,
      headers: $headers,
      body: {
        'useCount': useCount,
        if (forAccount != null) 'forAccount': forAccount,
        ...?$unknown,
      },
      to: const CreateInviteCodeOutputConverter().fromJson,
      client: $client,
    );