diff --git a/.gitignore b/.gitignore index fc7b2be..ac5aa98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,29 @@ -# Files and directories created by pub -.dart_tool/ -.packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ -# Conventional directory for build outputs -build/ +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ -# Directory created by dartdoc -doc/api/ +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ -.vscode/ -.idea/ -*.iml +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..bde98a9 --- /dev/null +++ b/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "b0366e0a3f089e15fd89c97604ab402fe26b724c" + channel: "stable" + +project_type: package diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 11ccf81..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: dart -dart: - - stable -dart_task: - - test - # Warnings are fatal, but we only analyze the lib/ directory. - - dartanalyzer: --fatal-warnings lib - # - dartfmt \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b69f148..a970656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.2.0 + +* Requires Dart 3.0 or later. +* Replace `TopType` enum with `AnimeType` and `MangaType` respectively. + ## 2.1.0 * Updated `Review` and `UserReview` models. diff --git a/README.md b/README.md index 7ead6a2..0e507dd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # jikan_api +[Jikan](https://jikan.moe/) is an **Unofficial** MyAnimeList API. It scrapes the website to satisfy the need for a complete API - which MyAnimeList lacks. + [![Build Status](https://github.com/javoeria/jikan-dart/actions/workflows/dart.yml/badge.svg?branch=master)](https://github.com/javoeria/jikan-dart/actions/workflows/dart.yml) [![pub package](https://img.shields.io/pub/v/jikan_api.svg)](https://pub.dev/packages/jikan_api) @@ -78,8 +80,8 @@ Future> getSchedules({WeekDay? weekday, int page = 1}); ### Top ```dart -Future> getTopAnime({TopType? type, TopFilter? filter, int page = 1}); -Future> getTopManga({TopType? type, TopFilter? filter, int page = 1}); +Future> getTopAnime({AnimeType? type, TopFilter? filter, int page = 1}); +Future> getTopManga({MangaType? type, TopFilter? filter, int page = 1}); Future> getTopPeople({int page = 1}); Future> getTopCharacters({int page = 1}); Future> getTopReviews({int page = 1}); diff --git a/example/main.dart b/example/main.dart index e4ba6ca..4ec919a 100644 --- a/example/main.dart +++ b/example/main.dart @@ -1,7 +1,7 @@ import 'package:jikan_api/jikan_api.dart'; void main() async { - var jikan = Jikan(); - var top = await jikan.getTopAnime(type: TopType.tv, filter: TopFilter.airing); + final jikan = Jikan(); + final top = await jikan.getTopAnime(type: AnimeType.tv); print(top); } diff --git a/lib/src/jikan.dart b/lib/src/jikan.dart index b2aefb3..6a38117 100644 --- a/lib/src/jikan.dart +++ b/lib/src/jikan.dart @@ -45,10 +45,8 @@ class Jikan { return json.decode(response.body); } - String _enumToString(Object o) => o.toString().split('.')[1]; - Future getAnime(int id) async { - var url = '/anime/$id/full'; + var url = id == 0 ? '/random/anime' : '/anime/$id/full'; var response = await _getResponse(url); return Anime.fromJson(response['data']); @@ -88,7 +86,7 @@ class Jikan { Future> getAnimeForum(int id, {ForumType? type}) async { var url = '/anime/$id/forum'; - if (type != null) url += '?filter=${_enumToString(type)}'; + if (type != null) url += '?filter=${type.name}'; var response = await _getResponse(url); final topics = response['data'] ?? []; @@ -143,7 +141,7 @@ class Jikan { } Future> getAnimeReviews(int id, {int page = 1}) async { - var url = '/anime/$id/reviews?page=$page'; + var url = '/anime/$id/reviews?page=$page&preliminary=true&spoilers=true'; var response = await _getResponse(url); final reviews = response['data'] ?? []; @@ -151,7 +149,7 @@ class Jikan { } Future getManga(int id) async { - var url = '/manga/$id/full'; + var url = id == 0 ? '/random/manga' : '/manga/$id/full'; var response = await _getResponse(url); return Manga.fromJson(response['data']); @@ -175,7 +173,7 @@ class Jikan { Future> getMangaForum(int id, {ForumType? type}) async { var url = '/manga/$id/forum'; - if (type != null) url += '?filter=${_enumToString(type)}'; + if (type != null) url += '?filter=${type.name}'; var response = await _getResponse(url); final topics = response['data'] ?? []; @@ -222,7 +220,7 @@ class Jikan { } Future> getMangaReviews(int id, {int page = 1}) async { - var url = '/manga/$id/reviews?page=$page'; + var url = '/manga/$id/reviews?page=$page&preliminary=true&spoilers=true'; var response = await _getResponse(url); final reviews = response['data'] ?? []; @@ -230,7 +228,7 @@ class Jikan { } Future getPerson(int id) async { - var url = '/people/$id/full'; + var url = id == 0 ? '/random/people' : '/people/$id/full'; var response = await _getResponse(url); return Person.fromJson(response['data']); @@ -245,7 +243,7 @@ class Jikan { } Future getCharacter(int id) async { - var url = '/characters/$id/full'; + var url = id == 0 ? '/random/characters' : '/characters/$id/full'; var response = await _getResponse(url); return Character.fromJson(response['data']); @@ -270,7 +268,7 @@ class Jikan { int page = 1}) async { var url = '/anime?page=$page'; if (query != null) url += '&q=$query'; - if (type != null) url += '&type=${_enumToString(type)}'; + if (type != null) url += '&type=${type.name}'; if (genres != null) url += '&genres=${genres.join(',')}'; if (producers != null) url += '&producers=${producers.join(',')}'; if (orderBy != null) url += '&order_by=$orderBy'; @@ -293,7 +291,7 @@ class Jikan { int page = 1}) async { var url = '/manga?page=$page'; if (query != null) url += '&q=$query'; - if (type != null) url += '&type=${_enumToString(type)}'; + if (type != null) url += '&type=${type.name}'; if (genres != null) url += '&genres=${genres.join(',')}'; if (magazines != null) url += '&magazines=${magazines.join(',')}'; if (orderBy != null) url += '&order_by=$orderBy'; @@ -333,7 +331,7 @@ class Jikan { {int? year, SeasonType? season, int page = 1}) async { var url = '/seasons'; if (year != null && season != null) { - url += '/$year/${_enumToString(season)}?page=$page'; + url += '/$year/${season.name}?page=$page'; } else { url += '/now?page=$page'; } @@ -362,7 +360,7 @@ class Jikan { Future> getSchedules( {WeekDay? weekday, int page = 1}) async { var url = '/schedules?page=$page'; - if (weekday != null) url += '&filter=${_enumToString(weekday)}'; + if (weekday != null) url += '&filter=${weekday.name}'; var response = await _getResponse(url); final anime = response['data'] ?? []; @@ -370,10 +368,10 @@ class Jikan { } Future> getTopAnime( - {TopType? type, TopFilter? filter, int page = 1}) async { + {AnimeType? type, TopFilter? filter, int page = 1}) async { var url = '/top/anime?page=$page'; - if (type != null) url += '&type=${_enumToString(type)}'; - if (filter != null) url += '&filter=${_enumToString(filter)}'; + if (type != null) url += '&type=${type.name}'; + if (filter != null) url += '&filter=${filter.name}'; var response = await _getResponse(url); final top = response['data'] ?? []; @@ -381,10 +379,10 @@ class Jikan { } Future> getTopManga( - {TopType? type, TopFilter? filter, int page = 1}) async { + {MangaType? type, TopFilter? filter, int page = 1}) async { var url = '/top/manga?page=$page'; - if (type != null) url += '&type=${_enumToString(type)}'; - if (filter != null) url += '&filter=${_enumToString(filter)}'; + if (type != null) url += '&type=${type.name}'; + if (filter != null) url += '&filter=${filter.name}'; var response = await _getResponse(url); final top = response['data'] ?? []; @@ -417,7 +415,7 @@ class Jikan { Future> getAnimeGenres({GenreType? type}) async { var url = '/genres/anime'; - if (type != null) url += '?filter=${_enumToString(type)}'; + if (type != null) url += '?filter=${type.name}'; var response = await _getResponse(url); final genres = response['data'] ?? []; @@ -426,7 +424,7 @@ class Jikan { Future> getMangaGenres({GenreType? type}) async { var url = '/genres/manga'; - if (type != null) url += '?filter=${_enumToString(type)}'; + if (type != null) url += '?filter=${type.name}'; var response = await _getResponse(url); final genres = response['data'] ?? []; @@ -467,7 +465,7 @@ class Jikan { Future> getUserHistory(String username, {HistoryType? type}) async { var url = '/users/$username/history'; - if (type != null) url += '?type=${_enumToString(type)}'; + if (type != null) url += '?type=${type.name}'; var response = await _getResponse(url); final history = response['data'] ?? []; @@ -510,7 +508,7 @@ class Jikan { } Future> getRecentAnimeReviews({int page = 1}) async { - var url = '/reviews/anime?page=$page'; + var url = '/reviews/anime?page=$page&preliminary=true&spoilers=true'; var response = await _getResponse(url); final reviews = response['data'] ?? []; @@ -518,7 +516,7 @@ class Jikan { } Future> getRecentMangaReviews({int page = 1}) async { - var url = '/reviews/manga?page=$page'; + var url = '/reviews/manga?page=$page&preliminary=true&spoilers=true'; var response = await _getResponse(url); final reviews = response['data'] ?? []; diff --git a/lib/src/model/anime/anime.g.dart b/lib/src/model/anime/anime.g.dart index 802c1ed..e5f3752 100644 --- a/lib/src/model/anime/anime.g.dart +++ b/lib/src/model/anime/anime.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of anime; +part of 'anime.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/anime/anime_meta.g.dart b/lib/src/model/anime/anime_meta.g.dart index ec2a889..dd66316 100644 --- a/lib/src/model/anime/anime_meta.g.dart +++ b/lib/src/model/anime/anime_meta.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of anime_meta; +part of 'anime_meta.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/anime/episode.g.dart b/lib/src/model/anime/episode.g.dart index 73f51b6..22799f5 100644 --- a/lib/src/model/anime/episode.g.dart +++ b/lib/src/model/anime/episode.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of episode; +part of 'episode.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/anime/promo.g.dart b/lib/src/model/anime/promo.g.dart index c756fb1..f0e0de9 100644 --- a/lib/src/model/anime/promo.g.dart +++ b/lib/src/model/anime/promo.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of promo; +part of 'promo.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/character/character.g.dart b/lib/src/model/character/character.g.dart index 5962039..ee6e359 100644 --- a/lib/src/model/character/character.g.dart +++ b/lib/src/model/character/character.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of character; +part of 'character.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/character/character_meta.g.dart b/lib/src/model/character/character_meta.g.dart index 23ef2c4..737db17 100644 --- a/lib/src/model/character/character_meta.g.dart +++ b/lib/src/model/character/character_meta.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of character_meta; +part of 'character_meta.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/archive.g.dart b/lib/src/model/common/archive.g.dart index 62f5c67..e4f85f5 100644 --- a/lib/src/model/common/archive.g.dart +++ b/lib/src/model/common/archive.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of archive; +part of 'archive.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/article.g.dart b/lib/src/model/common/article.g.dart index c21ff96..e156708 100644 --- a/lib/src/model/common/article.g.dart +++ b/lib/src/model/common/article.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of article; +part of 'article.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/entry_meta.g.dart b/lib/src/model/common/entry_meta.g.dart index 67e8e3f..9d4ed4e 100644 --- a/lib/src/model/common/entry_meta.g.dart +++ b/lib/src/model/common/entry_meta.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of entry_meta; +part of 'entry_meta.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/forum.g.dart b/lib/src/model/common/forum.g.dart index 39cc50f..07c6ef4 100644 --- a/lib/src/model/common/forum.g.dart +++ b/lib/src/model/common/forum.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of forum; +part of 'forum.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/meta.g.dart b/lib/src/model/common/meta.g.dart index 7f39bf5..0fc04ab 100644 --- a/lib/src/model/common/meta.g.dart +++ b/lib/src/model/common/meta.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of meta; +part of 'meta.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/picture.g.dart b/lib/src/model/common/picture.g.dart index e505450..60f75b5 100644 --- a/lib/src/model/common/picture.g.dart +++ b/lib/src/model/common/picture.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of picture; +part of 'picture.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/reactions.g.dart b/lib/src/model/common/reactions.g.dart index 5c54c54..c6353c6 100644 --- a/lib/src/model/common/reactions.g.dart +++ b/lib/src/model/common/reactions.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of reactions; +part of 'reactions.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/recommendation.g.dart b/lib/src/model/common/recommendation.g.dart index 8420172..73c7ed4 100644 --- a/lib/src/model/common/recommendation.g.dart +++ b/lib/src/model/common/recommendation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of recommendation; +part of 'recommendation.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/relation.g.dart b/lib/src/model/common/relation.g.dart index 5482532..971ec1e 100644 --- a/lib/src/model/common/relation.g.dart +++ b/lib/src/model/common/relation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of relation; +part of 'relation.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/review.g.dart b/lib/src/model/common/review.g.dart index f29ea0d..0e69190 100644 --- a/lib/src/model/common/review.g.dart +++ b/lib/src/model/common/review.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of review; +part of 'review.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/score.g.dart b/lib/src/model/common/score.g.dart index 96db251..5cb9322 100644 --- a/lib/src/model/common/score.g.dart +++ b/lib/src/model/common/score.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of score; +part of 'score.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/stats.g.dart b/lib/src/model/common/stats.g.dart index 99b7d77..b3acf60 100644 --- a/lib/src/model/common/stats.g.dart +++ b/lib/src/model/common/stats.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stats; +part of 'stats.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/common/user_update.g.dart b/lib/src/model/common/user_update.g.dart index 515066d..16b1cf9 100644 --- a/lib/src/model/common/user_update.g.dart +++ b/lib/src/model/common/user_update.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of user_update; +part of 'user_update.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/constants.dart b/lib/src/model/constants.dart index aa70027..3938499 100644 --- a/lib/src/model/constants.dart +++ b/lib/src/model/constants.dart @@ -12,22 +12,6 @@ enum GenreType { genres, explicit_genres, themes, demographics } enum HistoryType { anime, manga } -enum TopType { - tv, - movie, - ova, - ona, - special, - music, - manga, - novels, - lightnovels, - oneshots, - doujin, - manhwa, - manhua, -} - enum TopFilter { airing, publishing, upcoming, bypopularity, favorite } enum WeekDay { diff --git a/lib/src/model/genre/genre.g.dart b/lib/src/model/genre/genre.g.dart index ee66b7e..75ac579 100644 --- a/lib/src/model/genre/genre.g.dart +++ b/lib/src/model/genre/genre.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of genre; +part of 'genre.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/magazine/magazine.g.dart b/lib/src/model/magazine/magazine.g.dart index 0869cd4..f88e3e7 100644 --- a/lib/src/model/magazine/magazine.g.dart +++ b/lib/src/model/magazine/magazine.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of magazine; +part of 'magazine.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/manga/manga.g.dart b/lib/src/model/manga/manga.g.dart index fedb005..617f96d 100644 --- a/lib/src/model/manga/manga.g.dart +++ b/lib/src/model/manga/manga.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of manga; +part of 'manga.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/manga/manga_meta.g.dart b/lib/src/model/manga/manga_meta.g.dart index 6fe4cab..598d5c3 100644 --- a/lib/src/model/manga/manga_meta.g.dart +++ b/lib/src/model/manga/manga_meta.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of manga_meta; +part of 'manga_meta.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/person/person.g.dart b/lib/src/model/person/person.g.dart index 41a572b..4a92869 100644 --- a/lib/src/model/person/person.g.dart +++ b/lib/src/model/person/person.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of person; +part of 'person.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/person/person_meta.g.dart b/lib/src/model/person/person_meta.g.dart index 25f9721..9f9a20d 100644 --- a/lib/src/model/person/person_meta.g.dart +++ b/lib/src/model/person/person_meta.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of person_meta; +part of 'person_meta.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/person/voice_actor.g.dart b/lib/src/model/person/voice_actor.g.dart index 35fc6a2..ba5ba29 100644 --- a/lib/src/model/person/voice_actor.g.dart +++ b/lib/src/model/person/voice_actor.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of voice_actor; +part of 'voice_actor.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/producer/producer.g.dart b/lib/src/model/producer/producer.g.dart index 0f38b6f..221b30e 100644 --- a/lib/src/model/producer/producer.g.dart +++ b/lib/src/model/producer/producer.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of producer; +part of 'producer.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/serializers.g.dart b/lib/src/model/serializers.g.dart index 77e9897..b65292e 100644 --- a/lib/src/model/serializers.g.dart +++ b/lib/src/model/serializers.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of serializers; +part of 'serializers.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/entry_update.g.dart b/lib/src/model/user/entry_update.g.dart index 191697a..42b4008 100644 --- a/lib/src/model/user/entry_update.g.dart +++ b/lib/src/model/user/entry_update.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of entry_update; +part of 'entry_update.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/favorite.g.dart b/lib/src/model/user/favorite.g.dart index 6764d25..3bdffce 100644 --- a/lib/src/model/user/favorite.g.dart +++ b/lib/src/model/user/favorite.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of favorite; +part of 'favorite.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/favorites.g.dart b/lib/src/model/user/favorites.g.dart index 1c88b35..ef1ddc5 100644 --- a/lib/src/model/user/favorites.g.dart +++ b/lib/src/model/user/favorites.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of favorites; +part of 'favorites.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/friend.g.dart b/lib/src/model/user/friend.g.dart index 231658b..bd1bdcf 100644 --- a/lib/src/model/user/friend.g.dart +++ b/lib/src/model/user/friend.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of friend; +part of 'friend.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/history.g.dart b/lib/src/model/user/history.g.dart index 066afbc..3bcd6ce 100644 --- a/lib/src/model/user/history.g.dart +++ b/lib/src/model/user/history.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of history; +part of 'history.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/user_meta.g.dart b/lib/src/model/user/user_meta.g.dart index 90e1985..15afeb9 100644 --- a/lib/src/model/user/user_meta.g.dart +++ b/lib/src/model/user/user_meta.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of user_meta; +part of 'user_meta.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/user_profile.g.dart b/lib/src/model/user/user_profile.g.dart index 3ee5613..be0f8d0 100644 --- a/lib/src/model/user/user_profile.g.dart +++ b/lib/src/model/user/user_profile.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of user_profile; +part of 'user_profile.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/user_recommendation.g.dart b/lib/src/model/user/user_recommendation.g.dart index 93c3552..697f612 100644 --- a/lib/src/model/user/user_recommendation.g.dart +++ b/lib/src/model/user/user_recommendation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of user_recommendation; +part of 'user_recommendation.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/user_review.g.dart b/lib/src/model/user/user_review.g.dart index e0900b7..b764a96 100644 --- a/lib/src/model/user/user_review.g.dart +++ b/lib/src/model/user/user_review.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of user_review; +part of 'user_review.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/user/user_stats.g.dart b/lib/src/model/user/user_stats.g.dart index 0961743..e9ac69a 100644 --- a/lib/src/model/user/user_stats.g.dart +++ b/lib/src/model/user/user_stats.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of user_stats; +part of 'user_stats.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/watch/watch_episode.g.dart b/lib/src/model/watch/watch_episode.g.dart index 0b6ba2d..3391fe3 100644 --- a/lib/src/model/watch/watch_episode.g.dart +++ b/lib/src/model/watch/watch_episode.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of watch_episode; +part of 'watch_episode.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/lib/src/model/watch/watch_promo.g.dart b/lib/src/model/watch/watch_promo.g.dart index aeee273..ff562a1 100644 --- a/lib/src/model/watch/watch_promo.g.dart +++ b/lib/src/model/watch/watch_promo.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of watch_promo; +part of 'watch_promo.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/pubspec.yaml b/pubspec.yaml index bdd6904..d35eb29 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,18 +1,24 @@ name: jikan_api -version: 2.1.0 description: Dart wrapper for the Jikan API, an unofficial MyAnimeList API. +version: 2.2.0 homepage: https://github.com/javoeria/jikan-dart environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: - http: ^0.13.5 - built_value: ^8.4.4 + http: ^1.1.2 + built_value: ^8.8.1 built_collection: ^5.1.1 dev_dependencies: - build_runner: ^2.3.3 - built_value_generator: ^8.4.4 - lints: ^2.0.1 - test: ^1.23.1 + build_runner: ^2.4.7 + built_value_generator: ^8.8.1 + lints: ^3.0.0 + test: ^1.24.9 + +topics: + - anime + - manga + - api + - http diff --git a/test/jikan_api_test.dart b/test/jikan_api_test.dart index af95a0b..69abafb 100644 --- a/test/jikan_api_test.dart +++ b/test/jikan_api_test.dart @@ -30,7 +30,7 @@ void main() { test('Anime staff', () async { var anime = await jikan.getAnimeStaff(1); - expect(anime.first.name, 'Maseba, Yutaka'); + expect(anime.first.name, 'Cook, Justin'); }); test('Anime episodes', () async { @@ -178,7 +178,7 @@ void main() { test('Search anime list', () async { var search = await jikan.searchAnime(query: 'shingeki', type: AnimeType.tv); - expect(search.first.title, 'Shingeki no Kyojin'); + expect(search.first.title, 'Shingeki no Kyojin: The Final Season'); expect(search.first.type, 'TV'); }); });