https://github.com/anime-db/my-anime-list-browser-bundle
MyAnimeList.net API browser
https://github.com/anime-db/my-anime-list-browser-bundle
browser my-anime-list php plugin
Last synced: about 2 months ago
JSON representation
MyAnimeList.net API browser
- Host: GitHub
- URL: https://github.com/anime-db/my-anime-list-browser-bundle
- Owner: anime-db
- License: gpl-3.0
- Created: 2017-07-19T15:35:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-20T21:09:16.000Z (almost 8 years ago)
- Last Synced: 2025-02-14T21:54:58.727Z (4 months ago)
- Topics: browser, my-anime-list, php, plugin
- Language: PHP
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://myanimelist.com)
[](https://packagist.org/packages/anime-db/my-anime-list-browser-bundle)
[](https://packagist.org/packages/anime-db/my-anime-list-browser-bundle)
[](https://travis-ci.org/anime-db/my-anime-list-browser-bundle)
[](https://coveralls.io/github/anime-db/my-anime-list-browser-bundle?branch=master)
[](https://scrutinizer-ci.com/g/anime-db/my-anime-list-browser-bundle/?branch=master)
[](https://insight.sensiolabs.com/projects/199d5653-9372-48d2-8da7-d62aaa1d2ea8)
[](https://styleci.io/repos/97733243)
[](https://github.com/anime-db/my-anime-list-browser-bundle)MyAnimeList.net API browser
===========================Installation
------------Pretty simple with [Composer](http://packagist.org), run:
```sh
composer require anime-db/my-anime-list-browser-bundle
```Add AnimeDbWorldArtBrowserBundle to your application kernel
```php
// app/appKernel.phppublic function registerBundles()
{
$bundles = array(
// ...
new AnimeDb\Bundle\MyAnimeListBrowserBundle\AnimeDbMyAnimeListBrowserBundle(),
);
}
```Configuration
-------------```yml
anime_db_my_anime_list_browser:
# Host name
# As a default used 'http://myanimelist.net'
host: 'http://myanimelist.net'# HTTP User-Agent
# No default value
client: 'My Custom Bot 1.0'
```Usage
-----First get browser
```php
$browser = $this->get('anime_db.my_anime_list.browser');
```Get info for anime [Cowboy Bebop](https://myanimelist.net/anime/1/Cowboy_Bebop):
```php
$content = $browser->get('/anime/1');
```Catch exceptions
```php
use AnimeDb\Bundle\MyAnimeListBrowserBundle\Exception\BannedException;
use AnimeDb\Bundle\MyAnimeListBrowserBundle\Exception\NotFoundException;try {
$content = $browser->get('/anime/1');
} catch (BannedException $e) {
// you are banned
} catch (NotFoundException $e) {
// page not found
} catch (\Exception $e) {
// other exceptions
}
```You can customize request options. See [Guzzle Documentation](http://docs.guzzlephp.org/en/stable/request-options.html).
License
-------This bundle is under the [GPL v3 license](http://opensource.org/licenses/GPL-3.0).
See the complete license in the file: LICENSE