toolsOzoneModerationListScheduledActions function

Future<XRPCResponse<ModerationListScheduledActionsOutput>> toolsOzoneModerationListScheduledActions({
  1. DateTime? startsAfter,
  2. DateTime? endsBefore,
  3. List<String>? subjects,
  4. required List<ModerationListScheduledActionsStatuses> statuses,
  5. int? limit,
  6. String? cursor,
  7. required ServiceContext $ctx,
  8. Map<String, String>? $headers,
  9. Map<String, String>? $unknown,
})

List scheduled moderation actions with optional filtering

Implementation

Future<XRPCResponse<ModerationListScheduledActionsOutput>>
toolsOzoneModerationListScheduledActions({
  DateTime? startsAfter,
  DateTime? endsBefore,
  List<String>? subjects,
  required List<ModerationListScheduledActionsStatuses> statuses,
  int? limit,
  String? cursor,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.toolsOzoneModerationListScheduledActions,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    if (startsAfter != null) 'startsAfter': iso8601(startsAfter),
    if (endsBefore != null) 'endsBefore': iso8601(endsBefore),
    if (subjects != null) 'subjects': subjects,
    'statuses': statuses.map((e) => e.toJson()).toList(),
    if (limit != null) 'limit': limit,
    if (cursor != null) 'cursor': cursor,
  },
  to: const ModerationListScheduledActionsOutputConverter().fromJson,
);