createReport method
Future<XRPCResponse<CreateReportOutput> >
createReport({
- required UReasonType reasonType,
- String? reason,
- required UCreateReportSubject subject,
- Map<
String, String> ? $unknown, - Map<
String, String> ? $headers, - 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,
);