Last updated:
0 purchases
myanimelist api
MyAnimeList-API #
API wrapper for MyAnimeList written in Dart.
Installation #
Click here.
Get started #
You're gonna need an access token to use this wrapper. To find out how to get one, click here.
import 'package:myanimelist_api/myanimelist_api.dart';
void main() async {
// Initialize client
var client = Client("YOUR_ACCESS_TOKEN");
}
copied to clipboard
Examples #
• Node objects are objects with minimal fields like id, title and main pictures.
Most methods return nodes (or variations).
// Search for anime
var animeList = await client.searchAnime("Shingeki no Kyojin");
for (var anime in animeList) {
print(anime.id); // Most methods return objects with minimal fields
}
copied to clipboard
• Use ID to get complete anime/manga objects.
// Get complete objects using id
var anime = await client.getAnimeDetails(16498);
assert(anime.title == "Shingeki no Kyojin");
assert(anime.mainPicture.large == "https://api-cdn.myanimelist.net/images/anime/10/47347l.jpg");
assert(anime.genres[0].name == "Action");
assert(anime.createdAt == DateTime.parse("2012-12-05T12:03:21.000Z"));
copied to clipboard
• Use templates for updating lists.
var template = AnimeListTemplate(
status: "completed",
score: 9,
numWatchedEpisodes: 13
);
await client.updateAnimeList(30015, template);
copied to clipboard
TODO #
✅ User anime list
❌ Forum info
✅ User manga list
✅ User info
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.