HummingBirdAnimeClient/src/AnimeClient/Types/AnimeListItem.php

69 lines
1.3 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
*
* PHP version 7.4
*
* @package HummingbirdAnimeClient
* @author Timothy J. Warren <tim@timshomepage.net>
2020-01-08 15:39:49 -05:00
* @copyright 2015 - 2020 Timothy J. Warren
* @license http://www.opensource.org/licenses/mit-license.html MIT License
2020-08-04 09:30:21 -04:00
* @version 5.1
* @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient
*/
namespace Aviat\AnimeClient\Types;
/**
* Type representing an anime watch list item
*/
final class AnimeListItem extends AbstractType {
2020-04-28 12:24:12 -04:00
public ?string $id;
2020-04-28 12:24:12 -04:00
public ?string $mal_id;
/**
* @var string
*/
public $anilist_item_id;
2020-04-28 12:24:12 -04:00
public array $episodes = [
'length' => 0,
'total' => 0,
'watched' => '',
];
2020-04-28 12:24:12 -04:00
public array $airing = [
'status' => '',
'started' => '',
'ended' => '',
];
2020-04-28 12:24:12 -04:00
public ?Anime $anime;
2020-04-28 12:24:12 -04:00
public ?string $notes;
2020-04-28 12:24:12 -04:00
public bool $private = FALSE;
2020-04-28 12:24:12 -04:00
public bool $rewatching = FALSE;
2020-04-28 12:24:12 -04:00
public int $rewatched = 0;
/**
2020-04-28 12:24:12 -04:00
* @var string|int
*/
2020-04-28 12:24:12 -04:00
public $user_rating = '';
/**
* One of Aviat\AnimeClient\API\Enum\AnimeWatchingStatus
*/
2020-12-10 15:59:37 -05:00
public string $watching_status;
public function setAnime($anime): void
{
$this->anime = Anime::from($anime);
}
}