Version 5.1 - All the GraphQL #32
@ -1,69 +0,0 @@
|
|||||||
<?php declare(strict_types=1);
|
|
||||||
/**
|
|
||||||
* Hummingbird Anime List Client
|
|
||||||
*
|
|
||||||
* An API client for Kitsu and MyAnimeList to manage anime and manga watch lists
|
|
||||||
*
|
|
||||||
* PHP version 7
|
|
||||||
*
|
|
||||||
* @package HummingbirdAnimeClient
|
|
||||||
* @author Timothy J. Warren <tim@timshomepage.net>
|
|
||||||
* @copyright 2015 - 2017 Timothy J. Warren
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
||||||
* @version 4.0
|
|
||||||
* @link https://github.com/timw4mail/HummingBirdAnimeClient
|
|
||||||
*/
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| JS Folder
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The folder where javascript files exist, in relation to the document root
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'js_root' => 'js/',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| JS Groups
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Config array for javascript files to concatenate and minify
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'groups' => [
|
|
||||||
'base' => [
|
|
||||||
'base/classList.js',
|
|
||||||
'base/AnimeClient.js',
|
|
||||||
],
|
|
||||||
'event' => [
|
|
||||||
'base/events.js',
|
|
||||||
],
|
|
||||||
'table' => [
|
|
||||||
'base/sort_tables.js',
|
|
||||||
],
|
|
||||||
'table_edit' => [
|
|
||||||
'base/sort_tables.js',
|
|
||||||
'anime_edit.js',
|
|
||||||
'manga_edit.js',
|
|
||||||
],
|
|
||||||
'edit' => [
|
|
||||||
'anime_edit.js',
|
|
||||||
'manga_edit.js',
|
|
||||||
],
|
|
||||||
'anime_collection' => [
|
|
||||||
'anime_search_results.js',
|
|
||||||
'anime_collection.js',
|
|
||||||
],
|
|
||||||
'manga_collection' => [
|
|
||||||
'manga_search_results.js',
|
|
||||||
'manga_collection.js',
|
|
||||||
],
|
|
||||||
]
|
|
||||||
];
|
|
||||||
// End of minify_config.php
|
|
@ -46,7 +46,8 @@ final class MangaTransformer extends AbstractTransformer {
|
|||||||
sort($genres);
|
sort($genres);
|
||||||
|
|
||||||
$title = $item['canonicalTitle'];
|
$title = $item['canonicalTitle'];
|
||||||
$titles = array_unique(array_diff($item['titles'], [$title]));
|
$rawTitles = array_values($item['titles']);
|
||||||
|
$titles = array_unique(array_diff($rawTitles, [$title]));
|
||||||
|
|
||||||
return new MangaPage([
|
return new MangaPage([
|
||||||
'id' => $item['id'],
|
'id' => $item['id'],
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
<?php return Aviat\AnimeClient\Types\MangaPage::__set_state(array(
|
<?php return Aviat\AnimeClient\Types\MangaPage::__set_state(array(
|
||||||
'chapter_count' => '-',
|
'chapter_count' => '-',
|
||||||
'cover_image' => 'https://media.kitsu.io/manga/poster_images/20286/small.jpg?1434293999',
|
'cover_image' => 'https://media.kitsu.io/manga/poster_images/20286/small.jpg?1434293999',
|
||||||
'en_title' => NULL,
|
|
||||||
'genres' =>
|
'genres' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'id' => '20286',
|
'id' => '20286',
|
||||||
'jp_title' => 'Bokura wa Minna Kawaisou',
|
|
||||||
'manga_type' => 'manga',
|
'manga_type' => 'manga',
|
||||||
'synopsis' => 'Usa, a high-school student aspiring to begin a bachelor lifestyle, moves into a new apartment only to discover that he not only shares a room with a perverted roommate that has an obsession for underaged girls, but also that another girl, Ritsu, a love-at-first-sight, is living in the same building as well!
|
'synopsis' => 'Usa, a high-school student aspiring to begin a bachelor lifestyle, moves into a new apartment only to discover that he not only shares a room with a perverted roommate that has an obsession for underaged girls, but also that another girl, Ritsu, a love-at-first-sight, is living in the same building as well!
|
||||||
(Source: Kirei Cake)',
|
(Source: Kirei Cake)',
|
||||||
'title' => 'Bokura wa Minna Kawaisou',
|
'title' => 'Bokura wa Minna Kawaisou',
|
||||||
|
'titles' =>
|
||||||
|
array (
|
||||||
|
0 => NULL,
|
||||||
|
),
|
||||||
'url' => 'https://kitsu.io/manga/bokura-wa-minna-kawaisou',
|
'url' => 'https://kitsu.io/manga/bokura-wa-minna-kawaisou',
|
||||||
'volume_count' => '-',
|
'volume_count' => '-',
|
||||||
));
|
));
|
||||||
|
@ -51,8 +51,6 @@ class AnimeClientTest extends AnimeClientTestCase
|
|||||||
|
|
||||||
$toml = arrayToToml($arr);
|
$toml = arrayToToml($arr);
|
||||||
|
|
||||||
echo $toml . "\n";
|
|
||||||
|
|
||||||
$parsedArray = tomlToArray($toml);
|
$parsedArray = tomlToArray($toml);
|
||||||
|
|
||||||
$this->assertEquals($arr, $parsedArray);
|
$this->assertEquals($arr, $parsedArray);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"synopsis": "Usa, a high-school student aspiring to begin a bachelor lifestyle, moves into a new apartment only to discover that he not only shares a room with a perverted roommate that has an obsession for underaged girls, but also that another girl, Ritsu, a love-at-first-sight, is living in the same building as well!\n(Source: Kirei Cake)",
|
"synopsis": "Usa, a high-school student aspiring to begin a bachelor lifestyle, moves into a new apartment only to discover that he not only shares a room with a perverted roommate that has an obsession for underaged girls, but also that another girl, Ritsu, a love-at-first-sight, is living in the same building as well!\n(Source: Kirei Cake)",
|
||||||
"coverImageTopOffset": 40,
|
"coverImageTopOffset": 40,
|
||||||
"titles": {
|
"titles": {
|
||||||
"en": null,
|
"en_us": null,
|
||||||
"en_jp": "Bokura wa Minna Kawaisou"
|
"en_jp": "Bokura wa Minna Kawaisou"
|
||||||
},
|
},
|
||||||
"canonicalTitle": "Bokura wa Minna Kawaisou",
|
"canonicalTitle": "Bokura wa Minna Kawaisou",
|
||||||
|
Loading…
Reference in New Issue
Block a user