createReport method

Future<XRPCResponse<Report>> createReport({
  1. required ReportSubject subject,
  2. ModerationReasonType reasonType = ModerationReasonType.spam,
  3. String? reason,
})

Implementation

Future<core.XRPCResponse<Report>> createReport({
  required ReportSubject subject,
  ModerationReasonType reasonType = ModerationReasonType.spam,
  String? reason,
}) async =>
    await _ctx.post(
      ns.comAtprotoModerationCreateReport,
      body: {
        'subject': subject.toJson(),
        'reasonType': reasonType.value,
        'reason': reason,
      },
      to: Report.fromJson,
    );