comAtprotoServerCreateAppPassword function

Future<XRPCResponse<AppPassword>> comAtprotoServerCreateAppPassword({
  1. required String name,
  2. bool? privileged,
  3. required ServiceContext $ctx,
  4. Map<String, String>? $headers,
  5. Map<String, String>? $unknown,
})

Create an App Password.

Implementation

Future<XRPCResponse<AppPassword>> comAtprotoServerCreateAppPassword({
  required String name,
  bool? privileged,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.comAtprotoServerCreateAppPassword,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'name': name,
    if (privileged != null) 'privileged': privileged,
  },
  to: const AppPasswordConverter().fromJson,
);