animelist / mal-api
This package is abandoned and no longer maintained.
No replacement package was suggested.
MyAnimeList.net (un)official API
1.0.2
2016-11-27 17:52 UTC
Requires
- php: >=5.5.0
- nxnx/net-helper: ^1.0
- nxnx/spec-parser: ^1.0
- pimple/pimple: ^3.0
This package is not auto-updated.
Last update: 2022-02-01 13:03:04 UTC
README
Anime API for MyAnimeList.net written in PHP
Installation
$ composer require animelist/mal-api
Usage
Obtain anime information:
require __DIR__ . '/vendor/autoload.php'; $api = new MalApi\Api; $url = 'https://myanimelist.net/anime/1/Cowboy_Bebop'; $anime = $api->getAnime($url); echo 'Anime id: ' . $anime->getExternalId() . '<br>'; var_dump($anime);
Add and update:
require __DIR__ . '/vendor/autoload.php'; $api = new MalApi\Api; $api->setAuth('user', 'password'); $api->add(['id' => 1, 'status' => $api::STATUS_PLAN_TO_WATCH]); $api->update(['id' => 1, 'status' => $api::STATUS_WATCHING, 'episode' => 1]);
Delete:
require __DIR__ . '/vendor/autoload.php'; $api = new MalApi\Api; $api->setAuth('user', 'password'); $api->delete(1);