Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

10 Commits

Repository files navigation

Java Client for MyAnimeList API (DEPRECATED)

WARNING:

MyAnimeList has disabled their API as of May 2018, therefore this Java implementation doesn't work at the moment!

Usage

Initializing the Client

MALClientclient = newMALClient("username","password");

Verify Credentials

try {
Useruser = client.verifyCredentials();
System.out.println("Verified user with id: " + user.getId());
} catch(NotAuthorizedExceptione) {
System.err.println("The provided credentials are invalid!");
}

Searching for Anime

List<Anime> animes = client.searchForAnime("Fate Kaleid");
animes.forEach(a -> System.out.println(a.getTitle()))

Searching for Manga

List<Manga> mangas = client.searchForManga("Fate Zero");
mangas.forEach(m -> System.out.println(m.getTitle()))

Fetching AnimeList

AnimeListanimeList = client.getAnimeList();
List<AnimeEntry> entries = animeList.getEntries();
entries.forEach(e -> System.out.println(e.getSeriesTitle()))

Fetching MangaList

MangaListmangaList = client.getMangaList();
List<MangaEntry> entries = mangaList.getEntries();
entries.forEach(e -> System.out.println(e.getSeriesTitle()))

Adding Anime to AnimeList

AnimeListEntryValuesvalues = newAnimeListEntryValues();
values.setStatus(AnimeListEntryStatus.WATCHING);
values.setEpisode(3);
client.addToAnimeList(anime,values);

Adding Manga to MangaList

MangaListEntryValuesvalues = newMangaListEntryValues();
values.setStatus(MangaListEntryStatus.READING);
values.setChapter(14);
values.setVolume(1);
client.addToMangaList(manga,values);

Updating AnimeList

AnimeListEntryValuesvalues = AnimeListEntryValues.from(entry);
values.setStatus(AnimeListEntryStatus.COMPLETED);
client.updateAnimeList(entry,values);

Updating MangaList

MangaListEntryValuesvalues = MangaListEntryValues.from(entry);
values.setStatus(MangaListEntryStatus.COMPLETED);
client.updateMangaList(entry,values);

Removing Anime from AnimeList

client.removeFromAnimeList(entry);

Removing Manga from MangaList

client.removeFromMangaList(entry);

Maven Dependency

<dependency>
<groupId>net.beardbot</groupId>
<artifactId>mal-api</artifactId>
<version>1.0.1</version>
</dependency>

Releases

Packages

Contributors

Languages