schedule method

Future<Map<String, dynamic>> schedule([
  1. String? filter,
  2. bool? sfw = true,
  3. int? page = 1,
  4. int? limit = 10,
])

Implementation

Future<Map<String, dynamic>> schedule(
    [String? filter,
    bool? sfw = true,
    int? page = 1,
    int? limit = 10]) async {
  // https://api.jikan.moe/v4/schedules
  try {
    final res = await _dio
        .get("schedules?filter=$filter&sfw=$sfw&page=$page&limit=$limit");
    return res.data["data"];
  } on DioException catch (e) {
    if (e.response!.statusCode == 404) {
      throw NotFoundException();
    } else {
      throw BadResponseException();
    }
  }
}