Version 5.1 - All the GraphQL #32
@ -17,10 +17,10 @@
|
||||
namespace Aviat\AnimeClient\API\MAL;
|
||||
|
||||
use Amp\Artax\Request;
|
||||
use Aviat\AnimeClient\API\MAL as M;
|
||||
use Aviat\AnimeClient\API\MAL\ListItem;
|
||||
use Aviat\AnimeClient\API\MAL\Transformer\AnimeListTransformer;
|
||||
use Aviat\AnimeClient\API\XML;
|
||||
use Aviat\AnimeClient\API\Mapping\AnimeWatchingStatus;
|
||||
use Aviat\Ion\Di\ContainerAware;
|
||||
|
||||
/**
|
||||
@ -61,7 +61,7 @@ class Model {
|
||||
$createData = [
|
||||
'id' => $data['id'],
|
||||
'data' => [
|
||||
'status' => M::KITSU_MAL_WATCHING_STATUS_MAP[$data['status']]
|
||||
'status' => AnimeWatchingStatus::KITSU_TO_MAL[$data['status']]
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -25,22 +25,14 @@ use Aviat\AnimeClient\API\Enum\AnimeWatchingStatus\{
|
||||
use Aviat\Ion\Enum;
|
||||
|
||||
class AnimeWatchingStatus extends Enum {
|
||||
const MAL_TO_KITSU = [
|
||||
const KITSU_TO_MAL = [
|
||||
Kitsu::WATCHING => MAL::WATCHING,
|
||||
Kitsu::PLAN_TO_WATCH => MAL::PLAN_TO_WATCH,
|
||||
Kitsu::COMPLETED => MAL::COMPLETED,
|
||||
Kitsu::ON_HOLD => MAL::ON_HOLD,
|
||||
Kitsu::DROPPED => MAL::DROPPED
|
||||
];
|
||||
|
||||
const KITSU_TO_MAL = [
|
||||
MAL::WATCHING => Kitsu::WATCHING,
|
||||
MAL::PLAN_TO_WATCH => Kitsu::PLAN_TO_WATCH,
|
||||
MAL::COMPLETED => Kitsu::COMPLETED,
|
||||
MAL::ON_HOLD => Kitsu::ON_HOLD,
|
||||
MAL::DROPPED => Kitsu::DROPPED
|
||||
];
|
||||
|
||||
|
||||
const KITSU_TO_TITLE = [
|
||||
'all' => Title::ALL,
|
||||
Kitsu::WATCHING => Title::WATCHING,
|
||||
@ -50,6 +42,14 @@ class AnimeWatchingStatus extends Enum {
|
||||
Kitsu::COMPLETED => Title::COMPLETED
|
||||
];
|
||||
|
||||
const MAL_TO_KITSU = [
|
||||
MAL::WATCHING => Kitsu::WATCHING,
|
||||
MAL::PLAN_TO_WATCH => Kitsu::PLAN_TO_WATCH,
|
||||
MAL::COMPLETED => Kitsu::COMPLETED,
|
||||
MAL::ON_HOLD => Kitsu::ON_HOLD,
|
||||
MAL::DROPPED => Kitsu::DROPPED
|
||||
];
|
||||
|
||||
const ROUTE_TO_KITSU = [
|
||||
Route::WATCHING => Kitsu::WATCHING,
|
||||
Route::PLAN_TO_WATCH => Kitsu::PLAN_TO_WATCH,
|
||||
|
Loading…
Reference in New Issue
Block a user