createInviteCodes method

Future<XRPCResponse<CreateInviteCodesOutput>> createInviteCodes({
  1. required int codeCount,
  2. required int useCount,
  3. List<String>? forAccounts,
  4. Map<String, String>? $unknown,
  5. Map<String, String>? $headers,
  6. PostClient? $client,
})

Implementation

Future<XRPCResponse<CreateInviteCodesOutput>> createInviteCodes({
  required int codeCount,
  required int useCount,
  List<String>? forAccounts,
  Map<String, String>? $unknown,
  Map<String, String>? $headers,
  PostClient? $client,
}) async =>
    await _ctx.post<CreateInviteCodesOutput>(
      ns.comAtprotoServerCreateInviteCodes,
      headers: $headers,
      body: {
        'codeCount': codeCount,
        'useCount': useCount,
        if (forAccounts != null) 'forAccounts': forAccounts,
        ...?$unknown,
      },
      to: const CreateInviteCodesOutputConverter().fromJson,
      client: $client,
    );