Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Aug 31, 2015
Nov 4, 2016

Welcome to MyAnimeListSharp

The "Easiest" way to search Anime/Manga

Overview

Facade makes the coding "Simple" and "Easy" to use.

There is a 1:1 matching between the Web API and the source code. Image of Facade

These four facade classes are the only classes you need to deal with.

Asynchronous versions of facades are added in Version 1.3

####The difference between Synchronous and Asynchronous version: SearchMethods is separated into two different files (subject to change in later version):

  1. MangaSearchMethodsAsync.cs
  2. AnimeListMethodsAsync.cs Image of Comparison

###Source is located under Project.MyAnimeList/Project.MyAnimeList/Project.MyAnimeList/Facade/Async

How to Install

Nuget

Install-Package MyAnimeListSharp

Examples

Search Manga

	// 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");

Search Manga Asynchronously: New* in Version 1.3

	ICredentialContext credential = new CredentialContext
	{
		UserName = "<MyAnimeList.NET UserName>",
		Password = "<MyAnimeList.NET Password>"
	};
	
	var asyncMangaSearcher = new MangaSearchMethodsAsync(credential);
	var response = await asyncMangaSearcher.SearchAsync("Dagashi Kashi");

Search Anime

	// 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);

Search Anime Asynchronously: New* in Version 1.3

	ICredentialContext credential = new CredentialContext
	{
		UserName = "<MyAnimeList.NET UserName>",
		Password = "<MyAnimeList.NET Password>"
	};

	var asyncAnimeSearcher = new AnimeSearchMethodsAsync(credential);
	var response = await asyncAnimeSearcher.SearchAsync("Naruto");

Add Anime

	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);

Add Manga

	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);

Convert Response object to XML/JSON strings: New* in Version 1.3.1

	var asyncMangaSearcher = new MangaSearchMethodsAsync(credential);
	MangaSearchResponse response = await asyncMangaSearcher.SearchDeserializedAsync("Dagashi Kashi");

	Console.WriteLine(response.ToJson());
	Console.WriteLine(response.ToXml());