- What: .NET library for accessing MyAnimeList.net Web API (API Documentation)
- Framework: .NET 4.5.2
- Contact Info: @SlightEdgeCoder
- License: The MIT License
There is a 1:1 matching between the Web API and the source code.
These four facade classes are the only classes you need to deal with.
####The difference between Synchronous and Asynchronous version:
SearchMethods
is separated into two different files (subject to change in later version):
###Source is located under Project.MyAnimeList/Project.MyAnimeList/Project.MyAnimeList/Facade/Async
Install-Package MyAnimeListSharp
// Step 1: Enter UserName and Password information
ICredentialContext credential = new CredentialContext
{
UserName = "<MyAnimeList.NET UserName>",
Password = "<MyAnimeList.NET Password>"
};
// Step 2: Create a method object
var searchMethods = new SearchMethods(credential);
// Step 3: Search using the search term ("Full Metal" in this case)
string response = searchMethods.SearchAnime("Full Metal");
ICredentialContext credential = new CredentialContext
{
UserName = "<MyAnimeList.NET UserName>",
Password = "<MyAnimeList.NET Password>"
};
var asyncMangaSearcher = new MangaSearchMethodsAsync(credential);
var response = await asyncMangaSearcher.SearchAsync("Dagashi Kashi");
// Step 1: Enter UserName and Password information
ICredentialContext credential = new CredentialContext
{
UserName = "<MyAnimeList.NET UserName>",
Password = "<MyAnimeList.NET Password>"
};
// Step 2: Create a method object
var searchMethods = new SearchMethods(credential);
// Step 3: Search using the search term ("Code Geass" in this case)
string mangaResponse = searchMethods.SearchManga("Code Geass");
Console.WriteLine(mangaResponse);
ICredentialContext credential = new CredentialContext
{
UserName = "<MyAnimeList.NET UserName>",
Password = "<MyAnimeList.NET Password>"
};
var asyncAnimeSearcher = new AnimeSearchMethodsAsync(credential);
var response = await asyncAnimeSearcher.SearchAsync("Naruto");
var methods = new AnimeListMethods(credential);
var animeValues = new AnimeValues
{
AnimeStatus = AnimeStatus.Watching,
Comments = "It was a great series."
};
var responseText = methods.AddAnime(ANIME_ID, animeValues);
Console.WriteLine(responseText);
var methods = new MangaListMethods(credential);
var mangaValues = new MangaValues
{
MangaStatus = MangaStatus.Reading,
Comments = "I am planning to read this"
};
var responseText = methods.AddManga(MANGA_ID, mangaValues);
Console.WriteLine(responseText);
var asyncMangaSearcher = new MangaSearchMethodsAsync(credential);
MangaSearchResponse response = await asyncMangaSearcher.SearchDeserializedAsync("Dagashi Kashi");
Console.WriteLine(response.ToJson());
Console.WriteLine(response.ToXml());