Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Documentation

Irfan edited this page Jul 4, 2019 · 6 revisions

This API is beta and PoC.

Getting Started

composer require jikan-me/jikan-auth

Initialization

require_once __DIR__ . '/vendor/autoload.php';

$jikan = new \JikanAuth\Client\MalClient();

You can pass your own instance of Guzzle in MalClient, incase you're wanting to proxy your request.

Methods

Login

$jikan->login(
    new \JikanAuth\Request\LoginRequest(
        'username',
        'password'
    )
);

Anime List : Add

Add an anime to your list

$jikan->addAnime(
    new \JikanAuth\Request\Anime\AnimeAddRequest(21, 1, 1, 1)
);

Arguments respectively: anime ID (int), status (int), score (int) [1-10], episodes watched (int)


Anime List : Edit

Edit an anime that's already on your list. You can use this to update the episode count for an anime.

$jikan->editAnime(
    new \JikanAuth\Request\Anime\AnimeEditRequest(21, 1, 1, 5)
);

Arguments respectively: anime ID (int), status (int), score (int) [1-10], episodes watched (int)


Anime List : Delete

Remove an anime from your list.

$jikan->deleteAnime(
    new \JikanAuth\Request\Anime\AnimeDeleteRequest(21)
);

Arguments respectively: anime ID (int)


Manga List : Add

Add a manga to your list

$jikan->addManga(
    new \JikanAuth\Request\Manga\MangaAddRequest(1, 1, 1, 1, 1)
);

Arguments respectively: manga ID (int), status (int), score (int) [1-10], volumes read (int), chapters read (int)


Manga List : Edit

Edit a manga that's already on your list. You can use this to update the chapter/volume count for a manga.

$jikan->editManga(
    new \JikanAuth\Request\Manga\MangaEditRequest(1, 1, 1, 1, 5)
);

Arguments respectively: manga ID (int), status (int), score (int) [1-10], volumes read (int), chapters read (int)


Manga List : Delete

Remove a manga from your list.

$jikan->deleteManga(
    new \JikanAuth\Request\Manga\MangaDeleteRequest(1)
);

Arguments respectively: manga ID (int)