Skip to content

moviecollection/my-anime-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyAnimeList API

Unofficial implementation of the MyAnimeList API for .NET

Nuget Version Nuget Downloads

Installing

You can install this package by entering the following command into your Package Manager Console:

Install-Package MovieCollection.MyAnimeList -PreRelease

Configuration

First, define an instance of the HttpClient class if you haven't already.

// HttpClient is intended to be instantiated once per application, rather than per-use.
// See https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient
private static readonly HttpClient httpClient = new HttpClient();

Then, you need to set your api key.

// using MovieCollection.MyAnimeList;

var options = new MyAnimeListOptions
{
    ApiKey = "your-api-key",
};

var service = new MyAnimeListService(httpClient, options);

Anime List

You can search for an anime via the GetAnimeListAsync method.

var search = new NewAnimeSearch
{
    Query = "jjk",
};

var result = await service.GetAnimeListAsync(search);

Anime Details

You can get anime details via the GetAnimeDetailsAsync method.

var search = new NewAnimeDetails
{
    AnimeId = 51009,
    Fields = AnimeFields.All,
};

var item = await service.GetAnimeDetailsAsync(search);

Please check out the demo project for more examples.

Limitations

  • Some methods has not been implemented (e.g. Authentication, Forum, Manga, Users).

Notes

  • Thanks to MyAnimeList for providing free API services.
  • Please read MyAnimeList terms of use before using their services.

License

This project is licensed under the MIT License.