createReport method

Future<XRPCResponse<CreateReportOutput>> createReport({
  1. required UReasonType reasonType,
  2. String? reason,
  3. required UCreateReportSubject subject,
  4. Map<String, String>? $unknown,
  5. Map<String, String>? $headers,
  6. PostClient? $client,
})

Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.

https://atprotodart.com/docs/lexicons/com/atproto/moderation/createReport

Implementation

Future<XRPCResponse<CreateReportOutput>> createReport({
  required UReasonType reasonType,
  String? reason,
  required UCreateReportSubject subject,
  Map<String, String>? $unknown,
  Map<String, String>? $headers,
  PostClient? $client,
}) async =>
    await _ctx.post<CreateReportOutput>(
      ns.comAtprotoModerationCreateReport,
      headers: $headers,
      body: {
        'reasonType': reasonType.toJson(),
        if (reason != null) 'reason': reason,
        'subject': subject.toJson(),
        ...?$unknown,
      },
      to: const CreateReportOutputConverter().fromJson,
      client: $client,
    );