i3dprogrammer / myanimelistAPI-wrapper

C# API Wrapper for myanimelist
MIT License
6 stars 4 forks source link

Support for search by id #3

Open 123tris opened 6 years ago

123tris commented 6 years ago

It would be nice if you could use AnimeListEntry's id's to lookup information of an anime directly without returning a cumbersome result list. Something like:

API api = new MALAPI.API(username,password);
UserAnimeList list = api.UsersController.GetUserAnimeList(username);
api.SearchController.SearchForAnime(list.Animes[0].SeriesId);

instead of:

API api = new MALAPI.API(username,password);
UserAnimeList list = api.UsersController.GetUserAnimeList(username);
api.SearchController.SearchForAnime(list.Animes[0].SeriesTitle).Entries[0];

If you want to be able to quickly check the user-rating of anime within a user's MAL list I think this would be a lot nicer. And perhaps even faster. It's also more secure and safe

i3dprogrammer commented 6 years ago

I couldn't fully grasp what you mean. Could you elaborate?

To check the user rating of animes

var list = api.UsersController.GetUserAnimeList("3dprogrammer");
foreach(var anime in list.Animes)
    Console.WriteLine($"{anime.SeriesTitle} rated {anime.MyScoreInt}/10 as {anime.MyScore}");

Example output

Eyeshield 21 rated 7/10 as Good Monster rated 8/10 as VeryGood Naruto rated 9/10 as Great One Piece rated 6/10 as Fine Prince of Tennis rated 7/10 as Good Yakitate!! Japan rated 0/10 as None