animelist / mal-api
MyAnimeList.net (un)official API
Installs: 285
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/animelist/mal-api
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);