HummingBirdAnimeClient/src/API/Mapping/AnimeWatchingStatus.php

77 lines
2.2 KiB
PHP
Raw Normal View History

<?php declare(strict_types=1);
/**
* Hummingbird Anime List Client
*
2018-08-22 13:48:27 -04:00
* An API client for Kitsu to manage anime and manga watch lists
*
2018-10-01 11:35:51 -04:00
* PHP version 7.1
*
* @package HummingbirdAnimeClient
* @author Timothy J. Warren <tim@timshomepage.net>
2018-01-15 14:43:15 -05:00
* @copyright 2015 - 2018 Timothy J. Warren
* @license http://www.opensource.org/licenses/mit-license.html MIT License
2018-10-01 11:35:51 -04:00
* @version 4.1
* @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient
*/
namespace Aviat\AnimeClient\API\Mapping;
2018-08-22 13:43:04 -04:00
use Aviat\AnimeClient\API\Enum\AnimeWatchingStatus\{Anilist, Kitsu, Route, Title};
use Aviat\Ion\Enum;
/**
* Anime watching status mappings, among Kitsu, MAL, Page titles
* and url route segments
*/
final class AnimeWatchingStatus extends Enum {
2018-11-09 10:38:35 -05:00
public const ANILIST_TO_KITSU = [
Anilist::WATCHING => Kitsu::WATCHING,
Anilist::PLAN_TO_WATCH => Kitsu::PLAN_TO_WATCH,
Anilist::COMPLETED => Kitsu::COMPLETED,
Anilist::ON_HOLD => Kitsu::ON_HOLD,
2018-08-22 13:43:04 -04:00
Anilist::DROPPED => Kitsu::DROPPED
];
2018-08-22 13:43:04 -04:00
2018-11-09 10:38:35 -05:00
public const KITSU_TO_ANILIST = [
Kitsu::WATCHING => Anilist::WATCHING,
Kitsu::PLAN_TO_WATCH => Anilist::PLAN_TO_WATCH,
Kitsu::COMPLETED => Anilist::COMPLETED,
Kitsu::ON_HOLD => Anilist::ON_HOLD,
Kitsu::DROPPED => Anilist::DROPPED
];
2017-03-22 11:14:59 -04:00
2018-11-09 10:38:35 -05:00
public const KITSU_TO_TITLE = [
2017-03-01 22:07:51 -05:00
Kitsu::WATCHING => Title::WATCHING,
Kitsu::PLAN_TO_WATCH => Title::PLAN_TO_WATCH,
Kitsu::ON_HOLD => Title::ON_HOLD,
Kitsu::DROPPED => Title::DROPPED,
Kitsu::COMPLETED => Title::COMPLETED
];
2018-11-09 10:38:35 -05:00
public const ROUTE_TO_KITSU = [
2017-03-01 22:07:51 -05:00
Route::WATCHING => Kitsu::WATCHING,
Route::PLAN_TO_WATCH => Kitsu::PLAN_TO_WATCH,
Route::ON_HOLD => Kitsu::ON_HOLD,
Route::DROPPED => Kitsu::DROPPED,
Route::COMPLETED => Kitsu::COMPLETED
];
2018-11-09 10:38:35 -05:00
public const ROUTE_TO_TITLE = [
2017-03-01 22:07:51 -05:00
Route::ALL => Title::ALL,
Route::WATCHING => Title::WATCHING,
Route::PLAN_TO_WATCH => Title::PLAN_TO_WATCH,
Route::ON_HOLD => Title::ON_HOLD,
Route::DROPPED => Title::DROPPED,
Route::COMPLETED => Title::COMPLETED
];
2018-11-09 10:38:35 -05:00
public const TITLE_TO_ROUTE = [
2017-03-01 22:07:51 -05:00
Title::ALL => Route::ALL,
Title::WATCHING => Route::WATCHING,
Title::PLAN_TO_WATCH => Route::PLAN_TO_WATCH,
Title::ON_HOLD => Route::ON_HOLD,
Title::DROPPED => Route::DROPPED,
Title::COMPLETED => Route::COMPLETED
];
2017-03-01 22:07:51 -05:00
}