diff --git a/.gitignore b/.gitignore index bf12543..57ac55d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ composer.lock vendor -.idea \ No newline at end of file +.idea +/.php-cs-fixer.cache +/.phpunit.result.cache diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..164eb42 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,88 @@ +setFinder( + (new PhpCsFixer\Finder()) + ->in([ + getcwd().'/src', + getcwd().'/tests', + ]) + ->exclude([ + 'var', + 'migrations/*', + ]) + ) + ->setRiskyAllowed(true) + ->setRules([ + '@PSR12' => true, + '@Symfony' => true, + 'align_multiline_comment' => true, + 'array_indentation' => true, + 'blank_line_after_opening_tag' => false, + 'combine_consecutive_issets' => true, + 'combine_consecutive_unsets' => true, + 'comment_to_phpdoc' => true, + 'date_time_immutable' => true, + 'declare_strict_types' => true, + 'doctrine_annotation_array_assignment' => true, + 'doctrine_annotation_braces' => true, + 'doctrine_annotation_indentation' => true, + 'doctrine_annotation_spaces' => true, + 'escape_implicit_backslashes' => true, + 'explicit_indirect_variable' => true, + 'explicit_string_variable' => true, + 'final_internal_class' => false, + 'general_phpdoc_annotation_remove' => false, + 'header_comment' => false, + 'heredoc_to_nowdoc' => false, + 'linebreak_after_opening_tag' => false, + 'list_syntax' => ['syntax' => 'short'], + 'mb_str_functions' => true, + 'method_chaining_indentation' => true, + 'multiline_comment_opening_closing' => true, + 'multiline_whitespace_before_semicolons' => true, + 'native_function_invocation' => false, + 'no_alias_functions' => true, + 'no_blank_lines_before_namespace' => false, + 'no_extra_blank_lines' => true, + 'no_null_property_initialization' => true, + 'no_php4_constructor' => true, + 'no_superfluous_elseif' => true, + 'no_superfluous_phpdoc_tags' => false, + 'no_unreachable_default_argument_value' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'not_operator_with_space' => false, + 'not_operator_with_successor_space' => false, + 'ordered_class_elements' => false, + 'php_unit_dedicate_assert' => false, + 'php_unit_expectation' => false, + 'php_unit_method_casing' => ['case' =>'snake_case'], + 'php_unit_mock' => false, + 'php_unit_namespaced' => false, + 'php_unit_no_expectation_annotation' => false, + 'php_unit_set_up_tear_down_visibility' => true, + 'php_unit_strict' => false, + 'php_unit_test_annotation' => false, + 'php_unit_test_class_requires_covers' => false, + 'phpdoc_add_missing_param_annotation' => true, + 'phpdoc_order' => true, + 'phpdoc_order_by_value' => true, + 'phpdoc_to_return_type' => false, + 'phpdoc_to_comment' => false, + 'phpdoc_types_order' => false, + 'pow_to_exponentiation' => true, + 'psr_autoloading' => true, + 'random_api_migration' => false, + 'simplified_null_return' => false, + 'single_line_throw' => false, + 'static_lambda' => false, + 'strict_comparison' => true, + 'strict_param' => true, + 'string_line_ending' => true, + 'ternary_to_null_coalescing' => true, + 'void_return' => true, + ]) + ; \ No newline at end of file diff --git a/README.md b/README.md index c6d7653..b7c4613 100644 --- a/README.md +++ b/README.md @@ -13,30 +13,23 @@ composer require jikan/jikan-php # Getting Started -## Instantiate the client - -```php -$jikan = new \Jikan\JikanPHP\JikanPHPClient(); +## Require your client implementation +For example +```sh + composer require php-http/guzzle7-adapter ``` -## Use it to request MAL data +## Instantiate the client ```php -$request = new \JikanPHP\Request\Anime\AnimeRequest(1); -$anime = $jikan->getAnime($request); +$jikan = Client::create(); ``` -All responses are converted to PHP classes. - -# Customize guzzle - +## Use it to request MAL data +Check the client for the correct type hint ```php -$guzzle = new GuzzleHttp\Client(); -// Add middlewares to the client, or configs -$jikan = new \Jikan\JikanPHP\JikanPHPClient($guzzle); -// The configured client is now used internally +/** @var AnimeIdGetResponse200 $anime */ +$anime = $jikan->getAnimeById(5114); ``` -Using the client should be self-explanatory since it is fully type-hinted. - If you experience any issues, open an issue, or even better a Pull Request! diff --git a/composer.json b/composer.json index 68a67dc..001b26c 100644 --- a/composer.json +++ b/composer.json @@ -6,40 +6,22 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^7.2|^8", - "doctrine/annotations": "~1", - "guzzlehttp/guzzle": "^6.3", - "jms/serializer": "^1.13|^2.0", - "symfony/yaml": "~2.1|^3.0|^4.0", - "ext-json": "*" + "php": "^8", + "ext-json": "*", + "jane-php/open-api-runtime": "^7.3" }, "require-dev": { - "composer/composer": "^1.8", - "funkyproject/reflection-file": "^0.1.0", - "jakub-onderka/php-parallel-lint": "^1.0", - "jikan/jikanphp-fixtures": "dev-master", - "php-vcr/php-vcr": "~1.3.2", - "php-vcr/phpunit-testlistener-vcr": "^3.0", - "phpro/grumphp": "^0.14.3", - "phpunit/phpunit": "^6.3", - "squizlabs/php_codesniffer": "^3.4", - "symfony/console": "^4.2", - "symfony/finder": "^4.2", - "symfony/var-dumper": "^4.2" + "friendsofphp/php-cs-fixer": "^3.11", + "jane-php/open-api-3": "^7.3", + "php-http/guzzle7-adapter": "^1.0", + "phpro/grumphp": "^1.13", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "^3.7" }, "autoload": { "psr-4": { "Jikan\\JikanPHP\\": [ "src" - ], - "JikanPHP\\Model\\": [ - "model" - ], - "JikanPHP\\Request\\": [ - "request" - ], - "JikanPHP\\Helper\\": [ - "helper" ] } }, diff --git a/config/jikan-openapi.json b/config/jikan-openapi.json new file mode 100644 index 0000000..3731e4f --- /dev/null +++ b/config/jikan-openapi.json @@ -0,0 +1,8783 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Jikan API", + "description": "[Jikan](https://jikan.moe) is an **Unofficial** MyAnimeList API.\nIt scrapes the website to satisfy the need for a complete API - which MyAnimeList lacks.\n\n# Information\n\nāš” Jikan is powered by it's awesome backers - šŸ™ [Become a backer](https://www.patreon.com/jikan)\n\n## Rate Limiting\n\n| Duration | Requests |\n|----|----|\n| Monthly | **Unlimited** |\n| Per Minute | 60 requests |\n| Per Second | 3 requests |\n\n\n## JSON Notes\n- Any property (except arrays or objects) whose value does not exist or is undetermined, will be `null`.\n- Any array or object property whose value does not exist or is undetermined, will be empty.\n- Any `score` property whose value does not exist or is undetermined, will be `0`.\n- All dates and timestamps are returned in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format and in UTC timezone\n\n## Caching\nBy **CACHING**, we refer to the data parsed from MyAnimeList which is stored temporarily on our servers to provide better API performance.\n\nAll requests, by default are cached for **24 hours** except the following endpoints which have their own unique cache **Time To Live**. \n\n| Request | TTL |\n| ---- | ---- |\n| All (Default) | 24 hours |\n\n\nThe following response headers will detail cache information.\n\n| Header | Remarks |\n| ---- | ---- |\n| `Expires` | Cache expiry date |\n| `Last-Modified` | Cache set date |\n| `X-Request-Fingerprint` | Unique request fingerprint |\n\n\nNote: Caching headers will only be available on single resource requests and their child endpoints. e.g `/anime/1`, `/anime/1/relations`. \nThey won't be available on pages which perform queries, like /anime, or /top/anime, etc.\n\n## Allowed HTTP(s) requests\n\n**Jikan REST API does not provide authenticated requests for MyAnimeList.** This means you can not use it to update your anime/manga list.\nOnly GET requests are supported which return READ-ONLY data.\n\n## HTTP Responses\n\n| HTTP Status | Remarks |\n| ---- | ---- |\n| `200 - OK` | The request was successful |\n| `304 - Not Modified` | You have the latest data (Cache Validation response) |\n| `400 - Bad Request` | You've made an invalid request. Recheck documentation |\n| `404 - Not Found` | The resource was not found or MyAnimeList responded with a `404` |\n| `405 - Method Not Allowed` | Requested Method is not supported for resource. Only `GET` requests are allowed |\n| `429 - Too Many Request` | You are being rate limited by Jikan or MyAnimeList is rate-limiting our servers (specified in the error response) |\n| `500 - Internal Server Error` | Something is not working on our end. If you see an error response with a `report_url` URL, please click on it to open an auto-generated GitHub issue |\n| `503 - Service Unavailable` | The service has broke. |\n\n\n## JSON Error Response\n\n```json\n {\n \"status\": 404,\n \"type\": \"BadResponseException\",\n \"message\": \"Resource does not exist\",\n \"error\": \"Something Happened\",\n \"report_url\": \"https://github.com...\"\n }\n```\n\n| Property | Remarks |\n| ---- | ---- |\n| `status` | Returned HTTP Status Code |\n| `type` | Thrown Exception |\n| `message` | Human-readable error message |\n| `error` | Error response and trace from the API |\n| `report_url` | Clicking this would redirect you to a generated GitHub issue. ā„¹ It's only returned on a parser error. |\n\n\n## Cache Validation\n\n- All requests return a `ETag` header which is an MD5 hash of the response\n- You can use this hash to verify if there's new or updated content by suppliying it as the value for the `If-None-Match` in your next request header\n- You will get a HTTP `304 - Not Modified` response if the content has not changed\n- If the content has changed, you'll get a HTTP `200 - OK` response with the updated JSON response\n\n![Cache Validation](https://i.imgur.com/925ozVn.png 'Cache Validation')\n\n## Disclaimer\n\n- Jikan is not affiliated with MyAnimeList.net.\n- Jikan is a free, open-source API. Please use it responsibly.\n\n----\n\nBy using the API, you are agreeing to Jikan's [terms of use](https://jikan.moe/terms) policy.\n\n[v3 Documentation](https://jikan.docs.apiary.io/) - [Wrappers/SDKs](https://github.com/jikan-me/jikan#wrappers) - [Report an issue](https://github.com/jikan-me/jikan-rest/issues/new) - [Host your own server](https://github.com/jikan-me/jikan-rest)", + "termsOfService": "https://jikan.moe/terms", + "contact": { + "name": "API Support (Discord)", + "url": "http://discord.jikan.moe" + }, + "license": { + "name": "MIT", + "url": "https://github.com/jikan-me/jikan-rest/blob/master/LICENSE" + }, + "version": "4.0.0" + }, + "servers": [ + { + "url": "https://api.jikan.moe/v4", + "description": "Jikan REST API Beta" + } + ], + "paths": { + "/anime/{id}/full": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeFullById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns complete anime resource data", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/anime_full" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/anime" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/characters": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeCharacters", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime characters resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_characters" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/staff": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeStaff", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime staff resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_staff" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/episodes": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeEpisodes", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns a list of anime episodes", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_episodes" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/episodes/{episode}": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeEpisodeById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "episode", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns a single anime episode resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/anime_episode" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/news": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeNews", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns a list of news articles related to the entry", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_news" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/forum": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeForum", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter topics", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "episode", + "other" + ] + } + } + ], + "responses": { + "200": { + "description": "Returns a list of forum topics related to the entry", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/forum" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/videos": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeVideos", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns videos related to the entry", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_videos" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/videos/episodes": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeVideosEpisodes", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns episode videos related to the entry", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_videos_episodes" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/pictures": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimePictures", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns pictures related to the entry", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pictures_variants" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/statistics": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeStatistics", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_statistics" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/moreinfo": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeMoreInfo", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/moreinfo" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/recommendations": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeRecommendations", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime recommendations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/entry_recommendations" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/userupdates": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeUserUpdates", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns a list of users who have added/updated/removed the entry on their list", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_userupdates" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/reviews": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeReviews", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns anime reviews", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_reviews" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/relations": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeRelations", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime relations", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/relation" + } + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/anime/{id}/themes": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeThemes", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime themes", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_themes" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/external": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeExternal", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime external links", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_links" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime/{id}/streaming": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeStreaming", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime streaming links", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_links" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/characters/{id}/full": { + "get": { + "tags": [ + "characters" + ], + "operationId": "getCharacterFullById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns complete character resource data", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/character_full" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/characters/{id}": { + "get": { + "tags": [ + "characters" + ], + "operationId": "getCharacterById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns character resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/character" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/characters/{id}/anime": { + "get": { + "tags": [ + "characters" + ], + "operationId": "getCharacterAnime", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime that character is in", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/character_anime" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/characters/{id}/manga": { + "get": { + "tags": [ + "characters" + ], + "operationId": "getCharacterManga", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns manga that character is in", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/character_manga" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/characters/{id}/voices": { + "get": { + "tags": [ + "characters" + ], + "operationId": "getCharacterVoiceActors", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns the character's voice actors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/character_voice_actors" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/characters/{id}/pictures": { + "get": { + "tags": [ + "characters" + ], + "operationId": "getCharacterPictures", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns pictures related to the entry", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/character_pictures" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/clubs/{id}": { + "get": { + "tags": [ + "clubs" + ], + "operationId": "getClubsById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns Club Resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/club" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/clubs/{id}/members": { + "get": { + "tags": [ + "clubs" + ], + "operationId": "getClubMembers", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns Club Members Resource", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "$ref": "#/components/schemas/club_member" + } + ] + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/clubs/{id}/staff": { + "get": { + "tags": [ + "clubs" + ], + "operationId": "getClubStaff", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns Club Staff", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/club_staff" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/clubs/{id}/relations": { + "get": { + "tags": [ + "clubs" + ], + "operationId": "getClubRelations", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns Club Relations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/club_relations" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/genres/anime": { + "get": { + "tags": [ + "genres" + ], + "operationId": "getAnimeGenres", + "parameters": [ + { + "name": "filter", + "in": "query", + "schema": { + "$ref": "#/components/schemas/genre_query_filter" + } + } + ], + "responses": { + "200": { + "description": "Returns entry genres, explicit_genres, themes and demographics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genres" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/genres/manga": { + "get": { + "tags": [ + "genres" + ], + "operationId": "getMangaGenres", + "parameters": [ + { + "name": "filter", + "in": "query", + "schema": { + "$ref": "#/components/schemas/genre_query_filter" + } + } + ], + "responses": { + "200": { + "description": "Returns entry genres, explicit_genres, themes and demographics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genres" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/magazines": { + "get": { + "tags": [ + "magazines" + ], + "operationId": "getMagazines", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "order_by", + "in": "query", + "schema": { + "$ref": "#/components/schemas/magazines_query_orderby" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "$ref": "#/components/schemas/search_query_sort" + } + }, + { + "name": "letter", + "in": "query", + "description": "Return entries starting with the given letter", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns magazines collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/magazines" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/full": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaFullById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns complete manga resource data", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/manga_full" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns pictures related to the entry", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/manga" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/characters": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaCharacters", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns manga characters resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/manga_characters" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/news": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaNews", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns a list of manga news topics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/manga_news" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/forum": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaTopics", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter topics", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "episode", + "other" + ] + } + } + ], + "responses": { + "200": { + "description": "Returns a list of manga forum topics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/forum" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/pictures": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaPictures", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns a list of manga pictures", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/manga_pictures" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/statistics": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaStatistics", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns anime statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/manga_statistics" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/moreinfo": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaMoreInfo", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns manga moreinfo", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/moreinfo" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/recommendations": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaRecommendations", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns manga recommendations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/entry_recommendations" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/userupdates": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaUserUpdates", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns manga user updates", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/manga_userupdates" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/reviews": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaReviews", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns manga reviews", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/manga_reviews" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/relations": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaRelations", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns manga relations", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/relation" + } + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga/{id}/external": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaExternal", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns manga external links", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_links" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/people/{id}/full": { + "get": { + "tags": [ + "people" + ], + "operationId": "getPersonFullById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns complete character resource data", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/person_full" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/people/{id}": { + "get": { + "tags": [ + "people" + ], + "operationId": "getPersonById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns pictures related to the entry", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/person" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/people/{id}/anime": { + "get": { + "tags": [ + "people" + ], + "operationId": "getPersonAnime", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns person's anime staff positions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person_anime" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/people/{id}/voices": { + "get": { + "tags": [ + "people" + ], + "operationId": "getPersonVoices", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns person's voice acting roles", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person_voice_acting_roles" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/people/{id}/manga": { + "get": { + "tags": [ + "people" + ], + "operationId": "getPersonManga", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns person's published manga works", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person_manga" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/people/{id}/pictures": { + "get": { + "tags": [ + "people" + ], + "operationId": "getPersonPictures", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns a list of pictures of the person", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/person_pictures" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/producers/{id}": { + "get": { + "tags": [ + "producers" + ], + "operationId": "getProducerById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns producer resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/producer" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/producers/{id}/full": { + "get": { + "tags": [ + "producers" + ], + "operationId": "getProducerFullById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns producer resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/producer_full" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/producers/{id}/external": { + "get": { + "tags": [ + "producers" + ], + "operationId": "getProducerExternal", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns producer's external links", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_links" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/random/anime": { + "get": { + "tags": [ + "random" + ], + "operationId": "getRandomAnime", + "responses": { + "200": { + "description": "Returns a random anime resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/anime" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/random/manga": { + "get": { + "tags": [ + "random" + ], + "operationId": "getRandomManga", + "responses": { + "200": { + "description": "Returns a random manga resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/manga" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/random/characters": { + "get": { + "tags": [ + "random" + ], + "operationId": "getRandomCharacters", + "responses": { + "200": { + "description": "Returns a random character resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/character" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/random/people": { + "get": { + "tags": [ + "random" + ], + "operationId": "getRandomPeople", + "responses": { + "200": { + "description": "Returns a random person resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/person" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/random/users": { + "get": { + "tags": [ + "random" + ], + "operationId": "getRandomUsers", + "responses": { + "200": { + "description": "Returns a random user profile resource", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/user_profile" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/recommendations/anime": { + "get": { + "tags": [ + "recommendations" + ], + "operationId": "getRecentAnimeRecommendations", + "parameters": [ + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns recent anime recommendations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/recommendations" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/recommendations/manga": { + "get": { + "tags": [ + "recommendations" + ], + "operationId": "getRecentMangaRecommendations", + "parameters": [ + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns recent manga recommendations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/recommendations" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/reviews/anime": { + "get": { + "tags": [ + "reviews" + ], + "operationId": "getRecentAnimeReviews", + "parameters": [ + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns recent anime reviews", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/reviews/manga": { + "get": { + "tags": [ + "reviews" + ], + "operationId": "getRecentMangaReviews", + "parameters": [ + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns recent manga reviews", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/schedules": { + "get": { + "tags": [ + "schedules" + ], + "operationId": "getSchedules", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "name": "filter", + "in": "query", + "description": "Filter by day", + "required": false, + "schema": { + "type": "string", + "enum": [ + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "unknown", + "other" + ] + } + }, + { + "name": "kids", + "in": "query", + "description": "When supplied, it will filter entries with the `Kids` Genre Demographic. When supplied as `kids=true`, it will return only Kid entries and when supplied as `kids=false`, it will filter out any Kid entries. Defaults to `false`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "true", + "false" + ] + } + }, + { + "name": "sfw", + "in": "query", + "description": "'Safe For Work'. When supplied, it will filter entries with the `Hentai` Genre. When supplied as `sfw=true`, it will return only SFW entries and when supplied as `sfw=false`, it will filter out any Hentai entries. Defaults to `false`.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "true", + "false" + ] + } + }, + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "Returns weekly schedule", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/schedules" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/anime": { + "get": { + "tags": [ + "anime" + ], + "operationId": "getAnimeSearch", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "schema": { + "$ref": "#/components/schemas/anime_search_query_type" + } + }, + { + "name": "score", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "min_score", + "in": "query", + "description": "Set a minimum score for results.", + "schema": { + "type": "number" + } + }, + { + "name": "max_score", + "in": "query", + "description": "Set a maximum score for results", + "schema": { + "type": "number" + } + }, + { + "name": "status", + "in": "query", + "schema": { + "$ref": "#/components/schemas/anime_search_query_status" + } + }, + { + "name": "rating", + "in": "query", + "schema": { + "$ref": "#/components/schemas/anime_search_query_rating" + } + }, + { + "name": "sfw", + "in": "query", + "description": "Filter out Adult entries", + "schema": { + "type": "boolean" + } + }, + { + "name": "genres", + "in": "query", + "description": "Filter by genre(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3", + "schema": { + "type": "string" + } + }, + { + "name": "genres_exclude", + "in": "query", + "description": "Exclude genre(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3", + "schema": { + "type": "string" + } + }, + { + "name": "order_by", + "in": "query", + "schema": { + "$ref": "#/components/schemas/anime_search_query_orderby" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "$ref": "#/components/schemas/search_query_sort" + } + }, + { + "name": "letter", + "in": "query", + "description": "Return entries starting with the given letter", + "schema": { + "type": "string" + } + }, + { + "name": "producers", + "in": "query", + "description": "Filter by producer(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3", + "schema": { + "type": "string" + } + }, + { + "name": "start_date", + "in": "query", + "description": "Filter by starting date. Format: YYYY-MM-DD. e.g `2022`, `2005-05`, `2005-01-01`", + "schema": { + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "description": "Filter by ending date. Format: YYYY-MM-DD. e.g `2022`, `2005-05`, `2005-01-01`", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns search results for anime", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/manga": { + "get": { + "tags": [ + "manga" + ], + "operationId": "getMangaSearch", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "schema": { + "$ref": "#/components/schemas/manga_search_query_type" + } + }, + { + "name": "score", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "min_score", + "in": "query", + "description": "Set a minimum score for results.", + "schema": { + "type": "number" + } + }, + { + "name": "max_score", + "in": "query", + "description": "Set a maximum score for results", + "schema": { + "type": "number" + } + }, + { + "name": "status", + "in": "query", + "schema": { + "$ref": "#/components/schemas/manga_search_query_status" + } + }, + { + "name": "sfw", + "in": "query", + "description": "Filter out Adult entries", + "schema": { + "type": "boolean" + } + }, + { + "name": "genres", + "in": "query", + "description": "Filter by genre(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3", + "schema": { + "type": "string" + } + }, + { + "name": "genres_exclude", + "in": "query", + "description": "Exclude genre(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3", + "schema": { + "type": "string" + } + }, + { + "name": "order_by", + "in": "query", + "schema": { + "$ref": "#/components/schemas/manga_search_query_orderby" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "$ref": "#/components/schemas/search_query_sort" + } + }, + { + "name": "letter", + "in": "query", + "description": "Return entries starting with the given letter", + "schema": { + "type": "string" + } + }, + { + "name": "magazines", + "in": "query", + "description": "Filter by magazine(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3", + "schema": { + "type": "string" + } + }, + { + "name": "start_date", + "in": "query", + "description": "Filter by starting date. Format: YYYY-MM-DD. e.g `2022`, `2005-05`, `2005-01-01`", + "schema": { + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "description": "Filter by ending date. Format: YYYY-MM-DD. e.g `2022`, `2005-05`, `2005-01-01`", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns search results for manga", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/manga_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/people": { + "get": { + "tags": [ + "people" + ], + "operationId": "getPeopleSearch", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "order_by", + "in": "query", + "schema": { + "$ref": "#/components/schemas/people_search_query_orderby" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "$ref": "#/components/schemas/search_query_sort" + } + }, + { + "name": "letter", + "in": "query", + "description": "Return entries starting with the given letter", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns search results for people", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/people_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/characters": { + "get": { + "tags": [ + "characters" + ], + "operationId": "getCharactersSearch", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "order_by", + "in": "query", + "schema": { + "$ref": "#/components/schemas/characters_search_query_orderby" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "$ref": "#/components/schemas/search_query_sort" + } + }, + { + "name": "letter", + "in": "query", + "description": "Return entries starting with the given letter", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns search results for characters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/characters_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUsersSearch", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "gender", + "in": "query", + "schema": { + "$ref": "#/components/schemas/users_search_query_gender" + } + }, + { + "name": "location", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "maxAge", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "minAge", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns search results for users", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/users_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/userbyid/{id}": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns username by ID search", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/user_by_id" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/clubs": { + "get": { + "tags": [ + "clubs" + ], + "operationId": "getClubsSearch", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "schema": { + "$ref": "#/components/schemas/club_search_query_type" + } + }, + { + "name": "category", + "in": "query", + "schema": { + "$ref": "#/components/schemas/club_search_query_category" + } + }, + { + "name": "order_by", + "in": "query", + "schema": { + "$ref": "#/components/schemas/club_search_query_orderby" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "$ref": "#/components/schemas/search_query_sort" + } + }, + { + "name": "letter", + "in": "query", + "description": "Return entries starting with the given letter", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns search results for clubs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/clubs_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/producers": { + "get": { + "tags": [ + "producers" + ], + "operationId": "getProducers", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "order_by", + "in": "query", + "schema": { + "$ref": "#/components/schemas/producers_query_orderby" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "$ref": "#/components/schemas/search_query_sort" + } + }, + { + "name": "letter", + "in": "query", + "description": "Return entries starting with the given letter", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns producers collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/producers" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/seasons/{year}/{season}": { + "get": { + "tags": [ + "seasons" + ], + "operationId": "getSeason", + "parameters": [ + { + "name": "year", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "season", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns seasonal anime", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/seasons/now": { + "get": { + "tags": [ + "seasons" + ], + "operationId": "getSeasonNow", + "parameters": [ + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns current seasonal anime", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/seasons": { + "get": { + "tags": [ + "seasons" + ], + "operationId": "getSeasonsList", + "responses": { + "200": { + "description": "Returns available list of seasons", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/seasons" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/seasons/upcoming": { + "get": { + "tags": [ + "seasons" + ], + "operationId": "getSeasonUpcoming", + "parameters": [ + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns upcoming season's anime", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/top/anime": { + "get": { + "tags": [ + "top" + ], + "operationId": "getTopAnime", + "parameters": [ + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/anime_search_query_type" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "airing", + "upcoming", + "bypopularity", + "favorite" + ] + } + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "Returns top anime", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/anime_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/top/manga": { + "get": { + "tags": [ + "top" + ], + "operationId": "getTopManga", + "parameters": [ + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/manga_search_query_type" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "publishing", + "upcoming", + "bypopularity", + "favorite" + ] + } + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "Returns top manga", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/manga_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/top/people": { + "get": { + "tags": [ + "top" + ], + "operationId": "getTopPeople", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "Returns top people", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/people_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/top/characters": { + "get": { + "tags": [ + "top" + ], + "operationId": "getTopCharacters", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "Returns top characters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/characters_search" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/top/reviews": { + "get": { + "tags": [ + "top" + ], + "operationId": "getTopReviews", + "parameters": [ + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns top reviews", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "anyOf": [ + { + "allOf": [ + { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + } + }, + "type": "object" + }, + { + "properties": { + "anime": { + "$ref": "#/components/schemas/anime_meta" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/anime_review" + } + ] + }, + { + "allOf": [ + { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + } + }, + "type": "object" + }, + { + "properties": { + "manga": { + "$ref": "#/components/schemas/manga_meta" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/manga_review" + } + ] + } + ] + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/full": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserFullProfile", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns complete user resource data", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/user_profile_full" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserProfile", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns user profile", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/user_profile" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/statistics": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserStatistics", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns user statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user_statistics" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/favorites": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserFavorites", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns user favorites", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/user_favorites" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/userupdates": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserUpdates", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns user updates", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user_updates" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/about": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserAbout", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns user about in raw HTML", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user_about" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/history": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserHistory", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "anime", + "manga" + ] + } + } + ], + "responses": { + "200": { + "description": "Returns user history (past 30 days)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user_history" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/friends": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserFriends", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns user friends", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user_friends" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/animelist": { + "get": { + "tags": [ + "users" + ], + "description": "User Anime lists have been discontinued since May 1st, 2022. Read more", + "operationId": "getUserAnimelist", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns user anime list", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + }, + "deprecated": true + } + }, + "/users/{username}/mangalist": { + "get": { + "tags": [ + "users" + ], + "description": "User Manga lists have been discontinued since May 1st, 2022. Read more", + "operationId": "getUserMangaList", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns user manga list", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + }, + "deprecated": true + } + }, + "/users/{username}/reviews": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserReviews", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns user reviews", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "anyOf": [ + { + "allOf": [ + { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + } + }, + "type": "object" + }, + { + "properties": { + "anime": { + "$ref": "#/components/schemas/anime_meta" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/anime_review" + } + ] + }, + { + "allOf": [ + { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + } + }, + "type": "object" + }, + { + "properties": { + "manga": { + "$ref": "#/components/schemas/manga_meta" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/manga_review" + } + ] + } + ] + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/recommendations": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserRecommendations", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns Recent Anime Recommendations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/recommendations" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/clubs": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserClubs", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Returns user clubs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user_clubs" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/users/{username}/external": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUserExternal", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns user's external links", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/external_links" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/watch/episodes": { + "get": { + "tags": [ + "watch" + ], + "operationId": "getWatchRecentEpisodes", + "parameters": [ + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "Returns Recently Added Episodes", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/watch_episodes" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/watch/episodes/popular": { + "get": { + "tags": [ + "watch" + ], + "operationId": "getWatchPopularEpisodes", + "parameters": [ + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "Returns Popular Episodes", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/watch_episodes" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/watch/promos": { + "get": { + "tags": [ + "watch" + ], + "operationId": "getWatchRecentPromos", + "responses": { + "200": { + "description": "Returns Recently Added Promotional Videos", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/watch_promos" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + }, + "/watch/promos/popular": { + "get": { + "tags": [ + "watch" + ], + "operationId": "getWatchPopularPromos", + "parameters": [ + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "Returns Popular Promotional Videos", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/watch_promos" + } + } + } + }, + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + } + } + } + }, + "components": { + "schemas": { + "anime_episodes": { + "description": "Anime Episodes Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "title": { + "description": "Title", + "type": "string" + }, + "title_japanese": { + "description": "Title Japanese", + "type": "string", + "nullable": true + }, + "title_romanji": { + "description": "title_romanji", + "type": "string", + "nullable": true + }, + "duration": { + "description": "Episode duration in seconds", + "type": "integer", + "nullable": true + }, + "aired": { + "description": "Aired Date ISO8601", + "type": "string", + "nullable": true + }, + "filler": { + "description": "Filler episode", + "type": "boolean" + }, + "recap": { + "description": "Recap episode", + "type": "boolean" + }, + "forum_url": { + "description": "Episode discussion forum URL", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "anime_news": { + "description": "Anime News Resource", + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "$ref": "#/components/schemas/news" + } + ] + }, + "anime_videos_episodes": { + "description": "Anime Videos Episodes Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID or Episode Number", + "type": "integer" + }, + "title": { + "description": "Episode Title", + "type": "string" + }, + "episode": { + "description": "Episode Subtitle", + "type": "string" + }, + "url": { + "description": "Episode Page URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/common_images" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "character_pictures": { + "description": "Character Pictures", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "image_url": { + "description": "Default JPG Image Size URL", + "type": "string", + "nullable": true + }, + "large_image_url": { + "description": "Large JPG Image Size URL", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "club_member": { + "description": "Club Member", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/user_images" + } + } + }, + "type": "object" + }, + "manga_news": { + "description": "Manga News Resource", + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "$ref": "#/components/schemas/news" + } + ] + }, + "manga_pictures": { + "description": "Manga Pictures", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/manga_images" + } + } + }, + "type": "object" + }, + "person_pictures": { + "description": "Character Pictures", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/people_images" + } + } + }, + "type": "object" + }, + "random": { + "description": "Random Resources", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/anime" + }, + { + "$ref": "#/components/schemas/manga" + }, + { + "$ref": "#/components/schemas/character" + }, + { + "$ref": "#/components/schemas/person" + } + ] + } + } + }, + "type": "object" + }, + "schedules": { + "description": "Anime resources currently airing", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/anime" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination_plus" + } + ] + }, + "search_query_sort": { + "description": "Characters Search Query Sort", + "type": "string", + "enum": [ + "desc", + "asc" + ] + }, + "users_search": { + "description": "User Results", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "username": { + "description": "MyAnimeList Username", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/user_images" + }, + "last_online": { + "description": "Last Online Date ISO8601", + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "seasons": { + "description": "List of available seasons", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "year": { + "description": "Year", + "type": "integer" + }, + "seasons": { + "description": "List of available seasons", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "reviews_collection": { + "description": "Anime & Manga Reviews Resource", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/anime_review" + }, + { + "$ref": "#/components/schemas/manga_review" + } + ] + } + } + }, + "type": "object" + }, + "user_friends": { + "description": "User Friends", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + } + }, + "type": "object" + }, + { + "properties": { + "last_online": { + "description": "Last Online Date ISO8601 format", + "type": "string" + }, + "friends_since": { + "description": "Friends Since Date ISO8601 format", + "type": "string" + } + }, + "type": "object" + } + ] + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "user_clubs": { + "description": "User Clubs", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "name": { + "description": "Club Name", + "type": "string" + }, + "url": { + "description": "Club URL", + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "watch_episodes": { + "description": "Watch Episodes", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "entry": { + "$ref": "#/components/schemas/anime_meta" + }, + "episodes": { + "description": "Recent Episodes (max 2 listed)", + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "string" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "title": { + "description": "Episode Title", + "type": "string" + }, + "premium": { + "description": "For MyAnimeList Premium Users", + "type": "boolean" + } + }, + "type": "object" + } + }, + "region_locked": { + "description": "Region Locked Episode", + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "watch_promos": { + "description": "Watch Promos", + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "allOf": [ + { + "properties": { + "title": { + "description": "Promo Title", + "type": "string" + } + }, + "type": "object" + }, + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "entry": { + "$ref": "#/components/schemas/anime_meta" + }, + "trailer": { + "type": "array", + "items": { + "$ref": "#/components/schemas/trailer" + } + } + }, + "type": "object" + } + } + }, + "type": "object" + } + ] + } + ] + }, + "anime_search_query_type": { + "description": "Available Anime types", + "type": "string", + "enum": [ + "tv", + "movie", + "ova", + "special", + "ona", + "music" + ] + }, + "anime_search_query_status": { + "description": "Available Anime statuses", + "type": "string", + "enum": [ + "airing", + "complete", + "upcoming" + ] + }, + "anime_search_query_rating": { + "description": "Available Anime audience ratings

Ratings
", + "type": "string", + "enum": [ + "g", + "pg", + "pg13", + "r17", + "r", + "rx" + ] + }, + "anime_search_query_orderby": { + "description": "Available Anime order_by properties", + "type": "string", + "enum": [ + "mal_id", + "title", + "type", + "rating", + "start_date", + "end_date", + "episodes", + "score", + "scored_by", + "rank", + "popularity", + "members", + "favorites" + ] + }, + "characters_search_query_orderby": { + "description": "Available Character order_by properties", + "type": "string", + "enum": [ + "mal_id", + "name", + "favorites" + ] + }, + "club_search_query_type": { + "description": "Club Search Query Type", + "type": "string", + "enum": [ + "public", + "private", + "secret" + ] + }, + "club_search_query_category": { + "description": "Club Search Query Category", + "type": "string", + "enum": [ + "anime", + "manga", + "actors_and_artists", + "characters", + "cities_and_neighborhoods", + "companies", + "conventions", + "games", + "japan", + "music", + "other", + "schools" + ] + }, + "club_search_query_orderby": { + "description": "Club Search Query OrderBy", + "type": "string", + "enum": [ + "mal_id", + "title", + "members_count", + "pictures_count", + "created" + ] + }, + "magazines_query_orderby": { + "description": "Order by magazine data", + "type": "string", + "enum": [ + "mal_id", + "name", + "count" + ] + }, + "manga_search_query_type": { + "description": "Available Manga types", + "type": "string", + "enum": [ + "manga", + "novel", + "lightnovel", + "oneshot", + "doujin", + "manhwa", + "manhua" + ] + }, + "manga_search_query_status": { + "description": "Available Manga statuses", + "type": "string", + "enum": [ + "publishing", + "complete", + "hiatus", + "discontinued", + "upcoming" + ] + }, + "manga_search_query_orderby": { + "description": "Available Manga order_by properties", + "type": "string", + "enum": [ + "mal_id", + "title", + "start_date", + "end_date", + "chapters", + "volumes", + "score", + "scored_by", + "rank", + "popularity", + "members", + "favorites" + ] + }, + "people_search_query_orderby": { + "description": "Available People order_by properties", + "type": "string", + "enum": [ + "mal_id", + "name", + "birthday", + "favorites" + ] + }, + "producers_query_orderby": { + "description": "Order by producers data", + "type": "string", + "enum": [ + "mal_id", + "name", + "count", + "favorites", + "established" + ] + }, + "users_search_query_gender": { + "description": "Users Search Query Gender", + "type": "string", + "enum": [ + "any", + "male", + "female", + "nonbinary" + ] + }, + "anime_characters": { + "description": "Anime Characters Resource", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "character": { + "description": "Character details", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/character_images" + }, + "name": { + "description": "Character Name", + "type": "string" + } + }, + "type": "object" + }, + "role": { + "description": "Character's Role", + "type": "string" + }, + "voice_actors": { + "type": "array", + "items": { + "properties": { + "person": { + "properties": { + "mal_id": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/people_images" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "language": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "anime_search": { + "description": "Anime Collection Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/anime" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination_plus" + } + ] + }, + "anime_episode": { + "description": "Anime Episode Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "title": { + "description": "Title", + "type": "string" + }, + "title_japanese": { + "description": "Title Japanese", + "type": "string", + "nullable": true + }, + "title_romanji": { + "description": "title_romanji", + "type": "string", + "nullable": true + }, + "duration": { + "description": "Episode duration in seconds", + "type": "integer", + "nullable": true + }, + "aired": { + "description": "Aired Date ISO8601", + "type": "string", + "nullable": true + }, + "filler": { + "description": "Filler episode", + "type": "boolean" + }, + "recap": { + "description": "Recap episode", + "type": "boolean" + }, + "synopsis": { + "description": "Episode Synopsis", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "anime_full": { + "description": "Full anime Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/anime_images" + }, + "trailer": { + "$ref": "#/components/schemas/trailer_base" + }, + "approved": { + "description": "Whether the entry is pending approval on MAL or not", + "type": "boolean" + }, + "titles": { + "description": "All titles", + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "description": "Title", + "type": "string", + "deprecated": true + }, + "title_english": { + "description": "English Title", + "type": "string", + "nullable": true, + "deprecated": true + }, + "title_japanese": { + "description": "Japanese Title", + "type": "string", + "nullable": true, + "deprecated": true + }, + "title_synonyms": { + "description": "Other Titles", + "type": "array", + "items": { + "type": "string" + }, + "deprecated": true + }, + "type": { + "description": "Anime Type", + "type": "string", + "enum": [ + "TV", + "OVA", + "Movie", + "Special", + "ONA", + "Music" + ], + "nullable": true + }, + "source": { + "description": "Original Material/Source adapted from", + "type": "string", + "nullable": true + }, + "episodes": { + "description": "Episode count", + "type": "integer", + "nullable": true + }, + "status": { + "description": "Airing status", + "type": "string", + "enum": [ + "Finished Airing", + "Currently Airing", + "Not yet aired" + ], + "nullable": true + }, + "airing": { + "description": "Airing boolean", + "type": "boolean" + }, + "aired": { + "$ref": "#/components/schemas/daterange" + }, + "duration": { + "description": "Parsed raw duration", + "type": "string", + "nullable": true + }, + "rating": { + "description": "Anime audience rating", + "type": "string", + "enum": [ + "G - All Ages", + "PG - Children", + "PG-13 - Teens 13 or older", + "R - 17+ (violence & profanity)", + "R+ - Mild Nudity", + "Rx - Hentai" + ], + "nullable": true + }, + "score": { + "description": "Score", + "type": "number", + "format": "float", + "nullable": true + }, + "scored_by": { + "description": "Number of users", + "type": "integer", + "nullable": true + }, + "rank": { + "description": "Ranking", + "type": "integer", + "nullable": true + }, + "popularity": { + "description": "Popularity", + "type": "integer", + "nullable": true + }, + "members": { + "description": "Number of users who have added this entry to their list", + "type": "integer", + "nullable": true + }, + "favorites": { + "description": "Number of users who have favorited this entry", + "type": "integer", + "nullable": true + }, + "synopsis": { + "description": "Synopsis", + "type": "string", + "nullable": true + }, + "background": { + "description": "Background", + "type": "string", + "nullable": true + }, + "season": { + "description": "Season", + "type": "string", + "enum": [ + "summer", + "winter", + "spring", + "fall" + ], + "nullable": true + }, + "year": { + "description": "Year", + "type": "integer", + "nullable": true + }, + "broadcast": { + "$ref": "#/components/schemas/broadcast" + }, + "producers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "licensors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "studios": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "explicit_genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "themes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "demographics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "relations": { + "type": "array", + "items": { + "properties": { + "relation": { + "description": "Relation type", + "type": "string" + }, + "entry": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + } + }, + "type": "object" + } + }, + "theme": { + "properties": { + "openings": { + "type": "array", + "items": { + "type": "string" + } + }, + "endings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "external": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + } + }, + "streaming": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "anime_relations": { + "description": "Anime Relations", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "relation": { + "description": "Relation type", + "type": "string" + }, + "entry": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "anime": { + "description": "Anime Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/anime_images" + }, + "trailer": { + "$ref": "#/components/schemas/trailer_base" + }, + "approved": { + "description": "Whether the entry is pending approval on MAL or not", + "type": "boolean" + }, + "titles": { + "description": "All titles", + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "description": "Title", + "type": "string", + "deprecated": true + }, + "title_english": { + "description": "English Title", + "type": "string", + "nullable": true, + "deprecated": true + }, + "title_japanese": { + "description": "Japanese Title", + "type": "string", + "nullable": true, + "deprecated": true + }, + "title_synonyms": { + "description": "Other Titles", + "type": "array", + "items": { + "type": "string" + }, + "deprecated": true + }, + "type": { + "description": "Anime Type", + "type": "string", + "enum": [ + "TV", + "OVA", + "Movie", + "Special", + "ONA", + "Music" + ], + "nullable": true + }, + "source": { + "description": "Original Material/Source adapted from", + "type": "string", + "nullable": true + }, + "episodes": { + "description": "Episode count", + "type": "integer", + "nullable": true + }, + "status": { + "description": "Airing status", + "type": "string", + "enum": [ + "Finished Airing", + "Currently Airing", + "Not yet aired" + ], + "nullable": true + }, + "airing": { + "description": "Airing boolean", + "type": "boolean" + }, + "aired": { + "$ref": "#/components/schemas/daterange" + }, + "duration": { + "description": "Parsed raw duration", + "type": "string", + "nullable": true + }, + "rating": { + "description": "Anime audience rating", + "type": "string", + "enum": [ + "G - All Ages", + "PG - Children", + "PG-13 - Teens 13 or older", + "R - 17+ (violence & profanity)", + "R+ - Mild Nudity", + "Rx - Hentai" + ], + "nullable": true + }, + "score": { + "description": "Score", + "type": "number", + "format": "float", + "nullable": true + }, + "scored_by": { + "description": "Number of users", + "type": "integer", + "nullable": true + }, + "rank": { + "description": "Ranking", + "type": "integer", + "nullable": true + }, + "popularity": { + "description": "Popularity", + "type": "integer", + "nullable": true + }, + "members": { + "description": "Number of users who have added this entry to their list", + "type": "integer", + "nullable": true + }, + "favorites": { + "description": "Number of users who have favorited this entry", + "type": "integer", + "nullable": true + }, + "synopsis": { + "description": "Synopsis", + "type": "string", + "nullable": true + }, + "background": { + "description": "Background", + "type": "string", + "nullable": true + }, + "season": { + "description": "Season", + "type": "string", + "enum": [ + "summer", + "winter", + "spring", + "fall" + ], + "nullable": true + }, + "year": { + "description": "Year", + "type": "integer", + "nullable": true + }, + "broadcast": { + "$ref": "#/components/schemas/broadcast" + }, + "producers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "licensors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "studios": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "explicit_genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "themes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "demographics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + } + }, + "type": "object" + }, + "anime_staff": { + "description": "Anime Staff Resource", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "person": { + "description": "Person details", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/people_images" + }, + "name": { + "description": "Name", + "type": "string" + } + }, + "type": "object" + }, + "positions": { + "description": "Staff Positions", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "anime_statistics": { + "description": "Anime Statistics Resource", + "properties": { + "data": { + "properties": { + "watching": { + "description": "Number of users watching the resource", + "type": "integer" + }, + "completed": { + "description": "Number of users who have completed the resource", + "type": "integer" + }, + "on_hold": { + "description": "Number of users who have put the resource on hold", + "type": "integer" + }, + "dropped": { + "description": "Number of users who have dropped the resource", + "type": "integer" + }, + "plan_to_watch": { + "description": "Number of users who have planned to watch the resource", + "type": "integer" + }, + "total": { + "description": "Total number of users who have the resource added to their lists", + "type": "integer" + }, + "scores": { + "type": "array", + "items": { + "properties": { + "score": { + "description": "Scoring value", + "type": "integer" + }, + "votes": { + "description": "Number of votes for this score", + "type": "integer" + }, + "percentage": { + "description": "Percentage of votes for this score", + "type": "number", + "format": "float" + } + }, + "type": "object" + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "anime_themes": { + "description": "Anime Opening and Ending Themes", + "properties": { + "data": { + "properties": { + "openings": { + "type": "array", + "items": { + "type": "string" + } + }, + "endings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "anime_videos": { + "description": "Anime Videos Resource", + "properties": { + "data": { + "properties": { + "promo": { + "type": "array", + "items": { + "properties": { + "title": { + "description": "Title", + "type": "string" + }, + "trailer": { + "$ref": "#/components/schemas/trailer" + } + }, + "type": "object" + } + }, + "episodes": { + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "title": { + "description": "Title", + "type": "string" + }, + "episode": { + "description": "Episode", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/common_images" + } + }, + "type": "object" + } + }, + "music_videos": { + "type": "array", + "items": { + "properties": { + "title": { + "description": "Title", + "type": "string" + }, + "video": { + "$ref": "#/components/schemas/trailer" + }, + "meta": { + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "author": { + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "character_anime": { + "description": "Character casted in anime", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "role": { + "description": "Character's Role", + "type": "string" + }, + "anime": { + "$ref": "#/components/schemas/anime_meta" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "characters_search": { + "description": "Characters Search Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/character" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination_plus" + } + ] + }, + "character_full": { + "description": "Character Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/character_images" + }, + "name": { + "description": "Name", + "type": "string" + }, + "name_kanji": { + "description": "Name", + "type": "string", + "nullable": true + }, + "nicknames": { + "description": "Other Names", + "type": "array", + "items": { + "type": "string" + } + }, + "favorites": { + "description": "Number of users who have favorited this entry", + "type": "integer" + }, + "about": { + "description": "Biography", + "type": "string", + "nullable": true + }, + "anime": { + "type": "array", + "items": { + "properties": { + "role": { + "description": "Character's Role", + "type": "string" + }, + "anime": { + "$ref": "#/components/schemas/anime_meta" + } + }, + "type": "object" + } + }, + "manga": { + "type": "array", + "items": { + "properties": { + "role": { + "description": "Character's Role", + "type": "string" + }, + "manga": { + "$ref": "#/components/schemas/manga_meta" + } + }, + "type": "object" + } + }, + "voices": { + "type": "array", + "items": { + "properties": { + "language": { + "description": "Character's Role", + "type": "string" + }, + "person": { + "$ref": "#/components/schemas/person_meta" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "character_manga": { + "description": "Character casted in manga", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "role": { + "description": "Character's Role", + "type": "string" + }, + "manga": { + "$ref": "#/components/schemas/manga_meta" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "character": { + "description": "Character Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/character_images" + }, + "name": { + "description": "Name", + "type": "string" + }, + "name_kanji": { + "description": "Name", + "type": "string", + "nullable": true + }, + "nicknames": { + "description": "Other Names", + "type": "array", + "items": { + "type": "string" + } + }, + "favorites": { + "description": "Number of users who have favorited this entry", + "type": "integer" + }, + "about": { + "description": "Biography", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "character_voice_actors": { + "description": "Character voice actors", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "language": { + "description": "Character's Role", + "type": "string" + }, + "person": { + "$ref": "#/components/schemas/person_meta" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "clubs_search": { + "description": "Clubs Search Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/club" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "club_relations": { + "description": "Club Relations", + "properties": { + "data": { + "properties": { + "anime": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "manga": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "characters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "club": { + "description": "Club Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "name": { + "description": "Club name", + "type": "string" + }, + "url": { + "description": "Club URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/common_images" + }, + "members": { + "description": "Number of club members", + "type": "integer" + }, + "category": { + "description": "Club Category", + "type": "string", + "enum": [ + "actors & artists", + "anime", + "characters", + "cities & neighborhoods", + "companies", + "conventions", + "games", + "japan", + "manga", + "music", + "others", + "schools" + ] + }, + "created": { + "description": "Date Created ISO8601", + "type": "string" + }, + "access": { + "description": "Club access", + "type": "string", + "enum": [ + "public", + "private", + "secret" + ] + } + }, + "type": "object" + }, + "club_staff": { + "description": "Club Staff Resource", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "url": { + "description": "User URL", + "type": "string" + }, + "username": { + "description": "User's username", + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "trailer": { + "description": "Youtube Details", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/trailer_base" + }, + { + "$ref": "#/components/schemas/trailer_images" + } + ] + }, + "trailer_base": { + "description": "Youtube Details", + "properties": { + "youtube_id": { + "description": "YouTube ID", + "type": "string", + "nullable": true + }, + "url": { + "description": "YouTube URL", + "type": "string", + "nullable": true + }, + "embed_url": { + "description": "Parsed Embed URL", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "trailer_images": { + "description": "Youtube Images", + "properties": { + "images": { + "properties": { + "image_url": { + "description": "Default Image Size URL (120x90)", + "type": "string", + "nullable": true + }, + "small_image_url": { + "description": "Small Image Size URL (640x480)", + "type": "string", + "nullable": true + }, + "medium_image_url": { + "description": "Medium Image Size URL (320x180)", + "type": "string", + "nullable": true + }, + "large_image_url": { + "description": "Large Image Size URL (480x360)", + "type": "string", + "nullable": true + }, + "maximum_image_url": { + "description": "Maximum Image Size URL (1280x720)", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "daterange": { + "description": "Date range", + "properties": { + "from": { + "description": "Date ISO8601", + "type": "string", + "nullable": true + }, + "to": { + "description": "Date ISO8601", + "type": "string", + "nullable": true + }, + "prop": { + "description": "Date Prop", + "properties": { + "from": { + "description": "Date Prop From", + "properties": { + "day": { + "description": "Day", + "type": "integer", + "nullable": true + }, + "month": { + "description": "Month", + "type": "integer", + "nullable": true + }, + "year": { + "description": "Year", + "type": "integer", + "nullable": true + } + }, + "type": "object" + }, + "to": { + "description": "Date Prop To", + "properties": { + "day": { + "description": "Day", + "type": "integer", + "nullable": true + }, + "month": { + "description": "Month", + "type": "integer", + "nullable": true + }, + "year": { + "description": "Year", + "type": "integer", + "nullable": true + } + }, + "type": "object" + }, + "string": { + "description": "Raw parsed string", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "broadcast": { + "description": "Broadcast Details", + "properties": { + "day": { + "description": "Day of the week", + "type": "string", + "nullable": true + }, + "time": { + "description": "Time in 24 hour format", + "type": "string", + "nullable": true + }, + "timezone": { + "description": "Timezone (Tz Database format https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)", + "type": "string", + "nullable": true + }, + "string": { + "description": "Raw parsed broadcast string", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "mal_url": { + "description": "Parsed URL Data", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "type": { + "description": "Type of resource", + "type": "string" + }, + "name": { + "description": "Resource Name/Title", + "type": "string" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + } + }, + "type": "object" + }, + "mal_url_2": { + "description": "Parsed URL Data", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "type": { + "description": "Type of resource", + "type": "string" + }, + "title": { + "description": "Resource Name/Title", + "type": "string" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + } + }, + "type": "object" + }, + "entry_meta": { + "description": "Entry Meta data", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "image_url": { + "description": "Image URL", + "type": "string" + }, + "name": { + "description": "Entry Name/Title", + "type": "string" + } + }, + "type": "object" + }, + "relation": { + "description": "Related resources", + "properties": { + "relation": { + "description": "Relation type", + "type": "string" + }, + "entry": { + "description": "Related entries", + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + } + }, + "type": "object" + }, + "pagination": { + "properties": { + "pagination": { + "properties": { + "last_visible_page": { + "type": "integer" + }, + "has_next_page": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "pagination_plus": { + "properties": { + "pagination": { + "properties": { + "last_visible_page": { + "type": "integer" + }, + "has_next_page": { + "type": "boolean" + }, + "items": { + "properties": { + "count": { + "type": "integer" + }, + "total": { + "type": "integer" + }, + "per_page": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "user_meta": { + "properties": { + "username": { + "description": "MyAnimeList Username", + "type": "string" + }, + "url": { + "description": "MyAnimeList Profile URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/user_images" + } + }, + "type": "object" + }, + "user_by_id": { + "description": "User Meta By ID", + "properties": { + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "username": { + "description": "MyAnimeList Username", + "type": "string" + } + }, + "type": "object" + }, + "user_images": { + "properties": { + "jpg": { + "description": "Available images in JPG", + "properties": { + "image_url": { + "description": "Image URL JPG", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "webp": { + "description": "Available images in WEBP", + "properties": { + "image_url": { + "description": "Image URL WEBP", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "anime_meta": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/anime_images" + }, + "title": { + "description": "Entry title", + "type": "string" + } + }, + "type": "object" + }, + "manga_meta": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/manga_images" + }, + "title": { + "description": "Entry title", + "type": "string" + } + }, + "type": "object" + }, + "character_meta": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/character_images" + }, + "name": { + "description": "Entry name", + "type": "string" + } + }, + "type": "object" + }, + "person_meta": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/people_images" + }, + "name": { + "description": "Entry name", + "type": "string" + } + }, + "type": "object" + }, + "anime_images": { + "properties": { + "jpg": { + "description": "Available images in JPG", + "properties": { + "image_url": { + "description": "Image URL JPG", + "type": "string", + "nullable": true + }, + "small_image_url": { + "description": "Small Image URL JPG", + "type": "string", + "nullable": true + }, + "large_image_url": { + "description": "Image URL JPG", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "webp": { + "description": "Available images in WEBP", + "properties": { + "image_url": { + "description": "Image URL WEBP", + "type": "string", + "nullable": true + }, + "small_image_url": { + "description": "Small Image URL WEBP", + "type": "string", + "nullable": true + }, + "large_image_url": { + "description": "Image URL WEBP", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "manga_images": { + "properties": { + "jpg": { + "description": "Available images in JPG", + "properties": { + "image_url": { + "description": "Image URL JPG", + "type": "string", + "nullable": true + }, + "small_image_url": { + "description": "Small Image URL JPG", + "type": "string", + "nullable": true + }, + "large_image_url": { + "description": "Image URL JPG", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "webp": { + "description": "Available images in WEBP", + "properties": { + "image_url": { + "description": "Image URL WEBP", + "type": "string", + "nullable": true + }, + "small_image_url": { + "description": "Small Image URL WEBP", + "type": "string", + "nullable": true + }, + "large_image_url": { + "description": "Image URL WEBP", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "character_images": { + "properties": { + "jpg": { + "description": "Available images in JPG", + "properties": { + "image_url": { + "description": "Image URL JPG", + "type": "string", + "nullable": true + }, + "small_image_url": { + "description": "Small Image URL JPG", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "webp": { + "description": "Available images in WEBP", + "properties": { + "image_url": { + "description": "Image URL WEBP", + "type": "string", + "nullable": true + }, + "small_image_url": { + "description": "Small Image URL WEBP", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "people_images": { + "properties": { + "jpg": { + "description": "Available images in JPG", + "properties": { + "image_url": { + "description": "Image URL JPG", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "common_images": { + "properties": { + "jpg": { + "description": "Available images in JPG", + "properties": { + "image_url": { + "description": "Image URL JPG", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "external_links": { + "description": "External links", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "forum": { + "description": "Forum Resource", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "title": { + "description": "Title", + "type": "string" + }, + "date": { + "description": "Post Date ISO8601", + "type": "string" + }, + "author_username": { + "description": "Author MyAnimeList Username", + "type": "string" + }, + "author_url": { + "description": "Author Profile URL", + "type": "string" + }, + "comments": { + "description": "Comment count", + "type": "integer" + }, + "last_comment": { + "description": "Last comment details", + "properties": { + "url": { + "description": "Last comment URL", + "type": "string" + }, + "author_username": { + "description": "Author MyAnimeList Username", + "type": "string" + }, + "author_url": { + "description": "Author Profile URL", + "type": "string" + }, + "date": { + "description": "Last comment date posted ISO8601", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "genres": { + "description": "Genres Collection Resource", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/genre" + } + } + }, + "type": "object" + }, + "genre_query_filter": { + "description": "Filter genres by type", + "type": "string", + "enum": [ + "genres", + "explicit_genres", + "themes", + "demographics" + ] + }, + "genre": { + "description": "Genre Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "name": { + "description": "Genre Name", + "type": "string" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "count": { + "description": "Genre's entry count", + "type": "integer" + } + }, + "type": "object" + }, + "magazines": { + "description": "Magazine Collection Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/magazine" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "magazine": { + "description": "Magazine Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "name": { + "description": "Magazine Name", + "type": "string" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "count": { + "description": "Magazine's manga count", + "type": "integer" + } + }, + "type": "object" + }, + "manga_characters": { + "description": "Manga Characters Resource", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "character": { + "$ref": "#/components/schemas/character_meta" + }, + "role": { + "description": "Character's Role", + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "manga_search": { + "description": "Manga Search Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/manga" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination_plus" + } + ] + }, + "manga_full": { + "description": "Manga Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/manga_images" + }, + "approved": { + "description": "Whether the entry is pending approval on MAL or not", + "type": "boolean" + }, + "titles": { + "description": "All Titles", + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "description": "Title", + "type": "string", + "deprecated": true + }, + "title_english": { + "description": "English Title", + "type": "string", + "nullable": true, + "deprecated": true + }, + "title_japanese": { + "description": "Japanese Title", + "type": "string", + "nullable": true, + "deprecated": true + }, + "title_synonyms": { + "description": "Other Titles", + "type": "array", + "items": { + "type": "string" + }, + "deprecated": true + }, + "type": { + "description": "Manga Type", + "type": "string", + "enum": [ + "Manga", + "Novel", + "Light Novel", + "One-shot", + "Doujinshi", + "Manhua", + "Manhwa", + "OEL" + ], + "nullable": true + }, + "chapters": { + "description": "Chapter count", + "type": "integer", + "nullable": true + }, + "volumes": { + "description": "Volume count", + "type": "integer", + "nullable": true + }, + "status": { + "description": "Publishing status", + "type": "string", + "enum": [ + "Finished", + "Publishing", + "On Hiatus", + "Discontinued", + "Not yet published" + ] + }, + "publishing": { + "description": "Publishing boolean", + "type": "boolean" + }, + "published": { + "$ref": "#/components/schemas/daterange" + }, + "score": { + "description": "Score", + "type": "number", + "format": "float", + "nullable": true + }, + "scored_by": { + "description": "Number of users", + "type": "integer", + "nullable": true + }, + "rank": { + "description": "Ranking", + "type": "integer", + "nullable": true + }, + "popularity": { + "description": "Popularity", + "type": "integer", + "nullable": true + }, + "members": { + "description": "Number of users who have added this entry to their list", + "type": "integer", + "nullable": true + }, + "favorites": { + "description": "Number of users who have favorited this entry", + "type": "integer", + "nullable": true + }, + "synopsis": { + "description": "Synopsis", + "type": "string", + "nullable": true + }, + "background": { + "description": "Background", + "type": "string", + "nullable": true + }, + "authors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "serializations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "explicit_genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "themes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "demographics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "relations": { + "type": "array", + "items": { + "properties": { + "relation": { + "description": "Relation type", + "type": "string" + }, + "entry": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + } + }, + "type": "object" + } + }, + "external": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "manga": { + "description": "Manga Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/manga_images" + }, + "approved": { + "description": "Whether the entry is pending approval on MAL or not", + "type": "boolean" + }, + "titles": { + "description": "All Titles", + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "description": "Title", + "type": "string", + "deprecated": true + }, + "title_english": { + "description": "English Title", + "type": "string", + "nullable": true, + "deprecated": true + }, + "title_japanese": { + "description": "Japanese Title", + "type": "string", + "nullable": true, + "deprecated": true + }, + "type": { + "description": "Manga Type", + "type": "string", + "enum": [ + "Manga", + "Novel", + "Light Novel", + "One-shot", + "Doujinshi", + "Manhua", + "Manhwa", + "OEL" + ], + "nullable": true + }, + "chapters": { + "description": "Chapter count", + "type": "integer", + "nullable": true + }, + "volumes": { + "description": "Volume count", + "type": "integer", + "nullable": true + }, + "status": { + "description": "Publishing status", + "type": "string", + "enum": [ + "Finished", + "Publishing", + "On Hiatus", + "Discontinued", + "Not yet published" + ] + }, + "publishing": { + "description": "Publishing boolean", + "type": "boolean" + }, + "published": { + "$ref": "#/components/schemas/daterange" + }, + "score": { + "description": "Score", + "type": "number", + "format": "float", + "nullable": true + }, + "scored_by": { + "description": "Number of users", + "type": "integer", + "nullable": true + }, + "rank": { + "description": "Ranking", + "type": "integer", + "nullable": true + }, + "popularity": { + "description": "Popularity", + "type": "integer", + "nullable": true + }, + "members": { + "description": "Number of users who have added this entry to their list", + "type": "integer", + "nullable": true + }, + "favorites": { + "description": "Number of users who have favorited this entry", + "type": "integer", + "nullable": true + }, + "synopsis": { + "description": "Synopsis", + "type": "string", + "nullable": true + }, + "background": { + "description": "Background", + "type": "string", + "nullable": true + }, + "authors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "serializations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "explicit_genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "themes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + }, + "demographics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mal_url" + } + } + }, + "type": "object" + }, + "manga_statistics": { + "description": "Manga Statistics Resource", + "properties": { + "data": { + "properties": { + "reading": { + "description": "Number of users reading the resource", + "type": "integer" + }, + "completed": { + "description": "Number of users who have completed the resource", + "type": "integer" + }, + "on_hold": { + "description": "Number of users who have put the resource on hold", + "type": "integer" + }, + "dropped": { + "description": "Number of users who have dropped the resource", + "type": "integer" + }, + "plan_to_read": { + "description": "Number of users who have planned to read the resource", + "type": "integer" + }, + "total": { + "description": "Total number of users who have the resource added to their lists", + "type": "integer" + }, + "scores": { + "type": "array", + "items": { + "properties": { + "score": { + "description": "Scoring value", + "type": "integer" + }, + "votes": { + "description": "Number of votes for this score", + "type": "integer" + }, + "percentage": { + "description": "Percentage of votes for this score", + "type": "number", + "format": "float" + } + }, + "type": "object" + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "moreinfo": { + "description": "More Info Resource", + "properties": { + "data": { + "properties": { + "moreinfo": { + "description": "Additional information on the entry", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + }, + "type": "object" + }, + "news": { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "title": { + "description": "Title", + "type": "string" + }, + "date": { + "description": "Post Date ISO8601", + "type": "string" + }, + "author_username": { + "description": "Author MyAnimeList Username", + "type": "string" + }, + "author_url": { + "description": "Author Profile URL", + "type": "string" + }, + "forum_url": { + "description": "Forum topic URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/common_images" + }, + "comments": { + "description": "Comment count", + "type": "integer" + }, + "excerpt": { + "description": "Excerpt", + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "person_anime": { + "description": "Person anime staff positions", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "position": { + "description": "Person's position", + "type": "string" + }, + "anime": { + "$ref": "#/components/schemas/anime_meta" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "people_search": { + "description": "People Search", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/person" + } + ] + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination_plus" + } + ] + }, + "person_full": { + "description": "Person Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "website_url": { + "description": "Person's website URL", + "type": "string", + "nullable": true + }, + "images": { + "$ref": "#/components/schemas/people_images" + }, + "name": { + "description": "Name", + "type": "string" + }, + "given_name": { + "description": "Given Name", + "type": "string", + "nullable": true + }, + "family_name": { + "description": "Family Name", + "type": "string", + "nullable": true + }, + "alternate_names": { + "description": "Other Names", + "type": "array", + "items": { + "type": "string" + } + }, + "birthday": { + "description": "Birthday Date ISO8601", + "type": "string", + "nullable": true + }, + "favorites": { + "description": "Number of users who have favorited this entry", + "type": "integer" + }, + "about": { + "description": "Biography", + "type": "string", + "nullable": true + }, + "anime": { + "type": "array", + "items": { + "properties": { + "position": { + "description": "Person's position", + "type": "string" + }, + "anime": { + "$ref": "#/components/schemas/anime_meta" + } + }, + "type": "object" + } + }, + "manga": { + "type": "array", + "items": { + "properties": { + "position": { + "description": "Person's position", + "type": "string" + }, + "manga": { + "$ref": "#/components/schemas/manga_meta" + } + }, + "type": "object" + } + }, + "voices": { + "type": "array", + "items": { + "properties": { + "role": { + "description": "Person's Character's role in the anime", + "type": "string" + }, + "anime": { + "$ref": "#/components/schemas/anime_meta" + }, + "character": { + "$ref": "#/components/schemas/character_meta" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "person_manga": { + "description": "Person's mangaography", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "position": { + "description": "Person's position", + "type": "string" + }, + "manga": { + "$ref": "#/components/schemas/manga_meta" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "person": { + "description": "Person Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "website_url": { + "description": "Person's website URL", + "type": "string", + "nullable": true + }, + "images": { + "$ref": "#/components/schemas/people_images" + }, + "name": { + "description": "Name", + "type": "string" + }, + "given_name": { + "description": "Given Name", + "type": "string", + "nullable": true + }, + "family_name": { + "description": "Family Name", + "type": "string", + "nullable": true + }, + "alternate_names": { + "description": "Other Names", + "type": "array", + "items": { + "type": "string" + } + }, + "birthday": { + "description": "Birthday Date ISO8601", + "type": "string", + "nullable": true + }, + "favorites": { + "description": "Number of users who have favorited this entry", + "type": "integer" + }, + "about": { + "description": "Biography", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "person_voice_acting_roles": { + "description": "Person's voice acting roles", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "role": { + "description": "Person's Character's role in the anime", + "type": "string" + }, + "anime": { + "$ref": "#/components/schemas/anime_meta" + }, + "character": { + "$ref": "#/components/schemas/character_meta" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "pictures": { + "description": "Pictures Resource", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "images": { + "$ref": "#/components/schemas/anime_images" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "pictures_variants": { + "description": "Pictures Resource", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "images": { + "$ref": "#/components/schemas/common_images" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "producers": { + "description": "Producers Collection Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/producer" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "producer_full": { + "description": "Producers Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "titles": { + "description": "All titles", + "type": "array", + "items": { + "type": "string" + } + }, + "images": { + "$ref": "#/components/schemas/common_images" + }, + "favorites": { + "description": "Producers's member favorites count", + "type": "integer" + }, + "count": { + "description": "Producers's anime count", + "type": "integer" + }, + "established": { + "description": "Established Date ISO8601", + "type": "string", + "nullable": true + }, + "about": { + "description": "About the Producer", + "type": "string", + "nullable": true + }, + "external": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "producer": { + "description": "Producers Resource", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "titles": { + "description": "All titles", + "type": "array", + "items": { + "type": "string" + } + }, + "images": { + "$ref": "#/components/schemas/common_images" + }, + "favorites": { + "description": "Producers's member favorites count", + "type": "integer" + }, + "count": { + "description": "Producers's anime count", + "type": "integer" + }, + "established": { + "description": "Established Date ISO8601", + "type": "string", + "nullable": true + }, + "about": { + "description": "About the Producer", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "user_about": { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "about": { + "description": "User About. NOTE: About information is customizable by users through BBCode on MyAnimeList. This means users can add multimedia content, different text sizes, etc. Due to this freeform, Jikan returns parsed HTML. Validate on your end!", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "user_favorites": { + "properties": { + "anime": { + "description": "Favorite Anime", + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "properties": { + "type": { + "type": "string" + }, + "start_year": { + "type": "integer" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/anime_meta" + } + ] + } + }, + "manga": { + "description": "Favorite Manga", + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "properties": { + "type": { + "type": "string" + }, + "start_year": { + "type": "integer" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/manga_meta" + } + ] + } + }, + "characters": { + "description": "Favorite Characters", + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/character_meta" + }, + { + "$ref": "#/components/schemas/mal_url_2" + } + ] + } + }, + "people": { + "description": "Favorite People", + "type": "array", + "items": { + "$ref": "#/components/schemas/character_meta" + } + } + }, + "type": "object" + }, + "user_profile_full": { + "description": "Transform the resource into an array.", + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer", + "nullable": true + }, + "username": { + "description": "MyAnimeList Username", + "type": "string" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/user_images" + }, + "last_online": { + "description": "Last Online Date ISO8601", + "type": "string", + "nullable": true + }, + "gender": { + "description": "User Gender", + "type": "string", + "nullable": true + }, + "birthday": { + "description": "Birthday Date ISO8601", + "type": "string", + "nullable": true + }, + "location": { + "description": "Location", + "type": "string", + "nullable": true + }, + "joined": { + "description": "Joined Date ISO8601", + "type": "string", + "nullable": true + }, + "statistics": { + "properties": { + "anime": { + "description": "Anime Statistics", + "properties": { + "days_watched": { + "description": "Number of days spent watching Anime", + "type": "number", + "format": "float" + }, + "mean_score": { + "description": "Mean Score", + "type": "number", + "format": "float" + }, + "watching": { + "description": "Anime Watching", + "type": "integer" + }, + "completed": { + "description": "Anime Completed", + "type": "integer" + }, + "on_hold": { + "description": "Anime On-Hold", + "type": "integer" + }, + "dropped": { + "description": "Anime Dropped", + "type": "integer" + }, + "plan_to_watch": { + "description": "Anime Planned to Watch", + "type": "integer" + }, + "total_entries": { + "description": "Total Anime entries on User list", + "type": "integer" + }, + "rewatched": { + "description": "Anime re-watched", + "type": "integer" + }, + "episodes_watched": { + "description": "Number of Anime Episodes Watched", + "type": "integer" + } + }, + "type": "object" + }, + "manga": { + "description": "Manga Statistics", + "properties": { + "days_read": { + "description": "Number of days spent reading Manga", + "type": "number", + "format": "float" + }, + "mean_score": { + "description": "Mean Score", + "type": "number", + "format": "float" + }, + "reading": { + "description": "Manga Reading", + "type": "integer" + }, + "completed": { + "description": "Manga Completed", + "type": "integer" + }, + "on_hold": { + "description": "Manga On-Hold", + "type": "integer" + }, + "dropped": { + "description": "Manga Dropped", + "type": "integer" + }, + "plan_to_read": { + "description": "Manga Planned to Read", + "type": "integer" + }, + "total_entries": { + "description": "Total Manga entries on User list", + "type": "integer" + }, + "reread": { + "description": "Manga re-read", + "type": "integer" + }, + "chapters_read": { + "description": "Number of Manga Chapters Read", + "type": "integer" + }, + "volumes_read": { + "description": "Number of Manga Volumes Read", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "external": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "user_history": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/history" + } + } + }, + "type": "object" + }, + "history": { + "description": "Transform the resource into an array.", + "properties": { + "entry": { + "$ref": "#/components/schemas/mal_url" + }, + "increment": { + "description": "Number of episodes/chapters watched/read", + "type": "integer" + }, + "date": { + "description": "Date ISO8601", + "type": "string" + } + }, + "type": "object" + }, + "user_updates": { + "properties": { + "data": { + "properties": { + "anime": { + "description": "Last updated Anime", + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "properties": { + "entry": { + "$ref": "#/components/schemas/anime_meta" + } + }, + "type": "object" + }, + { + "properties": { + "score": { + "type": "integer", + "nullable": true + }, + "status": { + "type": "string" + }, + "episodes_seen": { + "type": "integer", + "nullable": true + }, + "episodes_total": { + "type": "integer", + "nullable": true + }, + "date": { + "description": "ISO8601 format", + "type": "string" + } + }, + "type": "object" + } + ] + } + }, + "manga": { + "description": "Last updated Manga", + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "properties": { + "entry": { + "$ref": "#/components/schemas/manga_meta" + } + }, + "type": "object" + }, + { + "properties": { + "score": { + "type": "integer", + "nullable": true + }, + "status": { + "type": "string" + }, + "chapters_read": { + "type": "integer", + "nullable": true + }, + "chapters_total": { + "type": "integer", + "nullable": true + }, + "volumes_read": { + "type": "integer", + "nullable": true + }, + "volumes_total": { + "type": "integer", + "nullable": true + }, + "date": { + "description": "ISO8601 format", + "type": "string" + } + }, + "type": "object" + } + ] + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "user_profile": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer", + "nullable": true + }, + "username": { + "description": "MyAnimeList Username", + "type": "string" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "$ref": "#/components/schemas/user_images" + }, + "last_online": { + "description": "Last Online Date ISO8601", + "type": "string", + "nullable": true + }, + "gender": { + "description": "User Gender", + "type": "string", + "nullable": true + }, + "birthday": { + "description": "Birthday Date ISO8601", + "type": "string", + "nullable": true + }, + "location": { + "description": "Location", + "type": "string", + "nullable": true + }, + "joined": { + "description": "Joined Date ISO8601", + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "users_temp": { + "description": "Transform the resource into an array.", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "username": { + "description": "MyAnimeList Username", + "type": "string" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "images": { + "description": "Images", + "properties": { + "jpg": { + "description": "Available images in JPG", + "properties": { + "image_url": { + "description": "Image URL JPG (225x335)", + "type": "string" + } + }, + "type": "object" + }, + "webp": { + "description": "Available images in WEBP", + "properties": { + "image_url": { + "description": "Image URL WEBP (225x335)", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "last_online": { + "description": "Last Online Date ISO8601", + "type": "string" + }, + "gender": { + "description": "User Gender", + "type": "string" + }, + "birthday": { + "description": "Birthday Date ISO8601", + "type": "string" + }, + "location": { + "description": "Location", + "type": "string" + }, + "joined": { + "description": "Joined Date ISO8601", + "type": "string" + }, + "anime_stats": { + "description": "Anime Stats", + "properties": { + "days_watched": { + "description": "Number of days spent watching Anime", + "type": "number", + "format": "float" + }, + "mean_score": { + "description": "Mean Score", + "type": "number", + "format": "float" + }, + "watching": { + "description": "Anime Watching", + "type": "integer" + }, + "completed": { + "description": "Anime Completed", + "type": "integer" + }, + "on_hold": { + "description": "Anime On-Hold", + "type": "integer" + }, + "dropped": { + "description": "Anime Dropped", + "type": "integer" + }, + "plan_to_watch": { + "description": "Anime Planned to Watch", + "type": "integer" + }, + "total_entries": { + "description": "Total Anime entries on User list", + "type": "integer" + }, + "rewatched": { + "description": "Anime re-watched", + "type": "integer" + }, + "episodes_watched": { + "description": "Number of Anime Episodes Watched", + "type": "integer" + } + }, + "type": "object" + }, + "manga_stats": { + "description": "Manga Stats", + "properties": { + "days_read": { + "description": "Number of days spent reading Manga", + "type": "number", + "format": "float" + }, + "mean_score": { + "description": "Mean Score", + "type": "number", + "format": "float" + }, + "reading": { + "description": "Manga Reading", + "type": "integer" + }, + "completed": { + "description": "Manga Completed", + "type": "integer" + }, + "on_hold": { + "description": "Manga On-Hold", + "type": "integer" + }, + "dropped": { + "description": "Manga Dropped", + "type": "integer" + }, + "plan_to_read": { + "description": "Manga Planned to Read", + "type": "integer" + }, + "total_entries": { + "description": "Total Manga entries on User list", + "type": "integer" + }, + "reread": { + "description": "Manga re-read", + "type": "integer" + }, + "chapters_read": { + "description": "Number of Manga Chapters Read", + "type": "integer" + }, + "volumes_read": { + "description": "Number of Manga Volumes Read", + "type": "integer" + } + }, + "type": "object" + }, + "favorites": { + "description": "Favorite entries", + "properties": { + "anime": { + "description": "Favorite Anime", + "type": "array", + "items": { + "$ref": "#/components/schemas/entry_meta" + } + }, + "manga": { + "description": "Favorite Manga", + "type": "array", + "items": { + "$ref": "#/components/schemas/entry_meta" + } + }, + "characters": { + "description": "Favorite Characters", + "type": "array", + "items": { + "$ref": "#/components/schemas/entry_meta" + } + }, + "people": { + "description": "Favorite People", + "type": "array", + "items": { + "$ref": "#/components/schemas/entry_meta" + } + } + }, + "type": "object" + }, + "about": { + "description": "User About. NOTE: About information is customizable by users through BBCode on MyAnimeList. This means users can add multimedia content, different text sizes, etc. Due to this freeform, Jikan returns parsed HTML. Validate on your end!", + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "user_statistics": { + "properties": { + "data": { + "properties": { + "anime": { + "description": "Anime Statistics", + "properties": { + "days_watched": { + "description": "Number of days spent watching Anime", + "type": "number", + "format": "float" + }, + "mean_score": { + "description": "Mean Score", + "type": "number", + "format": "float" + }, + "watching": { + "description": "Anime Watching", + "type": "integer" + }, + "completed": { + "description": "Anime Completed", + "type": "integer" + }, + "on_hold": { + "description": "Anime On-Hold", + "type": "integer" + }, + "dropped": { + "description": "Anime Dropped", + "type": "integer" + }, + "plan_to_watch": { + "description": "Anime Planned to Watch", + "type": "integer" + }, + "total_entries": { + "description": "Total Anime entries on User list", + "type": "integer" + }, + "rewatched": { + "description": "Anime re-watched", + "type": "integer" + }, + "episodes_watched": { + "description": "Number of Anime Episodes Watched", + "type": "integer" + } + }, + "type": "object" + }, + "manga": { + "description": "Manga Statistics", + "properties": { + "days_read": { + "description": "Number of days spent reading Manga", + "type": "number", + "format": "float" + }, + "mean_score": { + "description": "Mean Score", + "type": "number", + "format": "float" + }, + "reading": { + "description": "Manga Reading", + "type": "integer" + }, + "completed": { + "description": "Manga Completed", + "type": "integer" + }, + "on_hold": { + "description": "Manga On-Hold", + "type": "integer" + }, + "dropped": { + "description": "Manga Dropped", + "type": "integer" + }, + "plan_to_read": { + "description": "Manga Planned to Read", + "type": "integer" + }, + "total_entries": { + "description": "Total Manga entries on User list", + "type": "integer" + }, + "reread": { + "description": "Manga re-read", + "type": "integer" + }, + "chapters_read": { + "description": "Number of Manga Chapters Read", + "type": "integer" + }, + "volumes_read": { + "description": "Number of Manga Volumes Read", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "recommendations": { + "description": "Recommendations", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "mal_id": { + "description": "MAL IDs of recommendations is both of the MAL ID's with a `-` delimiter", + "type": "string" + }, + "entry": { + "description": "Array of 2 entries that are being recommended to each other", + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/anime_meta" + }, + { + "$ref": "#/components/schemas/manga_meta" + } + ] + } + }, + "content": { + "description": "Recommendation context provided by the user", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/user_by_id" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "entry_recommendations": { + "description": "Entry Recommendations Resource", + "properties": { + "data": { + "properties": { + "url": { + "description": "Recommendation MyAnimeList URL", + "type": "string" + }, + "votes": { + "description": "Number of users who have recommended this entry", + "type": "integer" + } + }, + "type": "array", + "items": { + "properties": { + "entry": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/anime_meta" + }, + { + "$ref": "#/components/schemas/manga_meta" + } + ] + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "manga_review": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "type": { + "description": "Entry Type", + "type": "string" + }, + "votes": { + "description": "Number of user votes on the Review", + "type": "integer" + }, + "date": { + "description": "Review created date ISO8601", + "type": "string" + }, + "chapters_read": { + "description": "Number of chapters read by the reviewer", + "type": "integer" + }, + "review": { + "description": "Review content", + "type": "string" + }, + "scores": { + "description": "Review Scores breakdown", + "properties": { + "overall": { + "description": "Overall Score", + "type": "integer" + }, + "story": { + "description": "Story Score", + "type": "integer" + }, + "art": { + "description": "Art Score", + "type": "integer" + }, + "character": { + "description": "Character Score", + "type": "integer" + }, + "enjoyment": { + "description": "Enjoyment Score", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "anime_review": { + "properties": { + "mal_id": { + "description": "MyAnimeList ID", + "type": "integer" + }, + "url": { + "description": "MyAnimeList URL", + "type": "string" + }, + "type": { + "description": "Entry Type", + "type": "string" + }, + "votes": { + "description": "Number of user votes on the Review", + "type": "integer" + }, + "date": { + "description": "Review created date ISO8601", + "type": "string" + }, + "review": { + "description": "Review content", + "type": "string" + }, + "episodes_watched": { + "description": "Number of episodes watched", + "type": "integer" + }, + "scores": { + "description": "Review Scores breakdown", + "properties": { + "overall": { + "description": "Overall Score", + "type": "integer" + }, + "story": { + "description": "Story Score", + "type": "integer" + }, + "animation": { + "description": "Animation Score", + "type": "integer" + }, + "sound": { + "description": "Sound Score", + "type": "integer" + }, + "character": { + "description": "Character Score", + "type": "integer" + }, + "enjoyment": { + "description": "Enjoyment Score", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "anime_reviews": { + "description": "Anime Reviews Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/anime_review" + } + ] + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "manga_reviews": { + "description": "Manga Reviews Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/manga_review" + } + ] + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "streaming_links": { + "description": "Streaming links", + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "anime_userupdates": { + "description": "Anime User Updates Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + }, + "score": { + "description": "User Score", + "type": "integer", + "nullable": true + }, + "status": { + "description": "User list status", + "type": "string" + }, + "episodes_seen": { + "description": "Number of episodes seen", + "type": "integer", + "nullable": true + }, + "episodes_total": { + "description": "Total number of episodes", + "type": "integer", + "nullable": true + }, + "date": { + "description": "Last updated date ISO8601", + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + }, + "manga_userupdates": { + "description": "Manga User Updates Resource", + "allOf": [ + { + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "user": { + "$ref": "#/components/schemas/user_meta" + }, + "score": { + "description": "User Score", + "type": "integer", + "nullable": true + }, + "status": { + "description": "User list status", + "type": "string" + }, + "volumes_read": { + "description": "Number of volumes read", + "type": "integer" + }, + "volumes_total": { + "description": "Total number of volumes", + "type": "integer" + }, + "chapters_read": { + "description": "Number of chapters read", + "type": "integer" + }, + "chapters_total": { + "description": "Total number of chapters", + "type": "integer" + }, + "date": { + "description": "Last updated date ISO8601", + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/pagination" + } + ] + } + }, + "responses": { + "400": { + "description": "Error: Bad request. When required parameters were not supplied." + } + }, + "parameters": { + "page": { + "name": "page", + "in": "query", + "schema": { + "type": "integer" + } + }, + "limit": { + "name": "limit", + "in": "query", + "schema": { + "type": "integer" + } + } + } + }, + "externalDocs": { + "description": "About", + "url": "https://jikan.moe" + } +} \ No newline at end of file diff --git a/config/jikan.php b/config/jikan.php new file mode 100644 index 0000000..dbb1d28 --- /dev/null +++ b/config/jikan.php @@ -0,0 +1,7 @@ + __DIR__ . '/jikan-openapi.json', + 'namespace' => 'Jikan\JikanPHP', + 'directory' => __DIR__ . '/../src', +]; diff --git a/grumphp.yml b/grumphp.yml index 2508e62..9eafb4a 100644 --- a/grumphp.yml +++ b/grumphp.yml @@ -1,15 +1,28 @@ parameters: git_dir: . bin_dir: vendor/bin +grumphp: tasks: phpunit: ~ - phpcs: - standard: PSR2 - ignore_patterns: - - test/* +# phpstan: +# level: "%phpstan.level%" +# configuration: "%phpstan.config%" +# ignore_patterns: "%phpstan.ignore%" +# metadata: +# priority: 200 + phpcsfixer2: + allow_risky: true + cache_file: ~ + config: ".php-cs-fixer.dist.php" + using_cache: ~ + config_contains_finder: true + verbose: true + diff: false + triggered_by: ['php'] + metadata: + priority: 200 composer: no_check_lock: true yamllint: ignore_patterns: - "#test/(.*).yml#" - phplint: ~ diff --git a/helper/Constants.php b/helper/Constants.php deleted file mode 100644 index 0ff3b9a..0000000 --- a/helper/Constants.php +++ /dev/null @@ -1,184 +0,0 @@ - - producers: - type: array - licensors: - type: array - studios: - type: array - genres: - type: array - openingThemes: - type: array - endingThemes: - type: array diff --git a/metadata/JikanPHP.Model.Anime.AnimeCharactersAndStaff.yml b/metadata/JikanPHP.Model.Anime.AnimeCharactersAndStaff.yml deleted file mode 100644 index bfa0c68..0000000 --- a/metadata/JikanPHP.Model.Anime.AnimeCharactersAndStaff.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Anime\AnimeCharactersAndStaff: - properties: - characters: - type: array - staff: - type: array diff --git a/metadata/JikanPHP.Model.Anime.AnimeMoreInfo.yml b/metadata/JikanPHP.Model.Anime.AnimeMoreInfo.yml deleted file mode 100644 index ac3751e..0000000 --- a/metadata/JikanPHP.Model.Anime.AnimeMoreInfo.yml +++ /dev/null @@ -1,4 +0,0 @@ -JikanPHP\Model\Anime\AnimeMoreInfo: - properties: - moreInfo: - type: string diff --git a/metadata/JikanPHP.Model.Anime.AnimeRecentlyUpdatedByUser.yml b/metadata/JikanPHP.Model.Anime.AnimeRecentlyUpdatedByUser.yml deleted file mode 100644 index fc2c71c..0000000 --- a/metadata/JikanPHP.Model.Anime.AnimeRecentlyUpdatedByUser.yml +++ /dev/null @@ -1,18 +0,0 @@ -JikanPHP\Model\Anime\AnimeRecentlyUpdatedByUser: - properties: - username: - type: string - url: - type: string - imageUrl: - type: string - score: - type: int - status: - type: string - episodesSeen: - type: int - episodesTotal: - type: int - date: - type: DateTimeImmutable diff --git a/metadata/JikanPHP.Model.Anime.AnimeReview.yml b/metadata/JikanPHP.Model.Anime.AnimeReview.yml deleted file mode 100644 index ba3dd8e..0000000 --- a/metadata/JikanPHP.Model.Anime.AnimeReview.yml +++ /dev/null @@ -1,14 +0,0 @@ -JikanPHP\Model\Anime\AnimeReview: - properties: - malId: - type: int - url: - type: string - helpfulCount: - type: int - date: - type: DateTimeImmutable - reviewer: - type: JikanPHP\Model\Anime\AnimeReviewer - content: - type: string diff --git a/metadata/JikanPHP.Model.Anime.AnimeReviewScores.yml b/metadata/JikanPHP.Model.Anime.AnimeReviewScores.yml deleted file mode 100644 index efd70b5..0000000 --- a/metadata/JikanPHP.Model.Anime.AnimeReviewScores.yml +++ /dev/null @@ -1,14 +0,0 @@ -JikanPHP\Model\Anime\AnimeReviewScores: - properties: - overall: - type: int - story: - type: int - animation: - type: int - sound: - type: int - character: - type: int - enjoyment: - type: int diff --git a/metadata/JikanPHP.Model.Anime.AnimeReviewer.yml b/metadata/JikanPHP.Model.Anime.AnimeReviewer.yml deleted file mode 100644 index 4abe5a3..0000000 --- a/metadata/JikanPHP.Model.Anime.AnimeReviewer.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\Anime\AnimeReviewer: - properties: - episodesSeen: - type: int - scores: - type: JikanPHP\Model\Anime\AnimeReviewScores - url: - type: string - imageUrl: - type: string - username: - type: string diff --git a/metadata/JikanPHP.Model.Anime.AnimeStats.yml b/metadata/JikanPHP.Model.Anime.AnimeStats.yml deleted file mode 100644 index 3f2584f..0000000 --- a/metadata/JikanPHP.Model.Anime.AnimeStats.yml +++ /dev/null @@ -1,16 +0,0 @@ -JikanPHP\Model\Anime\AnimeStats: - properties: - watching: - type: int - completed: - type: int - onHold: - type: int - dropped: - type: int - planToWatch: - type: int - total: - type: int - scores: - type: int diff --git a/metadata/JikanPHP.Model.Anime.AnimeVideos.yml b/metadata/JikanPHP.Model.Anime.AnimeVideos.yml deleted file mode 100644 index ada07a3..0000000 --- a/metadata/JikanPHP.Model.Anime.AnimeVideos.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Anime\AnimeVideos: - properties: - promo: - type: array - episodes: - type: array diff --git a/metadata/JikanPHP.Model.Anime.EpisodeListItem.yml b/metadata/JikanPHP.Model.Anime.EpisodeListItem.yml deleted file mode 100644 index f138118..0000000 --- a/metadata/JikanPHP.Model.Anime.EpisodeListItem.yml +++ /dev/null @@ -1,20 +0,0 @@ -JikanPHP\Model\Anime\EpisodeListItem: - properties: - episodeId: - type: int - title: - type: string - titleJapanese: - type: string - titleRomanji: - type: string - aired: - type: JikanPHP\Model\Common\DateRange - filler: - type: bool - recap: - type: bool - videoUrl: - type: string - forumUrl: - type: string diff --git a/metadata/JikanPHP.Model.Anime.Episodes.yml b/metadata/JikanPHP.Model.Anime.Episodes.yml deleted file mode 100644 index d25838d..0000000 --- a/metadata/JikanPHP.Model.Anime.Episodes.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Anime\Episodes: - properties: - episodesLastPage: - type: int - episodes: - type: array diff --git a/metadata/JikanPHP.Model.Anime.PromoListItem.yml b/metadata/JikanPHP.Model.Anime.PromoListItem.yml deleted file mode 100644 index 77d50ec..0000000 --- a/metadata/JikanPHP.Model.Anime.PromoListItem.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\Anime\PromoListItem: - properties: - title: - type: string - imageUrl: - type: string - videoUrl: - type: string diff --git a/metadata/JikanPHP.Model.Anime.StaffListItem.yml b/metadata/JikanPHP.Model.Anime.StaffListItem.yml deleted file mode 100644 index 6995d4c..0000000 --- a/metadata/JikanPHP.Model.Anime.StaffListItem.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\Anime\StaffListItem: - properties: - malId: - type: int - url: - type: string - name: - type: string - imageUrl: - type: string - positions: - type: array diff --git a/metadata/JikanPHP.Model.Anime.StreamEpisodeListItem.yml b/metadata/JikanPHP.Model.Anime.StreamEpisodeListItem.yml deleted file mode 100644 index 55ce677..0000000 --- a/metadata/JikanPHP.Model.Anime.StreamEpisodeListItem.yml +++ /dev/null @@ -1,10 +0,0 @@ -JikanPHP\Model\Anime\StreamEpisodeListItem: - properties: - title: - type: string - episode: - type: string - url: - type: string - imageUrl: - type: string diff --git a/metadata/JikanPHP.Model.Character.Animeography.yml b/metadata/JikanPHP.Model.Character.Animeography.yml deleted file mode 100644 index b7e5101..0000000 --- a/metadata/JikanPHP.Model.Character.Animeography.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Character\Animeography: - properties: { } diff --git a/metadata/JikanPHP.Model.Character.Character.yml b/metadata/JikanPHP.Model.Character.Character.yml deleted file mode 100644 index 47561a9..0000000 --- a/metadata/JikanPHP.Model.Character.Character.yml +++ /dev/null @@ -1,24 +0,0 @@ -JikanPHP\Model\Character\Character: - properties: - malId: - type: int - url: - type: string - name: - type: string - nameKanji: - type: string - nicknames: - type: array - about: - type: string - memberFavorites: - type: int - imageUrl: - type: string - animeography: - type: array - mangaography: - type: array - voiceActors: - type: array diff --git a/metadata/JikanPHP.Model.Character.CharacterListItem.yml b/metadata/JikanPHP.Model.Character.CharacterListItem.yml deleted file mode 100644 index 5e0452c..0000000 --- a/metadata/JikanPHP.Model.Character.CharacterListItem.yml +++ /dev/null @@ -1,14 +0,0 @@ -JikanPHP\Model\Character\CharacterListItem: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - name: - type: string - role: - type: string - voiceActors: - type: array diff --git a/metadata/JikanPHP.Model.Character.Mangaography.yml b/metadata/JikanPHP.Model.Character.Mangaography.yml deleted file mode 100644 index d733156..0000000 --- a/metadata/JikanPHP.Model.Character.Mangaography.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Character\Mangaography: - properties: { } diff --git a/metadata/JikanPHP.Model.Character.VoiceActor.yml b/metadata/JikanPHP.Model.Character.VoiceActor.yml deleted file mode 100644 index dcc2dcb..0000000 --- a/metadata/JikanPHP.Model.Character.VoiceActor.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\Character\VoiceActor: - properties: - malId: - type: int - name: - type: string - url: - type: string - imageUrl: - type: string - language: - type: string diff --git a/metadata/JikanPHP.Model.Club.Club.yml b/metadata/JikanPHP.Model.Club.Club.yml deleted file mode 100644 index 4cb72eb..0000000 --- a/metadata/JikanPHP.Model.Club.Club.yml +++ /dev/null @@ -1,28 +0,0 @@ -JikanPHP\Model\Club\Club: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - title: - type: string - membersCount: - type: int - picturesCount: - type: int - category: - type: string - created: - type: DateTimeImmutable - type: - type: string - staff: - type: array - animeRelations: - type: array - mangaRelations: - type: array - characterRelations: - type: array diff --git a/metadata/JikanPHP.Model.Club.UserList.yml b/metadata/JikanPHP.Model.Club.UserList.yml deleted file mode 100644 index 605285f..0000000 --- a/metadata/JikanPHP.Model.Club.UserList.yml +++ /dev/null @@ -1,4 +0,0 @@ -JikanPHP\Model\Club\UserList: - properties: - profiles: - type: array diff --git a/metadata/JikanPHP.Model.Club.UserProfile.yml b/metadata/JikanPHP.Model.Club.UserProfile.yml deleted file mode 100644 index f9bc1be..0000000 --- a/metadata/JikanPHP.Model.Club.UserProfile.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\Club\UserProfile: - properties: - username: - type: string - url: - type: string - imageUrl: - type: string diff --git a/metadata/JikanPHP.Model.Common.AnimeCard.yml b/metadata/JikanPHP.Model.Common.AnimeCard.yml deleted file mode 100644 index 047e3b0..0000000 --- a/metadata/JikanPHP.Model.Common.AnimeCard.yml +++ /dev/null @@ -1,34 +0,0 @@ -JikanPHP\Model\Common\AnimeCard: - properties: - malId: - type: int - url: - type: string - title: - type: string - imageUrl: - type: string - synopsis: - type: string - type: - type: string - airingStart: - type: DateTimeImmutable - episodes: - type: int - members: - type: int - genres: - type: array - source: - type: string - producers: - type: array - score: - type: float - licensors: - type: array - r18: - type: bool - kids: - type: bool diff --git a/metadata/JikanPHP.Model.Common.AnimeMeta.yml b/metadata/JikanPHP.Model.Common.AnimeMeta.yml deleted file mode 100644 index 6f46118..0000000 --- a/metadata/JikanPHP.Model.Common.AnimeMeta.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Common\AnimeMeta: - properties: { } diff --git a/metadata/JikanPHP.Model.Common.CharacterMeta.yml b/metadata/JikanPHP.Model.Common.CharacterMeta.yml deleted file mode 100644 index 082a0dd..0000000 --- a/metadata/JikanPHP.Model.Common.CharacterMeta.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Common\CharacterMeta: - properties: { } diff --git a/metadata/JikanPHP.Model.Common.DateProp.yml b/metadata/JikanPHP.Model.Common.DateProp.yml deleted file mode 100644 index ab03a03..0000000 --- a/metadata/JikanPHP.Model.Common.DateProp.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\Common\DateProp: - properties: - day: - type: integer - month: - type: integer - year: - type: integer \ No newline at end of file diff --git a/metadata/JikanPHP.Model.Common.DateRange.yml b/metadata/JikanPHP.Model.Common.DateRange.yml deleted file mode 100644 index 6715a8d..0000000 --- a/metadata/JikanPHP.Model.Common.DateRange.yml +++ /dev/null @@ -1,10 +0,0 @@ -JikanPHP\Model\Common\DateRange: - properties: - string: - type: string - from: - type: string - to: - type: string - prop: - type: array \ No newline at end of file diff --git a/metadata/JikanPHP.Model.Common.HistoryMeta.yml b/metadata/JikanPHP.Model.Common.HistoryMeta.yml deleted file mode 100644 index 26ef719..0000000 --- a/metadata/JikanPHP.Model.Common.HistoryMeta.yml +++ /dev/null @@ -1,10 +0,0 @@ -JikanPHP\Model\Common\HistoryMeta: - properties: - malId: - type: int - type: - type: string - name: - type: string - url: - type: string diff --git a/metadata/JikanPHP.Model.Common.ItemBasicMeta.yml b/metadata/JikanPHP.Model.Common.ItemBasicMeta.yml deleted file mode 100644 index a995455..0000000 --- a/metadata/JikanPHP.Model.Common.ItemBasicMeta.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Common\ItemBasicMeta: - properties: - malId: - type: int - name: - type: string diff --git a/metadata/JikanPHP.Model.Common.ItemMeta.yml b/metadata/JikanPHP.Model.Common.ItemMeta.yml deleted file mode 100644 index fecc4eb..0000000 --- a/metadata/JikanPHP.Model.Common.ItemMeta.yml +++ /dev/null @@ -1,10 +0,0 @@ -JikanPHP\Model\Common\ItemMeta: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - name: - type: string diff --git a/metadata/JikanPHP.Model.Common.LicensorMeta.yml b/metadata/JikanPHP.Model.Common.LicensorMeta.yml deleted file mode 100644 index 3f5efc7..0000000 --- a/metadata/JikanPHP.Model.Common.LicensorMeta.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Common\LicensorMeta: - properties: { } diff --git a/metadata/JikanPHP.Model.Common.MagazineMeta.yml b/metadata/JikanPHP.Model.Common.MagazineMeta.yml deleted file mode 100644 index b8f5557..0000000 --- a/metadata/JikanPHP.Model.Common.MagazineMeta.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Common\MagazineMeta: - properties: { } diff --git a/metadata/JikanPHP.Model.Common.MalUrl.yml b/metadata/JikanPHP.Model.Common.MalUrl.yml deleted file mode 100644 index 77dcc4a..0000000 --- a/metadata/JikanPHP.Model.Common.MalUrl.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Common\MalUrl: - properties: - name: - type: string - url: - type: string diff --git a/metadata/JikanPHP.Model.Common.MangaCard.yml b/metadata/JikanPHP.Model.Common.MangaCard.yml deleted file mode 100644 index bfad50f..0000000 --- a/metadata/JikanPHP.Model.Common.MangaCard.yml +++ /dev/null @@ -1,28 +0,0 @@ -JikanPHP\Model\Common\MangaCard: - properties: - malId: - type: int - url: - type: string - title: - type: string - imageUrl: - type: string - synopsis: - type: string - type: - type: string - publishingStart: - type: DateTimeImmutable - volumes: - type: int - members: - type: int - genres: - type: array - authors: - type: array - score: - type: float - serialization: - type: array diff --git a/metadata/JikanPHP.Model.Common.MangaMeta.yml b/metadata/JikanPHP.Model.Common.MangaMeta.yml deleted file mode 100644 index c9e1aab..0000000 --- a/metadata/JikanPHP.Model.Common.MangaMeta.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Common\MangaMeta: - properties: { } diff --git a/metadata/JikanPHP.Model.Common.Ography.yml b/metadata/JikanPHP.Model.Common.Ography.yml deleted file mode 100644 index 0414316..0000000 --- a/metadata/JikanPHP.Model.Common.Ography.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\Common\Ography: - properties: - malId: - type: int - name: - type: string - url: - type: string - imageUrl: - type: string - role: - type: string diff --git a/metadata/JikanPHP.Model.Common.PersonMeta.yml b/metadata/JikanPHP.Model.Common.PersonMeta.yml deleted file mode 100644 index 781fd27..0000000 --- a/metadata/JikanPHP.Model.Common.PersonMeta.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Common\PersonMeta: - properties: { } diff --git a/metadata/JikanPHP.Model.Common.Picture.yml b/metadata/JikanPHP.Model.Common.Picture.yml deleted file mode 100644 index 52b34a5..0000000 --- a/metadata/JikanPHP.Model.Common.Picture.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Common\Picture: - properties: - large: - type: string - small: - type: string diff --git a/metadata/JikanPHP.Model.Common.Recommendation.yml b/metadata/JikanPHP.Model.Common.Recommendation.yml deleted file mode 100644 index f16fce2..0000000 --- a/metadata/JikanPHP.Model.Common.Recommendation.yml +++ /dev/null @@ -1,14 +0,0 @@ -JikanPHP\Model\Common\Recommendation: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - recommendationUrl: - type: string - title: - type: string - recommendationCount: - type: int diff --git a/metadata/JikanPHP.Model.Common.Reviewer.yml b/metadata/JikanPHP.Model.Common.Reviewer.yml deleted file mode 100644 index db44790..0000000 --- a/metadata/JikanPHP.Model.Common.Reviewer.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\Common\Reviewer: - properties: - url: - type: string - imageUrl: - type: string - username: - type: string diff --git a/metadata/JikanPHP.Model.Common.StudioMeta.yml b/metadata/JikanPHP.Model.Common.StudioMeta.yml deleted file mode 100644 index 598ee36..0000000 --- a/metadata/JikanPHP.Model.Common.StudioMeta.yml +++ /dev/null @@ -1,2 +0,0 @@ -JikanPHP\Model\Common\StudioMeta: - properties: { } diff --git a/metadata/JikanPHP.Model.Forum.ForumPost.yml b/metadata/JikanPHP.Model.Forum.ForumPost.yml deleted file mode 100644 index 36753b9..0000000 --- a/metadata/JikanPHP.Model.Forum.ForumPost.yml +++ /dev/null @@ -1,10 +0,0 @@ -JikanPHP\Model\Forum\ForumPost: - properties: - url: - type: string - authorName: - type: string - authorUrl: - type: string - datePosted: - type: DateTimeImmutable diff --git a/metadata/JikanPHP.Model.Forum.ForumTopic.yml b/metadata/JikanPHP.Model.Forum.ForumTopic.yml deleted file mode 100644 index 9c3eff4..0000000 --- a/metadata/JikanPHP.Model.Forum.ForumTopic.yml +++ /dev/null @@ -1,18 +0,0 @@ -JikanPHP\Model\Forum\ForumTopic: - properties: - topicId: - type: int - url: - type: string - title: - type: string - datePosted: - type: DateTimeImmutable - authorName: - type: string - authorUrl: - type: string - replies: - type: int - lastPost: - type: JikanPHP\Model\Forum\ForumPost diff --git a/metadata/JikanPHP.Model.Genre.AnimeGenre.yml b/metadata/JikanPHP.Model.Genre.AnimeGenre.yml deleted file mode 100644 index da4b7e6..0000000 --- a/metadata/JikanPHP.Model.Genre.AnimeGenre.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\Genre\AnimeGenre: - properties: - malUrl: - type: JikanPHP\Model\Common\MalUrl - itemCount: - type: int - anime: - type: array diff --git a/metadata/JikanPHP.Model.Genre.MangaGenre.yml b/metadata/JikanPHP.Model.Genre.MangaGenre.yml deleted file mode 100644 index 30a5849..0000000 --- a/metadata/JikanPHP.Model.Genre.MangaGenre.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\Genre\MangaGenre: - properties: - malUrl: - type: JikanPHP\Model\Common\MalUrl - itemCount: - type: int - manga: - type: array diff --git a/metadata/JikanPHP.Model.Magazine.Magazine.yml b/metadata/JikanPHP.Model.Magazine.Magazine.yml deleted file mode 100644 index 26220e0..0000000 --- a/metadata/JikanPHP.Model.Magazine.Magazine.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Magazine\Magazine: - properties: - malUrl: - type: JikanPHP\Model\Common\MalUrl - manga: - type: array diff --git a/metadata/JikanPHP.Model.Magazine.MagazineManga.yml b/metadata/JikanPHP.Model.Magazine.MagazineManga.yml deleted file mode 100644 index 8e81c50..0000000 --- a/metadata/JikanPHP.Model.Magazine.MagazineManga.yml +++ /dev/null @@ -1,28 +0,0 @@ -JikanPHP\Model\Magazine\MagazineManga: - properties: - malId: - type: int - url: - type: string - title: - type: string - imageUrl: - type: string - synopsis: - type: string - type: - type: string - publishingStart: - type: DateTimeImmutable - volumes: - type: int - members: - type: int - genres: - type: array - authors: - type: array - score: - type: float - serialization: - type: array diff --git a/metadata/JikanPHP.Model.Manga.CharacterListItem.yml b/metadata/JikanPHP.Model.Manga.CharacterListItem.yml deleted file mode 100644 index d39a399..0000000 --- a/metadata/JikanPHP.Model.Manga.CharacterListItem.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\Manga\CharacterListItem: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - name: - type: string - role: - type: string diff --git a/metadata/JikanPHP.Model.Manga.Manga.yml b/metadata/JikanPHP.Model.Manga.Manga.yml deleted file mode 100644 index bd52002..0000000 --- a/metadata/JikanPHP.Model.Manga.Manga.yml +++ /dev/null @@ -1,52 +0,0 @@ -JikanPHP\Model\Manga\Manga: - properties: - malId: - type: int - url: - type: string - title: - type: string - titleEnglish: - type: string - titleSynonyms: - type: array - titleJapanese: - type: string - status: - type: string - imageUrl: - type: string - type: - type: string - volumes: - type: int - chapters: - type: int - publishing: - type: bool - published: - type: JikanPHP\Model\Common\DateRange - rank: - type: int - score: - type: float - scoredBy: - type: int - popularity: - type: int - members: - type: int - favorites: - type: int - synopsis: - type: string - background: - type: string - related: - type: array - genres: - type: array - authors: - type: array - serializations: - type: array diff --git a/metadata/JikanPHP.Model.Manga.MangaMoreInfo.yml b/metadata/JikanPHP.Model.Manga.MangaMoreInfo.yml deleted file mode 100644 index 424bad2..0000000 --- a/metadata/JikanPHP.Model.Manga.MangaMoreInfo.yml +++ /dev/null @@ -1,4 +0,0 @@ -JikanPHP\Model\Manga\MangaMoreInfo: - properties: - moreInfo: - type: string diff --git a/metadata/JikanPHP.Model.Manga.MangaRecentlyUpdatedByUser.yml b/metadata/JikanPHP.Model.Manga.MangaRecentlyUpdatedByUser.yml deleted file mode 100644 index 7a3291c..0000000 --- a/metadata/JikanPHP.Model.Manga.MangaRecentlyUpdatedByUser.yml +++ /dev/null @@ -1,22 +0,0 @@ -JikanPHP\Model\Manga\MangaRecentlyUpdatedByUser: - properties: - username: - type: string - url: - type: string - imageUrl: - type: string - score: - type: int - status: - type: string - volumesRead: - type: int - volumesTotal: - type: int - chaptersRead: - type: int - chaptersTotal: - type: int - date: - type: DateTimeImmutable diff --git a/metadata/JikanPHP.Model.Manga.MangaReview.yml b/metadata/JikanPHP.Model.Manga.MangaReview.yml deleted file mode 100644 index 7bcfb2c..0000000 --- a/metadata/JikanPHP.Model.Manga.MangaReview.yml +++ /dev/null @@ -1,14 +0,0 @@ -JikanPHP\Model\Manga\MangaReview: - properties: - malId: - type: int - url: - type: string - helpfulCount: - type: int - date: - type: DateTimeImmutable - reviewer: - type: JikanPHP\Model\Manga\MangaReviewer - content: - type: string diff --git a/metadata/JikanPHP.Model.Manga.MangaReviewScores.yml b/metadata/JikanPHP.Model.Manga.MangaReviewScores.yml deleted file mode 100644 index cb716df..0000000 --- a/metadata/JikanPHP.Model.Manga.MangaReviewScores.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\Manga\MangaReviewScores: - properties: - overall: - type: int - story: - type: int - art: - type: int - character: - type: int - enjoyment: - type: int diff --git a/metadata/JikanPHP.Model.Manga.MangaReviewer.yml b/metadata/JikanPHP.Model.Manga.MangaReviewer.yml deleted file mode 100644 index 1721ea7..0000000 --- a/metadata/JikanPHP.Model.Manga.MangaReviewer.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\Manga\MangaReviewer: - properties: - chaptersRead: - type: int - scores: - type: JikanPHP\Model\Manga\MangaReviewScores - url: - type: string - imageUrl: - type: string - username: - type: string diff --git a/metadata/JikanPHP.Model.Manga.MangaStats.yml b/metadata/JikanPHP.Model.Manga.MangaStats.yml deleted file mode 100644 index 77e534d..0000000 --- a/metadata/JikanPHP.Model.Manga.MangaStats.yml +++ /dev/null @@ -1,16 +0,0 @@ -JikanPHP\Model\Manga\MangaStats: - properties: - reading: - type: int - completed: - type: int - onHold: - type: int - dropped: - type: int - planToRead: - type: int - total: - type: int - scores: - type: int diff --git a/metadata/JikanPHP.Model.News.NewsListItem.yml b/metadata/JikanPHP.Model.News.NewsListItem.yml deleted file mode 100644 index 9695a30..0000000 --- a/metadata/JikanPHP.Model.News.NewsListItem.yml +++ /dev/null @@ -1,20 +0,0 @@ -JikanPHP\Model\News\NewsListItem: - properties: - url: - type: string - title: - type: string - date: - type: DateTimeImmutable - authorName: - type: string - authorUrl: - type: string - forumUrl: - type: string - imageUrl: - type: string - comments: - type: int - intro: - type: string diff --git a/metadata/JikanPHP.Model.Person.AnimeStaffPosition.yml b/metadata/JikanPHP.Model.Person.AnimeStaffPosition.yml deleted file mode 100644 index 8354e2a..0000000 --- a/metadata/JikanPHP.Model.Person.AnimeStaffPosition.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Person\AnimeStaffPosition: - properties: - position: - type: string - animeMeta: - type: JikanPHP\Model\Common\AnimeMeta diff --git a/metadata/JikanPHP.Model.Person.Person.yml b/metadata/JikanPHP.Model.Person.Person.yml deleted file mode 100644 index 477b50e..0000000 --- a/metadata/JikanPHP.Model.Person.Person.yml +++ /dev/null @@ -1,30 +0,0 @@ -JikanPHP\Model\Person\Person: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - websiteUrl: - type: string - name: - type: string - givenName: - type: string - familyName: - type: string - alternateNames: - type: array - birthday: - type: DateTimeImmutable - memberFavorites: - type: int - about: - type: string - voiceActingRoles: - type: array - animeStaffPositions: - type: array - publishedManga: - type: array diff --git a/metadata/JikanPHP.Model.Person.PublishedManga.yml b/metadata/JikanPHP.Model.Person.PublishedManga.yml deleted file mode 100644 index 56c6870..0000000 --- a/metadata/JikanPHP.Model.Person.PublishedManga.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Person\PublishedManga: - properties: - position: - type: string - mangaMeta: - type: mangaMeta diff --git a/metadata/JikanPHP.Model.Person.VoiceActingRole.yml b/metadata/JikanPHP.Model.Person.VoiceActingRole.yml deleted file mode 100644 index 7c27255..0000000 --- a/metadata/JikanPHP.Model.Person.VoiceActingRole.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\Person\VoiceActingRole: - properties: - role: - type: string - animeMeta: - type: JikanPHP\Model\Common\AnimeMeta - characterMeta: - type: JikanPHP\Model\Common\CharacterMeta diff --git a/metadata/JikanPHP.Model.Producer.Producer.yml b/metadata/JikanPHP.Model.Producer.Producer.yml deleted file mode 100644 index 769b2ca..0000000 --- a/metadata/JikanPHP.Model.Producer.Producer.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Producer\Producer: - properties: - malUrl: - type: JikanPHP\Model\Common\MalUrl - anime: - type: array diff --git a/metadata/JikanPHP.Model.Producer.ProducerAnime.yml b/metadata/JikanPHP.Model.Producer.ProducerAnime.yml deleted file mode 100644 index 304d9bd..0000000 --- a/metadata/JikanPHP.Model.Producer.ProducerAnime.yml +++ /dev/null @@ -1,34 +0,0 @@ -JikanPHP\Model\Producer\ProducerAnime: - properties: - malId: - type: int - url: - type: string - title: - type: string - imageUrl: - type: string - synopsis: - type: string - type: - type: string - airingStart: - type: DateTimeImmutable - episodes: - type: int - members: - type: int - genres: - type: array - source: - type: string - producers: - type: array - score: - type: float - licensors: - type: array - r18: - type: bool - kids: - type: bool diff --git a/metadata/JikanPHP.Model.Schedule.Schedule.yml b/metadata/JikanPHP.Model.Schedule.Schedule.yml deleted file mode 100644 index 05c8e2a..0000000 --- a/metadata/JikanPHP.Model.Schedule.Schedule.yml +++ /dev/null @@ -1,20 +0,0 @@ -JikanPHP\Model\Schedule\Schedule: - properties: - monday: - type: array - tuesday: - type: array - wednesday: - type: array - thursday: - type: array - friday: - type: array - saturday: - type: array - sunday: - type: array - other: - type: array - unknown: - type: array diff --git a/metadata/JikanPHP.Model.Search.AnimeSearch.yml b/metadata/JikanPHP.Model.Search.AnimeSearch.yml deleted file mode 100644 index 7ed8eb5..0000000 --- a/metadata/JikanPHP.Model.Search.AnimeSearch.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Search\AnimeSearch: - properties: - results: - type: array - lastPage: - type: int diff --git a/metadata/JikanPHP.Model.Search.AnimeSearchListItem.yml b/metadata/JikanPHP.Model.Search.AnimeSearchListItem.yml deleted file mode 100644 index 72df575..0000000 --- a/metadata/JikanPHP.Model.Search.AnimeSearchListItem.yml +++ /dev/null @@ -1,28 +0,0 @@ -JikanPHP\Model\Search\AnimeSearchListItem: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - title: - type: string - airing: - type: bool - synopsis: - type: string - type: - type: string - episodes: - type: int - score: - type: float - startDate: - type: DateTimeImmutable - endDate: - type: DateTimeImmutable - members: - type: int - rated: - type: string diff --git a/metadata/JikanPHP.Model.Search.CharacterSearch.yml b/metadata/JikanPHP.Model.Search.CharacterSearch.yml deleted file mode 100644 index 6909fc0..0000000 --- a/metadata/JikanPHP.Model.Search.CharacterSearch.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Search\CharacterSearch: - properties: - results: - type: array - lastPage: - type: int diff --git a/metadata/JikanPHP.Model.Search.CharacterSearchListItem.yml b/metadata/JikanPHP.Model.Search.CharacterSearchListItem.yml deleted file mode 100644 index 0271087..0000000 --- a/metadata/JikanPHP.Model.Search.CharacterSearchListItem.yml +++ /dev/null @@ -1,16 +0,0 @@ -JikanPHP\Model\Search\CharacterSearchListItem: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - name: - type: string - alternativeNames: - type: array - anime: - type: array - manga: - type: array diff --git a/metadata/JikanPHP.Model.Search.MangaSearch.yml b/metadata/JikanPHP.Model.Search.MangaSearch.yml deleted file mode 100644 index 2db49e8..0000000 --- a/metadata/JikanPHP.Model.Search.MangaSearch.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Search\MangaSearch: - properties: - results: - type: array - lastPage: - type: int diff --git a/metadata/JikanPHP.Model.Search.MangaSearchListItem.yml b/metadata/JikanPHP.Model.Search.MangaSearchListItem.yml deleted file mode 100644 index d50bfc2..0000000 --- a/metadata/JikanPHP.Model.Search.MangaSearchListItem.yml +++ /dev/null @@ -1,28 +0,0 @@ -JikanPHP\Model\Search\MangaSearchListItem: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - title: - type: string - publishing: - type: bool - synopsis: - type: string - type: - type: string - chapters: - type: int - volumes: - type: int - score: - type: float - startDate: - type: DateTimeImmutable - endDate: - type: DateTimeImmutable - members: - type: int diff --git a/metadata/JikanPHP.Model.Search.PersonSearch.yml b/metadata/JikanPHP.Model.Search.PersonSearch.yml deleted file mode 100644 index b58d81a..0000000 --- a/metadata/JikanPHP.Model.Search.PersonSearch.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Search\PersonSearch: - properties: - results: - type: array - lastPage: - type: int diff --git a/metadata/JikanPHP.Model.Search.PersonSearchListItem.yml b/metadata/JikanPHP.Model.Search.PersonSearchListItem.yml deleted file mode 100644 index bbd5398..0000000 --- a/metadata/JikanPHP.Model.Search.PersonSearchListItem.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\Search\PersonSearchListItem: - properties: - malId: - type: int - url: - type: string - imageUrl: - type: string - name: - type: string - alternativeNames: - type: array diff --git a/metadata/JikanPHP.Model.Search.Search.yml b/metadata/JikanPHP.Model.Search.Search.yml deleted file mode 100644 index 51d441e..0000000 --- a/metadata/JikanPHP.Model.Search.Search.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\Search\Search: - properties: - result: - type: '' - result_last_page: - type: '' diff --git a/metadata/JikanPHP.Model.SeasonList.SeasonListItem.yml b/metadata/JikanPHP.Model.SeasonList.SeasonListItem.yml deleted file mode 100644 index f5f14fb..0000000 --- a/metadata/JikanPHP.Model.SeasonList.SeasonListItem.yml +++ /dev/null @@ -1,6 +0,0 @@ -JikanPHP\Model\SeasonList\SeasonListItem: - properties: - year: - type: int - seasons: - type: array diff --git a/metadata/JikanPHP.Model.Seasonal.Seasonal.yml b/metadata/JikanPHP.Model.Seasonal.Seasonal.yml deleted file mode 100644 index 54cf2db..0000000 --- a/metadata/JikanPHP.Model.Seasonal.Seasonal.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\Seasonal\Seasonal: - properties: - seasonName: - type: string - seasonYear: - type: int - anime: - type: array diff --git a/metadata/JikanPHP.Model.Seasonal.SeasonalAnime.yml b/metadata/JikanPHP.Model.Seasonal.SeasonalAnime.yml deleted file mode 100644 index 43630fd..0000000 --- a/metadata/JikanPHP.Model.Seasonal.SeasonalAnime.yml +++ /dev/null @@ -1,36 +0,0 @@ -JikanPHP\Model\Seasonal\SeasonalAnime: - properties: - continuing: - type: bool - malId: - type: int - url: - type: string - title: - type: string - imageUrl: - type: string - synopsis: - type: string - type: - type: string - airingStart: - type: DateTimeImmutable - episodes: - type: int - members: - type: int - genres: - type: array - source: - type: string - producers: - type: array - score: - type: float - licensors: - type: array - r18: - type: bool - kids: - type: bool diff --git a/metadata/JikanPHP.Model.Top.TopAnime.yml b/metadata/JikanPHP.Model.Top.TopAnime.yml deleted file mode 100644 index f8ee2ec..0000000 --- a/metadata/JikanPHP.Model.Top.TopAnime.yml +++ /dev/null @@ -1,24 +0,0 @@ -JikanPHP\Model\Top\TopAnime: - properties: - malId: - type: int - rank: - type: int - title: - type: string - url: - type: string - imageUrl: - type: string - type: - type: string - episodes: - type: int - startDate: - type: string - endDate: - type: string - members: - type: int - score: - type: float diff --git a/metadata/JikanPHP.Model.Top.TopCharacter.yml b/metadata/JikanPHP.Model.Top.TopCharacter.yml deleted file mode 100644 index 7e77778..0000000 --- a/metadata/JikanPHP.Model.Top.TopCharacter.yml +++ /dev/null @@ -1,20 +0,0 @@ -JikanPHP\Model\Top\TopCharacter: - properties: - malId: - type: int - rank: - type: int - title: - type: string - url: - type: string - nameKanji: - type: string - animeography: - type: array - mangaography: - type: array - favorites: - type: int - imageUrl: - type: string diff --git a/metadata/JikanPHP.Model.Top.TopManga.yml b/metadata/JikanPHP.Model.Top.TopManga.yml deleted file mode 100644 index 14cb872..0000000 --- a/metadata/JikanPHP.Model.Top.TopManga.yml +++ /dev/null @@ -1,24 +0,0 @@ -JikanPHP\Model\Top\TopManga: - properties: - malId: - type: int - rank: - type: int - title: - type: string - url: - type: string - type: - type: string - volumes: - type: int - startDate: - type: string - endDate: - type: string - members: - type: int - score: - type: float - imageUrl: - type: string diff --git a/metadata/JikanPHP.Model.Top.TopPerson.yml b/metadata/JikanPHP.Model.Top.TopPerson.yml deleted file mode 100644 index f61768b..0000000 --- a/metadata/JikanPHP.Model.Top.TopPerson.yml +++ /dev/null @@ -1,18 +0,0 @@ -JikanPHP\Model\Top\TopPerson: - properties: - malId: - type: int - rank: - type: int - title: - type: string - url: - type: string - nameKanji: - type: string - favorites: - type: int - imageUrl: - type: string - birthday: - type: DateTimeImmutable diff --git a/metadata/JikanPHP.Model.User.AnimeListItem.yml b/metadata/JikanPHP.Model.User.AnimeListItem.yml deleted file mode 100644 index d2bf1b3..0000000 --- a/metadata/JikanPHP.Model.User.AnimeListItem.yml +++ /dev/null @@ -1,60 +0,0 @@ -JikanPHP\Model\User\AnimeListItem: - properties: - malId: - type: int - title: - type: string - videoUrl: - type: string - url: - type: string - imageUrl: - type: string - type: - type: string - watchingStatus: - type: int - score: - type: float - watchedEpisodes: - type: int - totalEpisodes: - type: int - airingStatus: - type: int - seasonName: - type: string - seasonYear: - type: int - hasEpisodeVideo: - type: bool - hasPromoVideo: - type: bool - hasVideo: - type: bool - isRewatching: - type: bool - tags: - type: string - rating: - type: string - startDate: - type: DateTimeImmutable - endDate: - type: DateTimeImmutable - watchStartDate: - type: DateTimeImmutable - watchEndDate: - type: DateTimeImmutable - days: - type: string - storage: - type: string - priority: - type: string - addedToList: - type: bool - studios: - type: array - licensors: - type: array diff --git a/metadata/JikanPHP.Model.User.AnimeStats.yml b/metadata/JikanPHP.Model.User.AnimeStats.yml deleted file mode 100644 index 1c71a68..0000000 --- a/metadata/JikanPHP.Model.User.AnimeStats.yml +++ /dev/null @@ -1,22 +0,0 @@ -JikanPHP\Model\User\AnimeStats: - properties: - daysWatched: - type: float - meanScore: - type: float - watching: - type: int - completed: - type: int - onHold: - type: int - dropped: - type: int - planToWatch: - type: int - totalEntries: - type: int - rewatched: - type: int - episodesWatched: - type: int diff --git a/metadata/JikanPHP.Model.User.Favorites.yml b/metadata/JikanPHP.Model.User.Favorites.yml deleted file mode 100644 index 1bd7863..0000000 --- a/metadata/JikanPHP.Model.User.Favorites.yml +++ /dev/null @@ -1,10 +0,0 @@ -JikanPHP\Model\User\Favorites: - properties: - anime: - type: array - manga: - type: array - characters: - type: array - people: - type: array diff --git a/metadata/JikanPHP.Model.User.Friend.yml b/metadata/JikanPHP.Model.User.Friend.yml deleted file mode 100644 index 436e94a..0000000 --- a/metadata/JikanPHP.Model.User.Friend.yml +++ /dev/null @@ -1,12 +0,0 @@ -JikanPHP\Model\User\Friend: - properties: - url: - type: string - username: - type: string - imageUrl: - type: string - lastOnline: - type: DateTimeImmutable - friendsSince: - type: DateTimeImmutable diff --git a/metadata/JikanPHP.Model.User.History.yml b/metadata/JikanPHP.Model.User.History.yml deleted file mode 100644 index 9ed51e5..0000000 --- a/metadata/JikanPHP.Model.User.History.yml +++ /dev/null @@ -1,8 +0,0 @@ -JikanPHP\Model\User\History: - properties: - meta: - type: JikanPHP\Model\Common\HistoryMeta - increment: - type: int - date: - type: DateTimeImmutable diff --git a/metadata/JikanPHP.Model.User.MangaListItem.yml b/metadata/JikanPHP.Model.User.MangaListItem.yml deleted file mode 100644 index 06fd487..0000000 --- a/metadata/JikanPHP.Model.User.MangaListItem.yml +++ /dev/null @@ -1,48 +0,0 @@ -JikanPHP\Model\User\MangaListItem: - properties: - malId: - type: int - title: - type: string - url: - type: string - imageUrl: - type: string - type: - type: string - readingStatus: - type: int - score: - type: float - readChapters: - type: int - readVolumes: - type: int - totalChapters: - type: int - totalVolumes: - type: int - publishingStatus: - type: int - isRereading: - type: bool - tags: - type: string - startDate: - type: DateTimeImmutable - endDate: - type: DateTimeImmutable - readStartDate: - type: DateTimeImmutable - readEndDate: - type: DateTimeImmutable - days: - type: string - retail: - type: string - priority: - type: string - addedToList: - type: bool - magazines: - type: array diff --git a/metadata/JikanPHP.Model.User.MangaStats.yml b/metadata/JikanPHP.Model.User.MangaStats.yml deleted file mode 100644 index 200d7c6..0000000 --- a/metadata/JikanPHP.Model.User.MangaStats.yml +++ /dev/null @@ -1,24 +0,0 @@ -JikanPHP\Model\User\MangaStats: - properties: - daysRead: - type: float - meanScore: - type: float - reading: - type: int - completed: - type: int - onHold: - type: int - dropped: - type: int - planToRead: - type: int - totalEntries: - type: int - reread: - type: int - chaptersRead: - type: int - volumesRead: - type: int diff --git a/metadata/JikanPHP.Model.User.Profile.yml b/metadata/JikanPHP.Model.User.Profile.yml deleted file mode 100644 index ae01a0f..0000000 --- a/metadata/JikanPHP.Model.User.Profile.yml +++ /dev/null @@ -1,26 +0,0 @@ -JikanPHP\Model\User\Profile: - properties: - username: - type: string - url: - type: string - imageUrl: - type: string - lastOnline: - type: DateTimeImmutable - gender: - type: string - birthday: - type: DateTimeImmutable - location: - type: string - joined: - type: DateTimeImmutable - animeStats: - type: JikanPHP\Model\User\UserAnimeStats - mangaStats: - type: JikanPHP\Model\User\UserMangaStats - favorites: - type: JikanPHP\Model\User\Favorites - about: - type: string diff --git a/metadata/JikanPHP.Model.User.UserAnimeStats.yml b/metadata/JikanPHP.Model.User.UserAnimeStats.yml deleted file mode 100644 index 5576893..0000000 --- a/metadata/JikanPHP.Model.User.UserAnimeStats.yml +++ /dev/null @@ -1,22 +0,0 @@ -JikanPHP\Model\User\UserAnimeStats: - properties: - daysWatched: - type: float - meanScore: - type: float - watching: - type: int - completed: - type: int - onHold: - type: int - dropped: - type: int - planToWatch: - type: int - totalEntries: - type: int - rewatched: - type: int - episodesWatched: - type: int diff --git a/metadata/JikanPHP.Model.User.UserMangaStats.yml b/metadata/JikanPHP.Model.User.UserMangaStats.yml deleted file mode 100644 index fc31473..0000000 --- a/metadata/JikanPHP.Model.User.UserMangaStats.yml +++ /dev/null @@ -1,24 +0,0 @@ -JikanPHP\Model\User\UserMangaStats: - properties: - daysRead: - type: float - meanScore: - type: float - reading: - type: int - completed: - type: int - onHold: - type: int - dropped: - type: int - planToRead: - type: int - totalEntries: - type: int - reread: - type: int - chaptersRead: - type: int - volumesRead: - type: int diff --git a/model/Anime/Anime.php b/model/Anime/Anime.php deleted file mode 100755 index 158c07d..0000000 --- a/model/Anime/Anime.php +++ /dev/null @@ -1,443 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string|null - */ - public function getTitleEnglish(): ?string - { - return $this->titleEnglish; - } - - /** - * @return string|null - */ - public function getTitleJapanese(): ?string - { - return $this->titleJapanese; - } - - /** - * @return string[] - */ - public function getTitleSynonyms(): array - { - return $this->titleSynonyms; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string|null - */ - public function getTrailerUrl(): ?string - { - return $this->trailerUrl; - } - - /** - * @return string|null - */ - public function getType(): ?string - { - return $this->type; - } - - /** - * @return string|null - */ - public function getSource(): ?string - { - return $this->source; - } - - /** - * @return int|null - */ - public function getEpisodes(): ?int - { - return $this->episodes; - } - - /** - * @return string|null - */ - public function getStatus(): ?string - { - return $this->status; - } - - /** - * @return bool - */ - public function isAiring(): bool - { - return $this->airing; - } - - /** - * @return \JikanPHP\Model\Common\DateRange - */ - public function getAired(): DateRange - { - return $this->aired; - } - - /** - * @return string - */ - public function getDuration(): string - { - return $this->duration; - } - - /** - * @return string|null - */ - public function getRating(): ?string - { - return $this->rating; - } - - /** - * @return float|null - */ - public function getScore(): ?float - { - return $this->score; - } - - /** - * @return int|null - */ - public function getScoredBy(): ?int - { - return $this->scoredBy; - } - - /** - * @return int|null - */ - public function getRank(): ?int - { - return $this->rank; - } - - /** - * @return int|null - */ - public function getPopularity(): ?int - { - return $this->popularity; - } - - /** - * @return int|null - */ - public function getMembers(): ?int - { - return $this->members; - } - - /** - * @return int|null - */ - public function getFavorites(): ?int - { - return $this->favorites; - } - - /** - * @return string|null - */ - public function getSynopsis(): ?string - { - return $this->synopsis; - } - - /** - * @return string|null - */ - public function getBackground(): ?string - { - return $this->background; - } - - /** - * @return string|null - */ - public function getPremiered(): ?string - { - return $this->premiered; - } - - /** - * @return string|null - */ - public function getBroadcast(): ?string - { - return $this->broadcast; - } - - /** - * @return MalUrl[] - */ - public function getRelated(): array - { - return $this->related; - } - - /** - * @return \JikanPHP\Model\Common\MalUrl[] - */ - public function getProducers(): array - { - return $this->producers; - } - - /** - * @return MalUrl[] - */ - public function getLicensors(): array - { - return $this->licensors; - } - - /** - * @return \JikanPHP\Model\Common\MalUrl[] - */ - public function getStudios(): array - { - return $this->studios; - } - - /** - * @return MalUrl[] - */ - public function getGenres(): array - { - return $this->genres; - } - - /** - * @return string[] - */ - public function getOpeningThemes(): array - { - return $this->openingThemes; - } - - /** - * @return string[] - */ - public function getEndingThemes(): array - { - return $this->endingThemes; - } -} diff --git a/model/Anime/AnimeCharactersAndStaff.php b/model/Anime/AnimeCharactersAndStaff.php deleted file mode 100644 index dba329d..0000000 --- a/model/Anime/AnimeCharactersAndStaff.php +++ /dev/null @@ -1,39 +0,0 @@ -characters; - } - - /** - * @return StaffListItem[] - */ - public function getStaff(): array - { - return $this->staff; - } -} diff --git a/model/Anime/AnimeMoreInfo.php b/model/Anime/AnimeMoreInfo.php deleted file mode 100644 index 8589a3f..0000000 --- a/model/Anime/AnimeMoreInfo.php +++ /dev/null @@ -1,24 +0,0 @@ -moreInfo; - } -} diff --git a/model/Anime/AnimeRecentlyUpdatedByUser.php b/model/Anime/AnimeRecentlyUpdatedByUser.php deleted file mode 100644 index 7103a40..0000000 --- a/model/Anime/AnimeRecentlyUpdatedByUser.php +++ /dev/null @@ -1,115 +0,0 @@ -username; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return int|null - */ - public function getScore(): ?int - { - return $this->score; - } - - /** - * @return string - */ - public function getStatus(): string - { - return $this->status; - } - - /** - * @return int|null - */ - public function getEpisodesSeen(): ?int - { - return $this->episodesSeen; - } - - /** - * @return int|null - */ - public function getEpisodesTotal(): ?int - { - return $this->episodesTotal; - } - - /** - * @return \DateTimeImmutable - */ - public function getDate(): \DateTimeImmutable - { - return $this->date; - } -} diff --git a/model/Anime/AnimeReview.php b/model/Anime/AnimeReview.php deleted file mode 100644 index fbf22ee..0000000 --- a/model/Anime/AnimeReview.php +++ /dev/null @@ -1,90 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return int - */ - public function getHelpfulCount(): int - { - return $this->helpfulCount; - } - - /** - * @return \DateTimeImmutable - */ - public function getDate(): \DateTimeImmutable - { - return $this->date; - } - - /** - * @return AnimeReviewer - */ - public function getReviewer(): AnimeReviewer - { - return $this->reviewer; - } - - /** - * @return string - */ - public function getContent(): string - { - return $this->content; - } -} diff --git a/model/Anime/AnimeReviewScores.php b/model/Anime/AnimeReviewScores.php deleted file mode 100644 index b6cadec..0000000 --- a/model/Anime/AnimeReviewScores.php +++ /dev/null @@ -1,90 +0,0 @@ -overall; - } - - /** - * @return int - */ - public function getStory(): int - { - return $this->story; - } - - /** - * @return int - */ - public function getAnimation(): int - { - return $this->animation; - } - - /** - * @return int - */ - public function getSound(): int - { - return $this->sound; - } - - /** - * @return int - */ - public function getCharacter(): int - { - return $this->character; - } - - /** - * @return int - */ - public function getEnjoyment(): int - { - return $this->enjoyment; - } -} diff --git a/model/Anime/AnimeReviewer.php b/model/Anime/AnimeReviewer.php deleted file mode 100644 index 4fb7b5a..0000000 --- a/model/Anime/AnimeReviewer.php +++ /dev/null @@ -1,64 +0,0 @@ -episodesSeen; - } - - /** - * @return AnimeReviewScores - */ - public function getScores(): AnimeReviewScores - { - return $this->scores; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getUsername(): string - { - return $this->username; - } -} diff --git a/model/Anime/AnimeStats.php b/model/Anime/AnimeStats.php deleted file mode 100644 index 719a207..0000000 --- a/model/Anime/AnimeStats.php +++ /dev/null @@ -1,102 +0,0 @@ -watching; - } - - /** - * @return int - */ - public function getCompleted(): int - { - return $this->completed; - } - - /** - * @return int - */ - public function getOnHold(): int - { - return $this->onHold; - } - - /** - * @return int - */ - public function getDropped(): int - { - return $this->dropped; - } - - /** - * @return int - */ - public function getPlanToWatch(): int - { - return $this->planToWatch; - } - - /** - * @return int - */ - public function getTotal(): int - { - return $this->total; - } - - /** - * @return int - */ - public function getScores(): int - { - return $this->scores; - } -} diff --git a/model/Anime/AnimeVideos.php b/model/Anime/AnimeVideos.php deleted file mode 100644 index 580a6e8..0000000 --- a/model/Anime/AnimeVideos.php +++ /dev/null @@ -1,37 +0,0 @@ -promo; - } - - /** - * @return StreamEpisodeListItem[] - */ - public function getEpisodes(): array - { - return $this->episodes; - } -} diff --git a/model/Anime/EpisodeListItem.php b/model/Anime/EpisodeListItem.php deleted file mode 100644 index e1b523d..0000000 --- a/model/Anime/EpisodeListItem.php +++ /dev/null @@ -1,130 +0,0 @@ -episodeId; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string|null - */ - public function getTitleJapanese(): ?string - { - return $this->titleJapanese; - } - - /** - * @return string|null - */ - public function getTitleRomanji(): ?string - { - return $this->titleRomanji; - } - - /** - * @return DateRange|null - */ - public function getAired(): ?DateRange - { - return $this->aired; - } - - /** - * @return bool - */ - public function isFiller(): bool - { - return $this->filler; - } - - /** - * @return bool - */ - public function isRecap(): bool - { - return $this->recap; - } - - /** - * @return string - */ - public function getVideoUrl(): string - { - return $this->videoUrl; - } - - /** - * @return string - */ - public function getForumUrl(): string - { - return $this->forumUrl; - } -} diff --git a/model/Anime/Episodes.php b/model/Anime/Episodes.php deleted file mode 100644 index 7879bdd..0000000 --- a/model/Anime/Episodes.php +++ /dev/null @@ -1,37 +0,0 @@ -episodes; - } - - /** - * @return int - */ - public function getEpisodesLastPage(): int - { - return $this->episodesLastPage; - } -} diff --git a/model/Anime/PromoListItem.php b/model/Anime/PromoListItem.php deleted file mode 100644 index 7033b4c..0000000 --- a/model/Anime/PromoListItem.php +++ /dev/null @@ -1,50 +0,0 @@ -title; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getVideoUrl(): string - { - return $this->videoUrl; - } -} diff --git a/model/Anime/StaffListItem.php b/model/Anime/StaffListItem.php deleted file mode 100755 index 5bd5b76..0000000 --- a/model/Anime/StaffListItem.php +++ /dev/null @@ -1,76 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string[] - */ - public function getPositions(): array - { - return $this->positions; - } -} diff --git a/model/Anime/StreamEpisodeListItem.php b/model/Anime/StreamEpisodeListItem.php deleted file mode 100644 index 08dcf14..0000000 --- a/model/Anime/StreamEpisodeListItem.php +++ /dev/null @@ -1,63 +0,0 @@ -title; - } - - /** - * @return string - */ - public function getEpisode(): string - { - return $this->episode; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } -} diff --git a/model/Character/Animeography.php b/model/Character/Animeography.php deleted file mode 100644 index edd83a4..0000000 --- a/model/Character/Animeography.php +++ /dev/null @@ -1,15 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getCharacterUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return string|null - */ - public function getNameKanji(): ?string - { - return $this->nameKanji; - } - - /** - * @return array - */ - public function getNicknames(): array - { - return $this->nicknames; - } - - /** - * @return string - */ - public function getAbout(): string - { - return $this->about; - } - - /** - * @return int - */ - public function getMemberFavorites(): int - { - return $this->memberFavorites; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return Animeography[] - */ - public function getAnimeography(): array - { - return $this->animeography; - } - - /** - * @return Mangaography[] - */ - public function getMangaography(): array - { - return $this->mangaography; - } - - /** - * @return VoiceActor[] - */ - public function getVoiceActors(): array - { - return $this->voiceActors; - } -} diff --git a/model/Character/CharacterListItem.php b/model/Character/CharacterListItem.php deleted file mode 100755 index d5b3cf5..0000000 --- a/model/Character/CharacterListItem.php +++ /dev/null @@ -1,97 +0,0 @@ -name; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return string - */ - public function getRole(): string - { - return $this->role; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return VoiceActor[] - */ - public function getVoiceActors(): array - { - return $this->voiceActors; - } -} diff --git a/model/Character/Mangaography.php b/model/Character/Mangaography.php deleted file mode 100644 index d9f8572..0000000 --- a/model/Character/Mangaography.php +++ /dev/null @@ -1,15 +0,0 @@ -getName(); - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getLanguage(): string - { - return $this->language; - } -} diff --git a/model/Club/Club.php b/model/Club/Club.php deleted file mode 100644 index b77ce42..0000000 --- a/model/Club/Club.php +++ /dev/null @@ -1,183 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return int - */ - public function getMembersCount(): int - { - return $this->membersCount; - } - - /** - * @return int - */ - public function getPicturesCount(): int - { - return $this->picturesCount; - } - - /** - * @return string - */ - public function getCategory(): string - { - return $this->category; - } - - /** - * @return \DateTimeImmutable - */ - public function getCreated(): \DateTimeImmutable - { - return $this->created; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return MalUrl[] - */ - public function getStaff(): array - { - return $this->staff; - } - - /** - * @return MalUrl[] - */ - public function getAnimeRelations(): array - { - return $this->animeRelations; - } - - /** - * @return MalUrl[] - */ - public function getMangaRelations(): array - { - return $this->mangaRelations; - } - - /** - * @return MalUrl[] - */ - public function getCharacterRelations(): array - { - return $this->characterRelations; - } -} diff --git a/model/Club/UserList.php b/model/Club/UserList.php deleted file mode 100644 index fdf40d3..0000000 --- a/model/Club/UserList.php +++ /dev/null @@ -1,24 +0,0 @@ -profiles; - } -} diff --git a/model/Club/UserProfile.php b/model/Club/UserProfile.php deleted file mode 100644 index cdb61bf..0000000 --- a/model/Club/UserProfile.php +++ /dev/null @@ -1,50 +0,0 @@ -username; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } -} diff --git a/model/Common/AnimeCard.php b/model/Common/AnimeCard.php deleted file mode 100755 index f43aae7..0000000 --- a/model/Common/AnimeCard.php +++ /dev/null @@ -1,227 +0,0 @@ -url; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getSynopsis(): string - { - return $this->synopsis; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getAiringStart(): ?\DateTimeImmutable - { - return $this->airingStart; - } - - /** - * @return int|null - */ - public function getEpisodes(): ?int - { - return $this->episodes; - } - - /** - * @return int - */ - public function getMembers(): int - { - return $this->members; - } - - /** - * @return \JikanPHP\Model\Common\MalUrl[] - */ - public function getGenres(): array - { - return $this->genres; - } - - /** - * @return string - */ - public function getSource(): string - { - return $this->source; - } - - /** - * @return \JikanPHP\Model\Common\MalUrl[] - */ - public function getProducers(): array - { - return $this->producers; - } - - /** - * @return float|null - */ - public function getScore(): ?float - { - return $this->score; - } - - /** - * @return string[]|null - */ - public function getLicensors(): ?array - { - return $this->licensors; - } - - /** - * @return bool - */ - public function isR18(): bool - { - return $this->r18; - } - - /** - * @return bool - */ - public function isKids(): bool - { - return $this->kids; - } -} diff --git a/model/Common/AnimeMeta.php b/model/Common/AnimeMeta.php deleted file mode 100644 index 5338496..0000000 --- a/model/Common/AnimeMeta.php +++ /dev/null @@ -1,13 +0,0 @@ -day; - } - - /** - * @return int|null - */ - public function getMonth() : ?int - { - return $this->month; - } - - /** - * @return int|null - */ - public function getYear() : ?int - { - return $this->year; - } -} diff --git a/model/Common/DateRange.php b/model/Common/DateRange.php deleted file mode 100644 index d2934d2..0000000 --- a/model/Common/DateRange.php +++ /dev/null @@ -1,71 +0,0 @@ -string; - } - - /** - * @return string - */ - public function getFrom(): string - { - return $this->from; - } - - /** - * @return string - */ - public function getUntil(): string - { - return $this->to; - } - - /** - * @return DateProp - */ - public function getFromProp(): DateProp - { - return reset($this->prop); - } - - /** - * @return DateProp - */ - public function getUntilProp(): DateProp - { - return end($this->prop); - } -} \ No newline at end of file diff --git a/model/Common/HistoryMeta.php b/model/Common/HistoryMeta.php deleted file mode 100644 index 1f33b93..0000000 --- a/model/Common/HistoryMeta.php +++ /dev/null @@ -1,64 +0,0 @@ -url; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } -} diff --git a/model/Common/ItemBasicMeta.php b/model/Common/ItemBasicMeta.php deleted file mode 100644 index da29d02..0000000 --- a/model/Common/ItemBasicMeta.php +++ /dev/null @@ -1,45 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->name; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } -} diff --git a/model/Common/ItemMeta.php b/model/Common/ItemMeta.php deleted file mode 100644 index 93b6a42..0000000 --- a/model/Common/ItemMeta.php +++ /dev/null @@ -1,71 +0,0 @@ -name; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } -} diff --git a/model/Common/LicensorMeta.php b/model/Common/LicensorMeta.php deleted file mode 100644 index e338d84..0000000 --- a/model/Common/LicensorMeta.php +++ /dev/null @@ -1,13 +0,0 @@ -name = $name; - $this->url = $url; - } - - /** - * @return string - */ - public function __toString() - { - return $this->name; - } - - /** - * @return int - */ - public function getMalId(): int - { - //return MalUrlParser::parseId($this->url); - // TODO: see if this is needed - } - - /** - * @return string - */ - public function getType(): string - { - return preg_replace('#https://myanimelist.net/(\w+)/.*#', '$1', $this->url); - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->name; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } -} diff --git a/model/Common/MangaCard.php b/model/Common/MangaCard.php deleted file mode 100644 index 6b5e754..0000000 --- a/model/Common/MangaCard.php +++ /dev/null @@ -1,188 +0,0 @@ -url; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getSynopsis(): string - { - return $this->synopsis; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getPublishingStart(): ?\DateTimeImmutable - { - return $this->publishingStart; - } - - /** - * @return int|null - */ - public function getVolumes(): ?int - { - return $this->volumes; - } - - /** - * @return int - */ - public function getMembers(): int - { - return $this->members; - } - - /** - * @return MalUrl[] - */ - public function getGenres(): array - { - return $this->genres; - } - - /** - * @return MalUrl[] - */ - public function getAuthors(): array - { - return $this->authors; - } - - /** - * @return float|null - */ - public function getScore(): ?float - { - return $this->score; - } - - /** - * @return string[]|null - */ - public function getSerialization(): ?array - { - return $this->serialization; - } -} diff --git a/model/Common/MangaMeta.php b/model/Common/MangaMeta.php deleted file mode 100644 index 8172ef4..0000000 --- a/model/Common/MangaMeta.php +++ /dev/null @@ -1,13 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getRole(): string - { - return $this->role; - } -} diff --git a/model/Common/PersonMeta.php b/model/Common/PersonMeta.php deleted file mode 100644 index 0d4995d..0000000 --- a/model/Common/PersonMeta.php +++ /dev/null @@ -1,13 +0,0 @@ -large; - } - - /** - * @return string - */ - public function getSmall(): string - { - return $this->small; - } -} diff --git a/model/Common/Recommendation.php b/model/Common/Recommendation.php deleted file mode 100644 index fa22b5f..0000000 --- a/model/Common/Recommendation.php +++ /dev/null @@ -1,90 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getRecommendationUrl(): string - { - return $this->recommendationUrl; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return int - */ - public function getRecommendationCount(): int - { - return $this->recommendationCount; - } -} diff --git a/model/Common/Reviewer.php b/model/Common/Reviewer.php deleted file mode 100644 index 9d9aa37..0000000 --- a/model/Common/Reviewer.php +++ /dev/null @@ -1,27 +0,0 @@ -url = $url; - $this->authorName = $authorName; - $this->authorUrl = $authorUrl; - $this->datePosted = $relativeDate; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getAuthorName(): string - { - return $this->authorName; - } - - /** - * @return string - */ - public function getAuthorUrl(): string - { - return $this->authorUrl; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getDatePosted(): ?\DateTimeImmutable - { - return $this->datePosted; - } -} diff --git a/model/Forum/ForumTopic.php b/model/Forum/ForumTopic.php deleted file mode 100644 index 3d1742a..0000000 --- a/model/Forum/ForumTopic.php +++ /dev/null @@ -1,123 +0,0 @@ -title; - } - - /** - * @return int - */ - public function getTopicId(): int - { - return $this->topicId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return \DateTimeImmutable - */ - public function getDatePosted(): \DateTimeImmutable - { - return $this->datePosted; - } - - /** - * @return string - */ - public function getAuthorName(): string - { - return $this->authorName; - } - - /** - * @return string - */ - public function getAuthorUrl(): string - { - return $this->authorUrl; - } - - /** - * @return int - */ - public function getReplies(): int - { - return $this->replies; - } - - /** - * @return ForumPost - */ - public function getLastPost(): ForumPost - { - return $this->lastPost; - } -} diff --git a/model/Genre/AnimeGenre.php b/model/Genre/AnimeGenre.php deleted file mode 100644 index 600602e..0000000 --- a/model/Genre/AnimeGenre.php +++ /dev/null @@ -1,55 +0,0 @@ -malUrl; - } - - /** - * @return int - */ - public function getItemCount(): int - { - return $this->itemCount; - } - - /** - * @return AnimeCard[] - */ - public function getAnime(): array - { - return $this->anime; - } -} diff --git a/model/Genre/MangaGenre.php b/model/Genre/MangaGenre.php deleted file mode 100644 index b0cf028..0000000 --- a/model/Genre/MangaGenre.php +++ /dev/null @@ -1,53 +0,0 @@ -malUrl; - } - - /** - * @return int - */ - public function getItemCount(): int - { - return $this->itemCount; - } - - /** - * @return MangaGenre[] - */ - public function getManga(): array - { - return $this->manga; - } -} diff --git a/model/Magazine/Magazine.php b/model/Magazine/Magazine.php deleted file mode 100644 index d49d050..0000000 --- a/model/Magazine/Magazine.php +++ /dev/null @@ -1,40 +0,0 @@ -malUrl; - } - - /** - * @return MagazineManga[] - */ - public function getManga(): array - { - return $this->manga; - } -} diff --git a/model/Magazine/MagazineManga.php b/model/Magazine/MagazineManga.php deleted file mode 100644 index 0b67022..0000000 --- a/model/Magazine/MagazineManga.php +++ /dev/null @@ -1,15 +0,0 @@ -name; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getRole(): string - { - return $this->role; - } -} diff --git a/model/Manga/Manga.php b/model/Manga/Manga.php deleted file mode 100755 index 80ad100..0000000 --- a/model/Manga/Manga.php +++ /dev/null @@ -1,346 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string|null - */ - public function getTitleEnglish(): ?string - { - return $this->titleEnglish; - } - - /** - * @return string[] - */ - public function getTitleSynonyms(): array - { - return $this->titleSynonyms; - } - - /** - * @return string|null - */ - public function getTitleJapanese(): ?string - { - return $this->titleJapanese; - } - - /** - * @return string|null - */ - public function getStatus(): ?string - { - return $this->status; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string|null - */ - public function getType(): ?string - { - return $this->type; - } - - /** - * @return int|null - */ - public function getVolumes(): ?int - { - return $this->volumes; - } - - /** - * @return int|null - */ - public function getChapters(): ?int - { - return $this->chapters; - } - - /** - * @return bool - */ - public function isPublishing(): bool - { - return $this->publishing; - } - - /** - * @return DateRange - */ - public function getPublished(): DateRange - { - return $this->published; - } - - /** - * @return int|null - */ - public function getRank(): ?int - { - return $this->rank; - } - - /** - * @return float|null - */ - public function getScore(): ?float - { - return $this->score; - } - - /** - * @return int|null - */ - public function getScoredBy(): ?int - { - return $this->scoredBy; - } - - /** - * @return int|null - */ - public function getPopularity(): ?int - { - return $this->popularity; - } - - /** - * @return int|null - */ - public function getMembers(): ?int - { - return $this->members; - } - - /** - * @return int|null - */ - public function getFavorites(): ?int - { - return $this->favorites; - } - - /** - * @return string|null - */ - public function getSynopsis(): ?string - { - return $this->synopsis; - } - - /** - * @return string|null - */ - public function getBackground(): ?string - { - return $this->background; - } - - /** - * @return MalUrl[] - */ - public function getRelated(): array - { - return $this->related; - } - - /** - * @return MalUrl[] - */ - public function getGenres(): array - { - return $this->genres; - } - - /** - * @return MalUrl[] - */ - public function getAuthors(): array - { - return $this->authors; - } - - /** - * @return MalUrl[] - */ - public function getSerializations(): array - { - return $this->serializations; - } -} diff --git a/model/Manga/MangaMoreInfo.php b/model/Manga/MangaMoreInfo.php deleted file mode 100644 index 6075759..0000000 --- a/model/Manga/MangaMoreInfo.php +++ /dev/null @@ -1,24 +0,0 @@ -moreInfo; - } -} diff --git a/model/Manga/MangaRecentlyUpdatedByUser.php b/model/Manga/MangaRecentlyUpdatedByUser.php deleted file mode 100644 index 3aa29c2..0000000 --- a/model/Manga/MangaRecentlyUpdatedByUser.php +++ /dev/null @@ -1,141 +0,0 @@ -username; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return int|null - */ - public function getScore(): ?int - { - return $this->score; - } - - /** - * @return string - */ - public function getStatus(): string - { - return $this->status; - } - - /** - * @return int|null - */ - public function getVolumesRead(): ?int - { - return $this->volumesRead; - } - - /** - * @return int|null - */ - public function getVolumesTotal(): ?int - { - return $this->volumesTotal; - } - - /** - * @return int|null - */ - public function getChaptersRead(): ?int - { - return $this->chaptersRead; - } - - /** - * @return int|null - */ - public function getChaptersTotal(): ?int - { - return $this->chaptersTotal; - } - - /** - * @return \DateTimeImmutable - */ - public function getDate(): \DateTimeImmutable - { - return $this->date; - } -} diff --git a/model/Manga/MangaReview.php b/model/Manga/MangaReview.php deleted file mode 100644 index 4b897eb..0000000 --- a/model/Manga/MangaReview.php +++ /dev/null @@ -1,90 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return int - */ - public function getHelpfulCount(): int - { - return $this->helpfulCount; - } - - /** - * @return \DateTimeImmutable - */ - public function getDate(): \DateTimeImmutable - { - return $this->date; - } - - /** - * @return MangaReviewer - */ - public function getReviewer(): MangaReviewer - { - return $this->reviewer; - } - - /** - * @return string - */ - public function getContent(): string - { - return $this->content; - } -} diff --git a/model/Manga/MangaReviewScores.php b/model/Manga/MangaReviewScores.php deleted file mode 100644 index f3533af..0000000 --- a/model/Manga/MangaReviewScores.php +++ /dev/null @@ -1,77 +0,0 @@ -overall; - } - - /** - * @return int - */ - public function getStory(): int - { - return $this->story; - } - - /** - * @return int - */ - public function getArt(): int - { - return $this->art; - } - - /** - * @return int - */ - public function getCharacter(): int - { - return $this->character; - } - - /** - * @return int - */ - public function getEnjoyment(): int - { - return $this->enjoyment; - } -} diff --git a/model/Manga/MangaReviewer.php b/model/Manga/MangaReviewer.php deleted file mode 100644 index abf2bc6..0000000 --- a/model/Manga/MangaReviewer.php +++ /dev/null @@ -1,64 +0,0 @@ -chaptersRead; - } - - /** - * @return MangaReviewScores - */ - public function getScores(): MangaReviewScores - { - return $this->scores; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getUsername(): string - { - return $this->username; - } -} diff --git a/model/Manga/MangaStats.php b/model/Manga/MangaStats.php deleted file mode 100644 index d61c8b2..0000000 --- a/model/Manga/MangaStats.php +++ /dev/null @@ -1,102 +0,0 @@ -reading; - } - - /** - * @return int - */ - public function getCompleted(): int - { - return $this->completed; - } - - /** - * @return int - */ - public function getOnHold(): int - { - return $this->onHold; - } - - /** - * @return int - */ - public function getDropped(): int - { - return $this->dropped; - } - - /** - * @return int - */ - public function getPlanToRead(): int - { - return $this->planToRead; - } - - /** - * @return int - */ - public function getTotal(): int - { - return $this->total; - } - - /** - * @return int - */ - public function getScores(): int - { - return $this->scores; - } -} diff --git a/model/News/NewsListItem.php b/model/News/NewsListItem.php deleted file mode 100644 index df339b9..0000000 --- a/model/News/NewsListItem.php +++ /dev/null @@ -1,128 +0,0 @@ -url; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return \DateTimeImmutable - */ - public function getDate(): \DateTimeImmutable - { - return $this->date; - } - - /** - * @return string - */ - public function getAuthorName(): string - { - return $this->authorName; - } - - /** - * @return string - */ - public function getAuthorUrl(): string - { - return $this->authorUrl; - } - - /** - * @return string - */ - public function getForumUrl(): string - { - return $this->forumUrl; - } - - /** - * @return string|null - */ - public function getImageUrl(): ?string - { - return $this->imageUrl; - } - - /** - * @return int - */ - public function getComments(): int - { - return $this->comments; - } - - /** - * @return string - */ - public function getIntro(): string - { - return $this->intro; - } -} diff --git a/model/Person/AnimeStaffPosition.php b/model/Person/AnimeStaffPosition.php deleted file mode 100644 index 49dc074..0000000 --- a/model/Person/AnimeStaffPosition.php +++ /dev/null @@ -1,39 +0,0 @@ -position; - } - - /** - * @return AnimeMeta - */ - public function getAnimeMeta(): AnimeMeta - { - return $this->animeMeta; - } -} diff --git a/model/Person/Person.php b/model/Person/Person.php deleted file mode 100755 index 557ab83..0000000 --- a/model/Person/Person.php +++ /dev/null @@ -1,217 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string|null - */ - public function getWebsiteUrl(): ?string - { - return $this->websiteUrl; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return string|null - */ - public function getGivenName(): ?string - { - return $this->givenName; - } - - /** - * @return string|null - */ - public function getFamilyName(): ?string - { - return $this->familyName; - } - - /** - * @return string[] - */ - public function getAlternateNames(): array - { - return $this->alternateNames; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getBirthday(): ?\DateTimeImmutable - { - return $this->birthday; - } - - /** - * @return int - */ - public function getMemberFavorites(): int - { - return $this->memberFavorites; - } - - /** - * @return string|null - */ - public function getAbout(): ?string - { - return $this->about; - } - - /** - * @return VoiceActingRole[] - */ - public function getVoiceActingRoles(): array - { - return $this->voiceActingRoles; - } - - /** - * @param VoiceActingRole[] $voiceActingRoles - */ - public function setVoiceActingRoles(array $voiceActingRoles): void - { - $this->voiceActingRoles = $voiceActingRoles; - } - - /** - * @return AnimeStaffPosition[] - */ - public function getAnimeStaffPositions(): array - { - return $this->animeStaffPositions; - } - - /** - * @param AnimeStaffPosition[] $animeStaffPositions - */ - public function setAnimeStaffPositions(array $animeStaffPositions): void - { - $this->animeStaffPositions = $animeStaffPositions; - } - - /** - * @return PublishedManga[] - */ - public function getPublishedManga(): array - { - return $this->publishedManga; - } - - /** - * @param PublishedManga[] $publishedManga - */ - public function setPublishedManga(array $publishedManga): void - { - $this->publishedManga = $publishedManga; - } -} diff --git a/model/Person/PublishedManga.php b/model/Person/PublishedManga.php deleted file mode 100644 index 2546f24..0000000 --- a/model/Person/PublishedManga.php +++ /dev/null @@ -1,39 +0,0 @@ -position; - } - - /** - * @return mangaMeta - */ - public function getMangaMeta(): MangaMeta - { - return $this->mangaMeta; - } -} diff --git a/model/Person/VoiceActingRole.php b/model/Person/VoiceActingRole.php deleted file mode 100644 index 140822b..0000000 --- a/model/Person/VoiceActingRole.php +++ /dev/null @@ -1,53 +0,0 @@ -role; - } - - /** - * @return AnimeMeta - */ - public function getAnimeMeta(): AnimeMeta - { - return $this->animeMeta; - } - - /** - * @return CharacterMeta - */ - public function getCharacterMeta(): CharacterMeta - { - return $this->characterMeta; - } -} diff --git a/model/Producer/Producer.php b/model/Producer/Producer.php deleted file mode 100644 index c33d282..0000000 --- a/model/Producer/Producer.php +++ /dev/null @@ -1,40 +0,0 @@ -malUrl; - } - - /** - * @return ProducerAnime[] - */ - public function getAnime(): array - { - return $this->anime; - } -} diff --git a/model/Producer/ProducerAnime.php b/model/Producer/ProducerAnime.php deleted file mode 100644 index 4daad2c..0000000 --- a/model/Producer/ProducerAnime.php +++ /dev/null @@ -1,15 +0,0 @@ -monday; - } - - /** - * @return AnimeCard[] - */ - public function getTuesday(): array - { - return $this->tuesday; - } - - /** - * @return AnimeCard[] - */ - public function getWednesday(): array - { - return $this->wednesday; - } - - /** - * @return AnimeCard[] - */ - public function getThursday(): array - { - return $this->thursday; - } - - /** - * @return AnimeCard[] - */ - public function getFriday(): array - { - return $this->friday; - } - - /** - * @return AnimeCard[] - */ - public function getSaturday(): array - { - return $this->saturday; - } - - /** - * @return AnimeCard[] - */ - public function getSunday(): array - { - return $this->sunday; - } - - /** - * @return AnimeCard[] - */ - public function getOther(): array - { - return $this->other; - } - - /** - * @return AnimeCard[] - */ - public function getUnknown(): array - { - return $this->unknown; - } -} diff --git a/model/Search/AnimeSearch.php b/model/Search/AnimeSearch.php deleted file mode 100644 index 747cb06..0000000 --- a/model/Search/AnimeSearch.php +++ /dev/null @@ -1,38 +0,0 @@ -results; - } - - /** - * @return int - */ - public function getLastPage(): int - { - return $this->lastPage; - } -} diff --git a/model/Search/AnimeSearchListItem.php b/model/Search/AnimeSearchListItem.php deleted file mode 100644 index 6a04f8a..0000000 --- a/model/Search/AnimeSearchListItem.php +++ /dev/null @@ -1,180 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getSynopsis(): string - { - return $this->synopsis; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return int - */ - public function getEpisodes(): int - { - return $this->episodes; - } - - /** - * @return float - */ - public function getScore(): float - { - return $this->score; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getStartDate(): ?\DateTimeImmutable - { - return $this->startDate; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getEndDate(): ?\DateTimeImmutable - { - return $this->endDate; - } - - /** - * @return int - */ - public function getMembers(): int - { - return $this->members; - } - - /** - * @return string|null - */ - public function getRated(): ?string - { - return $this->rated; - } - - /** - * @return bool - */ - public function isAiring(): bool - { - return $this->airing; - } -} diff --git a/model/Search/CharacterSearch.php b/model/Search/CharacterSearch.php deleted file mode 100644 index a1b0ecd..0000000 --- a/model/Search/CharacterSearch.php +++ /dev/null @@ -1,38 +0,0 @@ -results; - } - - /** - * @return int - */ - public function getLastPage(): int - { - return $this->lastPage; - } -} diff --git a/model/Search/CharacterSearchListItem.php b/model/Search/CharacterSearchListItem.php deleted file mode 100644 index 07cb79d..0000000 --- a/model/Search/CharacterSearchListItem.php +++ /dev/null @@ -1,103 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return array - */ - public function getAlternativeNames(): array - { - return $this->alternativeNames; - } - - /** - * @return \JikanPHP\Model\Common\MalUrl[] - */ - public function getAnime(): array - { - return $this->anime; - } - - /** - * @return \JikanPHP\Model\Common\MalUrl[] - */ - public function getManga(): array - { - return $this->manga; - } -} diff --git a/model/Search/MangaSearch.php b/model/Search/MangaSearch.php deleted file mode 100644 index 8b008fa..0000000 --- a/model/Search/MangaSearch.php +++ /dev/null @@ -1,38 +0,0 @@ -results; - } - - /** - * @return int - */ - public function getLastPage(): int - { - return $this->lastPage; - } -} diff --git a/model/Search/MangaSearchListItem.php b/model/Search/MangaSearchListItem.php deleted file mode 100644 index 40aea2a..0000000 --- a/model/Search/MangaSearchListItem.php +++ /dev/null @@ -1,182 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getSynopsis(): string - { - return $this->synopsis; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return int - */ - public function getChapters(): int - { - return $this->chapters; - } - - /** - * @return int - */ - public function getVolumes(): int - { - return $this->volumes; - } - - /** - * @return float - */ - public function getScore(): float - { - return $this->score; - } - - /** - * @return \DateTimeImmutable|null ?\DateTimeImmutable - */ - public function getStartDate(): ?\DateTimeImmutable - { - return $this->startDate; - } - - /** - * @return \DateTimeImmutable|null ?\DateTimeImmutable - */ - public function getEndDate(): ?\DateTimeImmutable - { - return $this->endDate; - } - - /** - * @return int - */ - public function getMembers(): int - { - return $this->members; - } - - /** - * @return bool - */ - public function isPublishing(): bool - { - return $this->publishing; - } -} diff --git a/model/Search/PersonSearch.php b/model/Search/PersonSearch.php deleted file mode 100644 index df0743c..0000000 --- a/model/Search/PersonSearch.php +++ /dev/null @@ -1,38 +0,0 @@ -results; - } - - /** - * @return int - */ - public function getLastPage(): int - { - return $this->lastPage; - } -} diff --git a/model/Search/PersonSearchListItem.php b/model/Search/PersonSearchListItem.php deleted file mode 100644 index 06f7d32..0000000 --- a/model/Search/PersonSearchListItem.php +++ /dev/null @@ -1,77 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * @return array - */ - public function getAlternativeNames(): array - { - return $this->alternativeNames; - } -} diff --git a/model/Search/Search.php b/model/Search/Search.php deleted file mode 100755 index f0587f3..0000000 --- a/model/Search/Search.php +++ /dev/null @@ -1,16 +0,0 @@ -year; - } - - /** - * @return string[] - */ - public function getSeasons(): array - { - return $this->seasons; - } -} diff --git a/model/Seasonal/Seasonal.php b/model/Seasonal/Seasonal.php deleted file mode 100755 index 7cc2905..0000000 --- a/model/Seasonal/Seasonal.php +++ /dev/null @@ -1,59 +0,0 @@ -seasonName .' '. $this->seasonYear; - } - - /** - * @return int - */ - public function getSeasonYear(): int - { - return $this->seasonYear; - } - - /** - * @return string - */ - public function getSeasonName(): string - { - return $this->seasonName; - } - - /** - * @return SeasonalAnime[] - */ - public function getAnime(): array - { - return $this->anime; - } -} diff --git a/model/Seasonal/SeasonalAnime.php b/model/Seasonal/SeasonalAnime.php deleted file mode 100755 index dc1bac7..0000000 --- a/model/Seasonal/SeasonalAnime.php +++ /dev/null @@ -1,26 +0,0 @@ -continuing; - } -} diff --git a/model/Top/TopAnime.php b/model/Top/TopAnime.php deleted file mode 100755 index 7ba5100..0000000 --- a/model/Top/TopAnime.php +++ /dev/null @@ -1,162 +0,0 @@ -getTitle(); - } - - /** - * @return int - */ - public function getRank(): int - { - return $this->rank; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return int|null - */ - public function getEpisodes(): ?int - { - return $this->episodes; - } - - /** - * @return string|null - */ - public function getStartDate(): ?string - { - return $this->startDate; - } - - /** - * @return string|null - */ - public function getEndDate(): ?string - { - return $this->endDate; - } - - /** - * @return int - */ - public function getMembers(): int - { - return $this->members; - } - - /** - * @return float - */ - public function getScore(): float - { - return $this->score; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } -} diff --git a/model/Top/TopCharacter.php b/model/Top/TopCharacter.php deleted file mode 100755 index 2b0682a..0000000 --- a/model/Top/TopCharacter.php +++ /dev/null @@ -1,138 +0,0 @@ -getTitle(); - } - - /** - * @return int - */ - public function getRank(): int - { - return $this->rank; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string|null - */ - public function getNameKanji(): ?string - { - return $this->nameKanji; - } - - /** - * @return \JikanPHP\Model\Common\MalUrl[] - */ - public function getAnimeography(): array - { - return $this->animeography; - } - - /** - * @return MalUrl[] - */ - public function getMangaography(): array - { - return $this->mangaography; - } - - /** - * @return int - */ - public function getFavorites(): int - { - return $this->favorites; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } -} diff --git a/model/Top/TopManga.php b/model/Top/TopManga.php deleted file mode 100755 index c1e8cb6..0000000 --- a/model/Top/TopManga.php +++ /dev/null @@ -1,162 +0,0 @@ -getTitle(); - } - - /** - * @return int - */ - public function getRank(): int - { - return $this->rank; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return int|null - */ - public function getVolumes(): ?int - { - return $this->volumes; - } - - /** - * @return string|null - */ - public function getStartDate(): ?string - { - return $this->startDate; - } - - /** - * @return string|null - */ - public function getEndDate(): ?string - { - return $this->endDate; - } - - /** - * @return int - */ - public function getMembers(): int - { - return $this->members; - } - - /** - * @return float - */ - public function getScore(): float - { - return $this->score; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } -} diff --git a/model/Top/TopPerson.php b/model/Top/TopPerson.php deleted file mode 100755 index 87828ea..0000000 --- a/model/Top/TopPerson.php +++ /dev/null @@ -1,123 +0,0 @@ -getTitle(); - } - - /** - * @return int - */ - public function getRank(): int - { - return $this->rank; - } - - /** - * @return int - */ - public function getMalId(): int - { - return $this->malId; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string|null - */ - public function getNameKanji(): ?string - { - return $this->nameKanji; - } - - /** - * @return int - */ - public function getFavorites(): int - { - return $this->favorites; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getBirthday(): ?\DateTimeImmutable - { - return $this->birthday; - } -} diff --git a/model/User/AnimeListItem.php b/model/User/AnimeListItem.php deleted file mode 100644 index cf3704f..0000000 --- a/model/User/AnimeListItem.php +++ /dev/null @@ -1,392 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getVideoUrl(): string - { - return $this->videoUrl; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return int - */ - public function getWatchingStatus(): int - { - return $this->watchingStatus; - } - - /** - * @return float - */ - public function getScore(): float - { - return $this->score; - } - - /** - * @return int - */ - public function getWatchedEpisodes(): int - { - return $this->watchedEpisodes; - } - - /** - * @return int - */ - public function getTotalEpisodes(): int - { - return $this->totalEpisodes; - } - - /** - * @return int - */ - public function getAiringStatus(): int - { - return $this->airingStatus; - } - - /** - * @return string|null - */ - public function getSeasonName(): ?string - { - return $this->seasonName; - } - - /** - * @return int|null - */ - public function getSeasonYear(): ?int - { - return $this->seasonYear; - } - - /** - * @return bool - */ - public function isHasEpisodeVideo(): bool - { - return $this->hasEpisodeVideo; - } - - /** - * @return bool - */ - public function isHasPromoVideo(): bool - { - return $this->hasPromoVideo; - } - - /** - * @return bool - */ - public function isHasVideo(): bool - { - return $this->hasVideo; - } - - /** - * @return bool - */ - public function isRewatching(): bool - { - return $this->isRewatching; - } - - /** - * @return null|string - */ - public function getTags(): ?string - { - return $this->tags; - } - - /** - * @return null|string - */ - public function getRating(): ?string - { - return $this->rating; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getStartDate(): ?\DateTimeImmutable - { - return $this->startDate; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getEndDate(): ?\DateTimeImmutable - { - return $this->endDate; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getWatchStartDate(): ?\DateTimeImmutable - { - return $this->watchStartDate; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getWatchEndDate(): ?\DateTimeImmutable - { - return $this->watchEndDate; - } - - /** - * @return null|string - */ - public function getDays(): ?string - { - return $this->days; - } - - /** - * @return null|string - */ - public function getStorage(): ?string - { - return $this->storage; - } - - /** - * @return string - */ - public function getPriority(): string - { - return $this->priority; - } - - /** - * @return array - */ - public function getStudios(): array - { - return $this->studios; - } - - /** - * @return array - */ - public function getLicensors(): array - { - return $this->licensors; - } - - /** - * @return bool - */ - public function isAddedToList(): bool - { - return $this->addedToList; - } -} diff --git a/model/User/Favorites.php b/model/User/Favorites.php deleted file mode 100644 index 4cd40d5..0000000 --- a/model/User/Favorites.php +++ /dev/null @@ -1,64 +0,0 @@ -anime; - } - - /** - * @return array - */ - public function getManga(): array - { - return $this->manga; - } - - /** - * @return array - */ - public function getCharacters(): array - { - return $this->characters; - } - - /** - * @return array - */ - public function getPeople(): array - { - return $this->people; - } -} diff --git a/model/User/Friend.php b/model/User/Friend.php deleted file mode 100644 index 40b4cc0..0000000 --- a/model/User/Friend.php +++ /dev/null @@ -1,85 +0,0 @@ -username; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getUsername(): string - { - return $this->username; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return \DateTimeImmutable - */ - public function getLastOnline(): \DateTimeImmutable - { - return $this->lastOnline; - } - - /** - * @return \DateTimeImmutable - */ - public function getFriendsSince(): \DateTimeImmutable - { - return $this->friendsSince; - } -} diff --git a/model/User/History.php b/model/User/History.php deleted file mode 100644 index 29232e6..0000000 --- a/model/User/History.php +++ /dev/null @@ -1,52 +0,0 @@ -increment; - } - - /** - * @return \DateTimeImmutable - */ - public function getDate(): \DateTimeImmutable - { - return $this->date; - } - - /** - * @return HistoryMeta - */ - public function getMeta(): HistoryMeta - { - return $this->meta; - } -} diff --git a/model/User/MangaListItem.php b/model/User/MangaListItem.php deleted file mode 100644 index 5ae86c8..0000000 --- a/model/User/MangaListItem.php +++ /dev/null @@ -1,312 +0,0 @@ -malId; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return string - */ - public function getImageUrl(): string - { - return $this->imageUrl; - } - - /** - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * @return int - */ - public function getReadingStatus(): int - { - return $this->readingStatus; - } - - /** - * @return float - */ - public function getScore(): float - { - return $this->score; - } - - /** - * @return int - */ - public function getReadChapters(): int - { - return $this->readChapters; - } - - /** - * @return int - */ - public function getReadVolumes(): int - { - return $this->readVolumes; - } - - /** - * @return int - */ - public function getTotalChapters(): int - { - return $this->totalChapters; - } - - /** - * @return int - */ - public function getTotalVolumes(): int - { - return $this->totalVolumes; - } - - /** - * @return int - */ - public function getPublishingStatus(): int - { - return $this->publishingStatus; - } - - /** - * @return bool - */ - public function isRereading(): bool - { - return $this->isRereading; - } - - /** - * @return null|string - */ - public function getTags(): ?string - { - return $this->tags; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getStartDate(): ?\DateTimeImmutable - { - return $this->startDate; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getEndDate(): ?\DateTimeImmutable - { - return $this->endDate; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getReadStartDate(): ?\DateTimeImmutable - { - return $this->readStartDate; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getReadEndDate(): ?\DateTimeImmutable - { - return $this->readEndDate; - } - - /** - * @return null|string - */ - public function getDays(): ?string - { - return $this->days; - } - - /** - * @return null|string - */ - public function getRetail(): ?string - { - return $this->retail; - } - - /** - * @return string - */ - public function getPriority(): string - { - return $this->priority; - } - - /** - * @return bool - */ - public function isAddedToList(): bool - { - return $this->addedToList; - } - - /** - * @return array - */ - public function getMagazines(): array - { - return $this->magazines; - } -} diff --git a/model/User/Profile.php b/model/User/Profile.php deleted file mode 100644 index 1efb803..0000000 --- a/model/User/Profile.php +++ /dev/null @@ -1,168 +0,0 @@ -username; - } - - /** - * @return \DateTimeImmutable - */ - public function getLastOnline(): \DateTimeImmutable - { - return $this->lastOnline; - } - - /** - * @return string|null - */ - public function getGender(): ?string - { - return $this->gender; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getBirthday(): ?\DateTimeImmutable - { - return $this->birthday; - } - - /** - * @return string - */ - public function getLocation(): string - { - return $this->location; - } - - /** - * @return \DateTimeImmutable|null - */ - public function getJoined(): ?\DateTimeImmutable - { - return $this->joined; - } - - /** - * @return UserAnimeStats - */ - public function getAnimeStats(): UserAnimeStats - { - return $this->animeStats; - } - - /** - * @return UserMangaStats - */ - public function getMangaStats(): UserMangaStats - { - return $this->mangaStats; - } - - /** - * @return Favorites - */ - public function getFavorites(): Favorites - { - return $this->favorites; - } - - /** - * @return string|null - */ - public function getAbout(): ?string - { - return $this->about; - } - - /** - * @return string - */ - public function getUrl(): string - { - return $this->url; - } - - /** - * @return null|string - */ - public function getImageUrl(): ?string - { - return $this->imageUrl; - } -} diff --git a/model/User/UserAnimeStats.php b/model/User/UserAnimeStats.php deleted file mode 100644 index 960891f..0000000 --- a/model/User/UserAnimeStats.php +++ /dev/null @@ -1,141 +0,0 @@ -daysWatched; - } - - /** - * @return float - */ - public function getMeanScore(): float - { - return $this->meanScore; - } - - /** - * @return int - */ - public function getWatching(): int - { - return $this->watching; - } - - /** - * @return int - */ - public function getCompleted(): int - { - return $this->completed; - } - - /** - * @return int - */ - public function getOnHold(): int - { - return $this->onHold; - } - - /** - * @return int - */ - public function getDropped(): int - { - return $this->dropped; - } - - /** - * @return int - */ - public function getPlanToWatch(): int - { - return $this->planToWatch; - } - - /** - * @return int - */ - public function getTotalEntries(): int - { - return $this->totalEntries; - } - - /** - * @return int - */ - public function getRewatched(): int - { - return $this->rewatched; - } - - /** - * @return int - */ - public function getEpisodesWatched(): int - { - return $this->episodesWatched; - } -} diff --git a/model/User/UserMangaStats.php b/model/User/UserMangaStats.php deleted file mode 100644 index fcb8857..0000000 --- a/model/User/UserMangaStats.php +++ /dev/null @@ -1,154 +0,0 @@ -daysRead; - } - - /** - * @return float - */ - public function getMeanScore(): float - { - return $this->meanScore; - } - - /** - * @return int - */ - public function getReading(): int - { - return $this->reading; - } - - /** - * @return int - */ - public function getCompleted(): int - { - return $this->completed; - } - - /** - * @return int - */ - public function getOnHold(): int - { - return $this->onHold; - } - - /** - * @return int - */ - public function getDropped(): int - { - return $this->dropped; - } - - /** - * @return int - */ - public function getPlanToRead(): int - { - return $this->planToRead; - } - - /** - * @return int - */ - public function getTotalEntries(): int - { - return $this->totalEntries; - } - - /** - * @return int - */ - public function getReread(): int - { - return $this->reread; - } - - /** - * @return int - */ - public function getChaptersRead(): int - { - return $this->chaptersRead; - } - - /** - * @return int - */ - public function getVolumesRead(): int - { - return $this->volumesRead; - } -} diff --git a/phpunit.xml b/phpunit.xml index 5e68de6..9a612cb 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,10 +1,7 @@ - - - - + - ./test/ + ./tests/ diff --git a/request/Anime/AnimeCharactersAndStaffRequest.php b/request/Anime/AnimeCharactersAndStaffRequest.php deleted file mode 100644 index 11c032f..0000000 --- a/request/Anime/AnimeCharactersAndStaffRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/characters_staff', $baseUrl, $this->id); - } -} diff --git a/request/Anime/AnimeEpisodesRequest.php b/request/Anime/AnimeEpisodesRequest.php deleted file mode 100644 index ec89fca..0000000 --- a/request/Anime/AnimeEpisodesRequest.php +++ /dev/null @@ -1,45 +0,0 @@ -id = $id; - $this->page = ($page - 1) * 100; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/episodes/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/Anime/AnimeForumRequest.php b/request/Anime/AnimeForumRequest.php deleted file mode 100644 index 6c742c8..0000000 --- a/request/Anime/AnimeForumRequest.php +++ /dev/null @@ -1,55 +0,0 @@ -id = $id; - $this->topic = $topic; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - $query = ''; - if ($this->topic !== null && \in_array($this->topic, self::$validTypes, true)) { - $query = '?'.http_build_query(['topic' => $this->topic]); - } - - // TODO: add support for filtering once it's added in the REST API - return sprintf('%s/anime/%d/forum', $baseUrl, $this->id); - } -} diff --git a/request/Anime/AnimeMoreInfoRequest.php b/request/Anime/AnimeMoreInfoRequest.php deleted file mode 100644 index 678eda7..0000000 --- a/request/Anime/AnimeMoreInfoRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%s/moreinfo', $baseUrl, $this->id); - } -} diff --git a/request/Anime/AnimeNewsRequest.php b/request/Anime/AnimeNewsRequest.php deleted file mode 100644 index 15f1b2a..0000000 --- a/request/Anime/AnimeNewsRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/news', $baseUrl, $this->id); - } -} diff --git a/request/Anime/AnimePicturesRequest.php b/request/Anime/AnimePicturesRequest.php deleted file mode 100644 index 8a24de6..0000000 --- a/request/Anime/AnimePicturesRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/pictures', $baseUrl, $this->id); - } -} diff --git a/request/Anime/AnimeRecentlyUpdatedByUsersRequest.php b/request/Anime/AnimeRecentlyUpdatedByUsersRequest.php deleted file mode 100644 index b51e37c..0000000 --- a/request/Anime/AnimeRecentlyUpdatedByUsersRequest.php +++ /dev/null @@ -1,43 +0,0 @@ -id = $id; - $this->page = ($page - 1) * 75; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/userupdates/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/Anime/AnimeRecommendationsRequest.php b/request/Anime/AnimeRecommendationsRequest.php deleted file mode 100644 index 20aeb48..0000000 --- a/request/Anime/AnimeRecommendationsRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/recommendations', $baseUrl, $this->id); - } -} diff --git a/request/Anime/AnimeRequest.php b/request/Anime/AnimeRequest.php deleted file mode 100644 index 6c405b6..0000000 --- a/request/Anime/AnimeRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d', $baseUrl, $this->id); - } -} diff --git a/request/Anime/AnimeReviewsRequest.php b/request/Anime/AnimeReviewsRequest.php deleted file mode 100644 index 2ee1608..0000000 --- a/request/Anime/AnimeReviewsRequest.php +++ /dev/null @@ -1,44 +0,0 @@ -id = $id; - $this->page = $page; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/reviews/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/Anime/AnimeStatsRequest.php b/request/Anime/AnimeStatsRequest.php deleted file mode 100644 index 1cfb380..0000000 --- a/request/Anime/AnimeStatsRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/stats', $baseUrl, $this->id); - } -} diff --git a/request/Anime/AnimeVideosRequest.php b/request/Anime/AnimeVideosRequest.php deleted file mode 100644 index 4b02f77..0000000 --- a/request/Anime/AnimeVideosRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/anime/%d/videos', $baseUrl, $this->id); - } -} diff --git a/request/Character/CharacterPicturesRequest.php b/request/Character/CharacterPicturesRequest.php deleted file mode 100644 index 90a21ce..0000000 --- a/request/Character/CharacterPicturesRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/character/%d/pictures', $baseUrl, $this->id); - } -} diff --git a/request/Character/CharacterRequest.php b/request/Character/CharacterRequest.php deleted file mode 100644 index 75ba618..0000000 --- a/request/Character/CharacterRequest.php +++ /dev/null @@ -1,39 +0,0 @@ -id = $id; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/character/%d', $baseUrl, $this->id); - } -} diff --git a/request/Club/ClubRequest.php b/request/Club/ClubRequest.php deleted file mode 100644 index 739834e..0000000 --- a/request/Club/ClubRequest.php +++ /dev/null @@ -1,36 +0,0 @@ -clubId = $clubId; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/club/%d', $baseUrl, $this->clubId); - } -} diff --git a/request/Club/UserListRequest.php b/request/Club/UserListRequest.php deleted file mode 100644 index 62dff1b..0000000 --- a/request/Club/UserListRequest.php +++ /dev/null @@ -1,42 +0,0 @@ -clubId = $clubId; - $this->page = ($page - 1) * 36; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/club/%d/members/%d', $baseUrl, $this->clubId, $this->page); - } -} diff --git a/request/Genre/AnimeGenreRequest.php b/request/Genre/AnimeGenreRequest.php deleted file mode 100644 index f2896b1..0000000 --- a/request/Genre/AnimeGenreRequest.php +++ /dev/null @@ -1,45 +0,0 @@ -id = $id; - $this->page = $page; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/genre/anime/%d/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/Genre/MangaGenreRequest.php b/request/Genre/MangaGenreRequest.php deleted file mode 100644 index 88dcc56..0000000 --- a/request/Genre/MangaGenreRequest.php +++ /dev/null @@ -1,45 +0,0 @@ -id = $id; - $this->page = $page; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/genre/manga/%d/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/Magazine/MagazineRequest.php b/request/Magazine/MagazineRequest.php deleted file mode 100644 index 5956178..0000000 --- a/request/Magazine/MagazineRequest.php +++ /dev/null @@ -1,45 +0,0 @@ -id = $id; - $this->page = $page; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/magazine/%d/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/Manga/MangaCharactersRequest.php b/request/Manga/MangaCharactersRequest.php deleted file mode 100644 index f6d4e38..0000000 --- a/request/Manga/MangaCharactersRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d/characters', $baseUrl, $this->id); - } -} diff --git a/request/Manga/MangaForumRequest.php b/request/Manga/MangaForumRequest.php deleted file mode 100644 index 46fed36..0000000 --- a/request/Manga/MangaForumRequest.php +++ /dev/null @@ -1,50 +0,0 @@ -id = $id; - $this->topic = $topic; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - // TODO: add support for filtering once it's added in the REST API - return sprintf('%s/manga/%d/forum', $baseUrl, $this->id); - } -} diff --git a/request/Manga/MangaMoreInfoRequest.php b/request/Manga/MangaMoreInfoRequest.php deleted file mode 100644 index 1f992c6..0000000 --- a/request/Manga/MangaMoreInfoRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d/moreinfo', $baseUrl, $this->id); - } -} diff --git a/request/Manga/MangaNewsRequest.php b/request/Manga/MangaNewsRequest.php deleted file mode 100644 index 6c267b7..0000000 --- a/request/Manga/MangaNewsRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d/news', $baseUrl, $this->id); - } -} diff --git a/request/Manga/MangaPicturesRequest.php b/request/Manga/MangaPicturesRequest.php deleted file mode 100644 index be21937..0000000 --- a/request/Manga/MangaPicturesRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d/pictures', $baseUrl, $this->id); - } -} diff --git a/request/Manga/MangaRecentlyUpdatedByUsersRequest.php b/request/Manga/MangaRecentlyUpdatedByUsersRequest.php deleted file mode 100644 index 3c49c1f..0000000 --- a/request/Manga/MangaRecentlyUpdatedByUsersRequest.php +++ /dev/null @@ -1,43 +0,0 @@ -id = $id; - $this->page = ($page - 1) * 75; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d/userupdates/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/Manga/MangaRecommendationsRequest.php b/request/Manga/MangaRecommendationsRequest.php deleted file mode 100644 index 7634401..0000000 --- a/request/Manga/MangaRecommendationsRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d/recommendations', $baseUrl, $this->id); - } -} diff --git a/request/Manga/MangaRequest.php b/request/Manga/MangaRequest.php deleted file mode 100644 index e7046ac..0000000 --- a/request/Manga/MangaRequest.php +++ /dev/null @@ -1,38 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d', $baseUrl, $this->id); - } -} diff --git a/request/Manga/MangaReviewsRequest.php b/request/Manga/MangaReviewsRequest.php deleted file mode 100644 index 6b58087..0000000 --- a/request/Manga/MangaReviewsRequest.php +++ /dev/null @@ -1,44 +0,0 @@ -id = $id; - $this->page = $page; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d/reviews/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/Manga/MangaStatsRequest.php b/request/Manga/MangaStatsRequest.php deleted file mode 100644 index 776933a..0000000 --- a/request/Manga/MangaStatsRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/manga/%d/stats', $baseUrl, $this->id); - } -} diff --git a/request/Person/PersonPicturesRequest.php b/request/Person/PersonPicturesRequest.php deleted file mode 100644 index 66b9764..0000000 --- a/request/Person/PersonPicturesRequest.php +++ /dev/null @@ -1,37 +0,0 @@ -id = $id; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/person/%d/pictures', $baseUrl, $this->id); - } -} diff --git a/request/Person/PersonRequest.php b/request/Person/PersonRequest.php deleted file mode 100644 index 08f08c8..0000000 --- a/request/Person/PersonRequest.php +++ /dev/null @@ -1,39 +0,0 @@ -id = $id; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/person/%d', $baseUrl, $this->id); - } -} diff --git a/request/Producer/ProducerRequest.php b/request/Producer/ProducerRequest.php deleted file mode 100644 index 18fb733..0000000 --- a/request/Producer/ProducerRequest.php +++ /dev/null @@ -1,45 +0,0 @@ -id = $id; - $this->page = $page; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/producer/%d/%d', $baseUrl, $this->id, $this->page); - } -} diff --git a/request/RequestInterface.php b/request/RequestInterface.php deleted file mode 100644 index 12b25c7..0000000 --- a/request/RequestInterface.php +++ /dev/null @@ -1,20 +0,0 @@ -query = $query; - $this->page = $page; - - $this->query = $this->query ?? ''; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - - // todo add `limit` (int) - $query = http_build_query( - [ - 'q' => $this->query, - 'page' => $this->page, - // 'letter' => $this->char, // not implemented :thinking: todo - 'type' => $this->type, - 'score' => $this->score, - 'status' => $this->status, - // 'p' => $this->producer, // not implemented todo - 'rated' => $this->rated, - //'start_date' => $this->startDate->format(DATE_ATOM) ?? null, - //'end_date' => $this->endDate->format(DATE_ATOM) ?? null, - 'genre_exclude' => (int) $this->genreExclude, - ] - ); - - // Add genre[]= - if (!empty($this->genre)) { - foreach ($this->genre as $genre) { - $query .= '&genre[]='.$genre; - } - } - - return sprintf('%s/search/anime?%s', $baseUrl, $query); - } - - /** - * @param null|string $query - * - * @return $this - */ - public function setQuery(?string $query = null): self - { - $this->query = $query; - $this->query = $this->query ?? ''; - - return $this; - } - - /** - * @param int $page - * - * @return $this - */ - public function setPage(int $page): self - { - $this->page = $page; - - return $this; - } - - /** - * @param string $char - * - * @return $this - */ - public function setStartsWithChar(string $char): self - { - $this->char = $char; - - return $this; - } - - /** - * @param string $type - * - * @return $this - */ - public function setType(string $type): self - { - $this->type = $type; - - return $this; - } - - /** - * @param float $score - * - * @return $this - */ - public function setScore(float $score): self - { - $this->score = $score; - - return $this; - } - - /** - * @param int $status - * - * @return $this - */ - public function setStatus(int $status): self - { - $this->status = $status; - - return $this; - } - - /** - * @param int $producer - * - * @return $this - */ - public function setProducer(int $producer): self - { - $this->producer = $producer; - - return $this; - } - - /** - * @param int $rated - * - * @return $this - */ - public function setRated(int $rated): self - { - $this->rated = $rated; - - return $this; - } - - /** - * @param \DateTime $date - * @return AnimeSearchRequest - */ - public function setStartDate(\DateTime $date): self - { - $this->startDate = $date; - - return $this; - } - - /** - * @param \DateTime $date - * @return AnimeSearchRequest - */ - public function setEndDate(\DateTime $date): self - { - $this->endDate = $date; - - return $this; - } - - /** - * @param array|int ...$genre - * - * @return AnimeSearchRequest - */ - public function setGenre(...$genre): self - { - $this->genre = array_unique( - array_merge($genre, $this->genre) - ); - - - return $this; - } - - /** - * @param bool $genreExclude - * - * @return $this - */ - public function setGenreExclude(bool $genreExclude): self - { - $this->genreExclude = $genreExclude; - - return $this; - } -} diff --git a/request/Search/CharacterSearchRequest.php b/request/Search/CharacterSearchRequest.php deleted file mode 100644 index a80f20e..0000000 --- a/request/Search/CharacterSearchRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -query = $query; - $this->page = $page; - - $this->query = $this->query ?? ""; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - - $query = http_build_query( - [ - 'q' => $this->query, - 'show' => $this->page, - // 'letter' => $this->char, // not implemented todo - ] - ); - - return sprintf('%s/search/character?%s', $baseUrl, $query); - } - - /** - * @param null|string $query - * - * @return $this - */ - public function setQuery(?string $query = null): self - { - $this->query = $query; - $this->query = $this->query ?? ""; - - return $this; - } - - /** - * @param int $page - * - * @return $this - */ - public function setPage(int $page): self - { - $this->page = $page; - - return $this; - } - - /** - * @param string $char - * - * @return $this - */ - public function setStartsWithChar(string $char): self - { - $this->char = $char; - - return $this; - } -} diff --git a/request/Search/MangaSearchRequest.php b/request/Search/MangaSearchRequest.php deleted file mode 100644 index 0fafdc0..0000000 --- a/request/Search/MangaSearchRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -query = $query; - $this->page = $page; - - $this->query = $this->query ?? ""; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - - $query = http_build_query( - [ - 'q' => $this->query, - 'page' => $this->page, - // 'letter' => $this->char, // not implemented :thinking: todo - 'type' => $this->type, - 'score' => $this->score, - 'status' => $this->status, - // 'mid' => $this->magazine, // not implemented todo - // 'rated' => $this->rated, // not in manga - //'start_date' => $this->startDate->format(DATE_ATOM) ?? null, - //'end_date' => $this->endDate->format(DATE_ATOM) ?? null, - 'genre_exclude' => (int) $this->genreExclude, - ] - ); - - // Add genre[]= - if (!empty($this->genre)) { - foreach ($this->genre as $genre) { - $query .= '&genre[]='.$genre; - } - } - - return sprintf('%s/search/manga?%s', $baseUrl, $query); - } - - /** - * @param null|string $query - * - * @return $this - */ - public function setQuery(?string $query = null): self - { - $this->query = $query; - $this->query = $this->query ?? ""; - - return $this; - } - - /** - * @param int $page - * - * @return $this - */ - public function setPage(int $page): self - { - $this->page = $page; - - return $this; - } - - /** - * @param string $char - * - * @return $this - */ - public function setStartsWithChar(string $char): self - { - $this->char = $char; - - return $this; - } - - /** - * @param string $type - * - * @return $this - */ - public function setType(string $type): self - { - $this->type = $type; - - return $this; - } - - /** - * @param float $score - * - * @return $this - */ - public function setScore(float $score): self - { - $this->score = $score; - - return $this; - } - - /** - * @param int $status - * - * @return $this - */ - public function setStatus(int $status): self - { - $this->status = $status; - - return $this; - } - - /** - * @param int $magazine - * - * @return $this - */ - public function setMagazine(int $magazine): self - { - $this->magazine = $magazine; - - return $this; - } - - /** - * @param \DateTime $date - * @return AnimeSearchRequest - */ - public function setStartDate(\DateTime $date): self - { - $this->startDate = $date; - - return $this; - } - - /** - * @param \DateTime $date - * @return AnimeSearchRequest - */ - public function setEndDate(\DateTime $date): self - { - $this->endDate = $date; - - return $this; - } - - /** - * @param array|int ...$genre - * - * @return MangaSearchRequest - */ - public function setGenre(...$genre): self - { - $this->genre = array_unique( - array_merge($genre, $this->genre) - ); - - - return $this; - } - - /** - * @param bool $genreExclude - * - * @return $this - */ - public function setGenreExclude(bool $genreExclude): self - { - $this->genreExclude = $genreExclude; - - return $this; - } -} diff --git a/request/Search/PersonSearchRequest.php b/request/Search/PersonSearchRequest.php deleted file mode 100644 index aa99ff3..0000000 --- a/request/Search/PersonSearchRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -query = $query; - $this->page = $page; - - $this->query = $this->query ?? ""; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - - $query = http_build_query( - [ - 'q' => $this->query, - 'show' => $this->page, - // 'letter' => $this->char, // not implemented todo - ] - ); - - return sprintf('%s/search/people?%s', $baseUrl, $query); - } - - /** - * @param null|string $query - * - * @return $this - */ - public function setQuery(?string $query = null): self - { - $this->query = $query; - $this->query = $this->query ?? ""; - - return $this; - } - - /** - * @param int $page - * - * @return $this - */ - public function setPage(int $page): self - { - $this->page = $page; - - return $this; - } - - /** - * @param string $char - * - * @return $this - */ - public function setStartsWithChar(string $char): self - { - $this->char = $char; - - return $this; - } -} diff --git a/request/SeasonList/SeasonListRequest.php b/request/SeasonList/SeasonListRequest.php deleted file mode 100644 index f2589b1..0000000 --- a/request/SeasonList/SeasonListRequest.php +++ /dev/null @@ -1,22 +0,0 @@ -year = $year; - $this->season = $season; - $this->later = $later; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - if ($this->later) { - return sprintf('%s/season/later', $baseUrl); - } - - if (null === $this->year || null === $this->season) { - return sprintf('%s/season', $baseUrl); - } - - return sprintf('%s/season/%d/%s', $baseUrl, $this->year, $this->season); - } -} diff --git a/request/Top/TopAnimeRequest.php b/request/Top/TopAnimeRequest.php deleted file mode 100644 index de6a63d..0000000 --- a/request/Top/TopAnimeRequest.php +++ /dev/null @@ -1,68 +0,0 @@ -page = $page; - - if (null !== $type) { - if (!\in_array( - $type, - [ - Constants::TOP_AIRING, - Constants::TOP_UPCOMING, - Constants::TOP_TV, - Constants::TOP_MOVIE, - Constants::TOP_OVA, - Constants::TOP_SPECIAL, - Constants::TOP_BY_POPULARITY, - Constants::TOP_BY_FAVORITES, - ], - true - )) { - throw new \InvalidArgumentException(sprintf('Type %s is not valid', $type)); - } - - $this->type = $type; - } - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/top/anime/%d/%s', $baseUrl, $this->page, $this->type); - } -} diff --git a/request/Top/TopCharactersRequest.php b/request/Top/TopCharactersRequest.php deleted file mode 100644 index cef8ef1..0000000 --- a/request/Top/TopCharactersRequest.php +++ /dev/null @@ -1,39 +0,0 @@ -page = $page; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/top/characters/%d', $baseUrl, $this->page); - } -} diff --git a/request/Top/TopMangaRequest.php b/request/Top/TopMangaRequest.php deleted file mode 100644 index c6ea1ac..0000000 --- a/request/Top/TopMangaRequest.php +++ /dev/null @@ -1,68 +0,0 @@ -page = $page; - - if (null !== $type) { - if (!\in_array( - $type, - [ - Constants::TOP_MANGA, - Constants::TOP_NOVEL, - Constants::TOP_ONE_SHOT, - Constants::TOP_DOUJINSHI, - Constants::TOP_MANHWA, - Constants::TOP_MANHUA, - Constants::TOP_BY_POPULARITY, - Constants::TOP_BY_FAVORITES, - ], - true - )) { - throw new \InvalidArgumentException(sprintf('Type %s is not valid', $type)); - } - - $this->type = $type; - } - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/top/manga/%d/%s', $baseUrl, $this->page, $this->type); - } -} diff --git a/request/Top/TopPeopleRequest.php b/request/Top/TopPeopleRequest.php deleted file mode 100644 index 43ed4e5..0000000 --- a/request/Top/TopPeopleRequest.php +++ /dev/null @@ -1,39 +0,0 @@ -page = $page; - } - - /** - * Get the path to request - * - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/top/people/%d', $baseUrl, $this->page); - } -} diff --git a/request/User/UserAnimeListRequest.php b/request/User/UserAnimeListRequest.php deleted file mode 100644 index ee2a13b..0000000 --- a/request/User/UserAnimeListRequest.php +++ /dev/null @@ -1,52 +0,0 @@ -username = $username; - $this->page = $page; - $this->status = $status; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/user/%s/animelist/%s/%d', $baseUrl, $this->username, $this->status, $this->page); - } -} diff --git a/request/User/UserFriendsRequest.php b/request/User/UserFriendsRequest.php deleted file mode 100644 index a66c8bd..0000000 --- a/request/User/UserFriendsRequest.php +++ /dev/null @@ -1,44 +0,0 @@ -username = $username; - $this->page = $page; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/user/%s/friends/%d', $baseUrl, $this->username, $this->page); - } -} diff --git a/request/User/UserHistoryRequest.php b/request/User/UserHistoryRequest.php deleted file mode 100644 index c5f3ea6..0000000 --- a/request/User/UserHistoryRequest.php +++ /dev/null @@ -1,54 +0,0 @@ -username = $username; - - if (null !== $type) { - if (!empty($type) && !\in_array($type, ['anime', 'manga'])) { - throw new \InvalidArgumentException(sprintf('Type %s is not valid', $type)); - } - - $this->type = $type; - } - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/user/%s/history/%s', $baseUrl, $this->username, $this->type); - } -} diff --git a/request/User/UserMangaListRequest.php b/request/User/UserMangaListRequest.php deleted file mode 100644 index b8caa97..0000000 --- a/request/User/UserMangaListRequest.php +++ /dev/null @@ -1,52 +0,0 @@ -username = $username; - $this->page = $page; - $this->status = $status; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/user/%s/mangalist/%s/%d', $baseUrl, $this->username, $this->status, $this->page); - } -} diff --git a/request/User/UserProfileRequest.php b/request/User/UserProfileRequest.php deleted file mode 100644 index 3657538..0000000 --- a/request/User/UserProfileRequest.php +++ /dev/null @@ -1,38 +0,0 @@ -username = $username; - } - - /** - * @return string - */ - public function getPath($baseUrl): string - { - return sprintf('%s/user/%s', $baseUrl, $this->username); - } -} diff --git a/src/Client.php b/src/Client.php new file mode 100644 index 0000000..32633d3 --- /dev/null +++ b/src/Client.php @@ -0,0 +1,1590 @@ +executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeFullById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeIdGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeCharactersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeCharacters|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeCharacters(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeCharacters($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeStaffBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeStaff|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeStaff(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeStaff($id), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeEpisodesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeEpisodes|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeEpisodes(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeEpisodes($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param int $episode + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeEpisodeByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeIdEpisodesEpisodeGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeEpisodeById(int $id, int $episode, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeEpisodeById($id, $episode), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeNewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeNews|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeNews(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeNews($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var string $filter Filter topics + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeForumBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Forum|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeForum(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeForum($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeVideosBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeVideos|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeVideos(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeVideos($id), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeVideosEpisodesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeVideosEpisodes|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeVideosEpisodes(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeVideosEpisodes($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimePicturesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PicturesVariants|\Psr\Http\Message\ResponseInterface + */ + public function getAnimePictures(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimePictures($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeStatisticsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeStatistics|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeStatistics(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeStatistics($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeMoreInfoBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Moreinfo|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeMoreInfo(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeMoreInfo($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\EntryRecommendations|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeRecommendations(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeRecommendations($id), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeUserUpdatesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeUserupdates|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeUserUpdates(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeUserUpdates($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeReviewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeReviews|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeReviews(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeReviews($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @return null|\Jikan\JikanPHP\Model\AnimeIdRelationsGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeRelations(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeRelations($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeThemesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeThemes|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeThemes(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeThemes($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeExternalBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeExternal(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeExternal($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeStreamingBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeStreaming(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeStreaming($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharactersIdFullGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getCharacterFullById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetCharacterFullById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharactersIdGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getCharacterById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetCharacterById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterAnimeBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharacterAnime|\Psr\Http\Message\ResponseInterface + */ + public function getCharacterAnime(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetCharacterAnime($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterMangaBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharacterManga|\Psr\Http\Message\ResponseInterface + */ + public function getCharacterManga(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetCharacterManga($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterVoiceActorsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharacterVoiceActors|\Psr\Http\Message\ResponseInterface + */ + public function getCharacterVoiceActors(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetCharacterVoiceActors($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterPicturesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharacterPictures|\Psr\Http\Message\ResponseInterface + */ + public function getCharacterPictures(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetCharacterPictures($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetClubsByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubsIdGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getClubsById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetClubsById($id), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetClubMembersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubsIdMembersGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getClubMembers(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetClubMembers($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetClubStaffBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubStaff|\Psr\Http\Message\ResponseInterface + */ + public function getClubStaff(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetClubStaff($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetClubRelationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubRelations|\Psr\Http\Message\ResponseInterface + */ + public function getClubRelations(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetClubRelations($id), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var string $filter + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeGenresBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Genres|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeGenres(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeGenres($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var string $filter + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaGenresBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Genres|\Psr\Http\Message\ResponseInterface + */ + public function getMangaGenres(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaGenres($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * @var string $q + * @var string $order_by + * @var string $sort + * @var string $letter Return entries starting with the given letter + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMagazinesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Magazines|\Psr\Http\Message\ResponseInterface + */ + public function getMagazines(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMagazines($queryParameters), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaIdFullGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getMangaFullById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaFullById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaIdGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getMangaById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaCharactersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaCharacters|\Psr\Http\Message\ResponseInterface + */ + public function getMangaCharacters(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaCharacters($id), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaNewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaNews|\Psr\Http\Message\ResponseInterface + */ + public function getMangaNews(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaNews($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var string $filter Filter topics + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaTopicsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Forum|\Psr\Http\Message\ResponseInterface + */ + public function getMangaTopics(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaTopics($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaPicturesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaPictures|\Psr\Http\Message\ResponseInterface + */ + public function getMangaPictures(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaPictures($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaStatisticsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaStatistics|\Psr\Http\Message\ResponseInterface + */ + public function getMangaStatistics(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaStatistics($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaMoreInfoBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Moreinfo|\Psr\Http\Message\ResponseInterface + */ + public function getMangaMoreInfo(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaMoreInfo($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\EntryRecommendations|\Psr\Http\Message\ResponseInterface + */ + public function getMangaRecommendations(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaRecommendations($id), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaUserUpdatesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaUserupdates|\Psr\Http\Message\ResponseInterface + */ + public function getMangaUserUpdates(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaUserUpdates($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaReviewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaReviews|\Psr\Http\Message\ResponseInterface + */ + public function getMangaReviews(int $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaReviews($id, $queryParameters), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaRelationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaIdRelationsGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getMangaRelations(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaRelations($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaExternalBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks|\Psr\Http\Message\ResponseInterface + */ + public function getMangaExternal(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaExternal($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetPersonFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PeopleIdFullGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getPersonFullById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetPersonFullById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetPersonByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PeopleIdGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getPersonById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetPersonById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetPersonAnimeBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PersonAnime|\Psr\Http\Message\ResponseInterface + */ + public function getPersonAnime(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetPersonAnime($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetPersonVoicesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PersonVoiceActingRoles|\Psr\Http\Message\ResponseInterface + */ + public function getPersonVoices(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetPersonVoices($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetPersonMangaBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PersonManga|\Psr\Http\Message\ResponseInterface + */ + public function getPersonManga(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetPersonManga($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetPersonPicturesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PersonPictures|\Psr\Http\Message\ResponseInterface + */ + public function getPersonPictures(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetPersonPictures($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetProducerByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ProducersIdGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getProducerById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetProducerById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetProducerFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ProducersIdFullGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getProducerFullById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetProducerFullById($id), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetProducerExternalBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks|\Psr\Http\Message\ResponseInterface + */ + public function getProducerExternal(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetProducerExternal($id), $fetch); + } + + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRandomAnimeBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomAnimeGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getRandomAnime(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRandomAnime(), $fetch); + } + + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRandomMangaBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomMangaGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getRandomManga(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRandomManga(), $fetch); + } + + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRandomCharactersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomCharactersGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getRandomCharacters(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRandomCharacters(), $fetch); + } + + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRandomPeopleBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomPeopleGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getRandomPeople(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRandomPeople(), $fetch); + } + + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRandomUsersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomUsersGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getRandomUsers(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRandomUsers(), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRecentAnimeRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Recommendations|\Psr\Http\Message\ResponseInterface + */ + public function getRecentAnimeRecommendations(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRecentAnimeRecommendations($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRecentMangaRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Recommendations|\Psr\Http\Message\ResponseInterface + */ + public function getRecentMangaRecommendations(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRecentMangaRecommendations($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRecentAnimeReviewsBadRequestException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function getRecentAnimeReviews(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRecentAnimeReviews($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetRecentMangaReviewsBadRequestException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function getRecentMangaReviews(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetRecentMangaReviews($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var string $filter Filter by day + * @var string $kids When supplied, it will filter entries with the `Kids` Genre Demographic. When supplied as `kids=true`, it will return only Kid entries and when supplied as `kids=false`, it will filter out any Kid entries. Defaults to `false`. + * @var string $sfw 'Safe For Work'. When supplied, it will filter entries with the `Hentai` Genre. When supplied as `sfw=true`, it will return only SFW entries and when supplied as `sfw=false`, it will filter out any Hentai entries. Defaults to `false`. + * @var int $limit + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetSchedulesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Schedules|\Psr\Http\Message\ResponseInterface + */ + public function getSchedules(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetSchedules($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * @var string $q + * @var string $type + * @var float $score + * @var float $min_score set a minimum score for results + * @var float $max_score Set a maximum score for results + * @var string $status + * @var string $rating + * @var bool $sfw Filter out Adult entries + * @var string $genres Filter by genre(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3 + * @var string $genres_exclude Exclude genre(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3 + * @var string $order_by + * @var string $sort + * @var string $letter Return entries starting with the given letter + * @var string $producers Filter by producer(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3 + * @var string $start_date Filter by starting date. Format: YYYY-MM-DD. e.g `2022`, `2005-05`, `2005-01-01` + * @var string $end_date Filter by ending date. Format: YYYY-MM-DD. e.g `2022`, `2005-05`, `2005-01-01` + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch|\Psr\Http\Message\ResponseInterface + */ + public function getAnimeSearch(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetAnimeSearch($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * @var string $q + * @var string $type + * @var float $score + * @var float $min_score set a minimum score for results + * @var float $max_score Set a maximum score for results + * @var string $status + * @var bool $sfw Filter out Adult entries + * @var string $genres Filter by genre(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3 + * @var string $genres_exclude Exclude genre(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3 + * @var string $order_by + * @var string $sort + * @var string $letter Return entries starting with the given letter + * @var string $magazines Filter by magazine(s) IDs. Can pass multiple with a comma as a delimiter. e.g 1,2,3 + * @var string $start_date Filter by starting date. Format: YYYY-MM-DD. e.g `2022`, `2005-05`, `2005-01-01` + * @var string $end_date Filter by ending date. Format: YYYY-MM-DD. e.g `2022`, `2005-05`, `2005-01-01` + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetMangaSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaSearch|\Psr\Http\Message\ResponseInterface + */ + public function getMangaSearch(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetMangaSearch($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * @var string $q + * @var string $order_by + * @var string $sort + * @var string $letter Return entries starting with the given letter + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetPeopleSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PeopleSearch|\Psr\Http\Message\ResponseInterface + */ + public function getPeopleSearch(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetPeopleSearch($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * @var string $q + * @var string $order_by + * @var string $sort + * @var string $letter Return entries starting with the given letter + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetCharactersSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharactersSearch|\Psr\Http\Message\ResponseInterface + */ + public function getCharactersSearch(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetCharactersSearch($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * @var string $q + * @var string $gender + * @var string $location + * @var int $maxAge + * @var int $minAge + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUsersSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersSearch|\Psr\Http\Message\ResponseInterface + */ + public function getUsersSearch(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUsersSearch($queryParameters), $fetch); + } + + /** + * @param int $id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUserbyidIdGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getUserById(int $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserById($id), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * @var string $q + * @var string $type + * @var string $category + * @var string $order_by + * @var string $sort + * @var string $letter Return entries starting with the given letter + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetClubsSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubsSearch|\Psr\Http\Message\ResponseInterface + */ + public function getClubsSearch(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetClubsSearch($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * @var string $q + * @var string $order_by + * @var string $sort + * @var string $letter Return entries starting with the given letter + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetProducersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Producers|\Psr\Http\Message\ResponseInterface + */ + public function getProducers(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetProducers($queryParameters), $fetch); + } + + /** + * @param int $year + * @param string $season + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetSeasonBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch|\Psr\Http\Message\ResponseInterface + */ + public function getSeason(int $year, string $season, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetSeason($year, $season, $queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetSeasonNowBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch|\Psr\Http\Message\ResponseInterface + */ + public function getSeasonNow(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetSeasonNow($queryParameters), $fetch); + } + + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetSeasonsListBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Seasons|\Psr\Http\Message\ResponseInterface + */ + public function getSeasonsList(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetSeasonsList(), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetSeasonUpcomingBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch|\Psr\Http\Message\ResponseInterface + */ + public function getSeasonUpcoming(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetSeasonUpcoming($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var string $type + * @var string $filter + * @var int $page + * @var int $limit + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetTopAnimeBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch|\Psr\Http\Message\ResponseInterface + */ + public function getTopAnime(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetTopAnime($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var string $type + * @var string $filter + * @var int $page + * @var int $limit + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetTopMangaBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaSearch|\Psr\Http\Message\ResponseInterface + */ + public function getTopManga(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetTopManga($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetTopPeopleBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PeopleSearch|\Psr\Http\Message\ResponseInterface + */ + public function getTopPeople(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetTopPeople($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * @var int $limit + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetTopCharactersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharactersSearch|\Psr\Http\Message\ResponseInterface + */ + public function getTopCharacters(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetTopCharacters($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetTopReviewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\TopReviewsGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getTopReviews(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetTopReviews($queryParameters), $fetch); + } + + /** + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserFullProfileBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUsernameFullGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getUserFullProfile(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserFullProfile($username), $fetch); + } + + /** + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserProfileBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUsernameGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getUserProfile(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserProfile($username), $fetch); + } + + /** + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserStatisticsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserStatistics|\Psr\Http\Message\ResponseInterface + */ + public function getUserStatistics(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserStatistics($username), $fetch); + } + + /** + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserFavoritesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUsernameFavoritesGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getUserFavorites(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserFavorites($username), $fetch); + } + + /** + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserUpdatesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserUpdates|\Psr\Http\Message\ResponseInterface + */ + public function getUserUpdates(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserUpdates($username), $fetch); + } + + /** + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserAboutBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserAbout|\Psr\Http\Message\ResponseInterface + */ + public function getUserAbout(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserAbout($username), $fetch); + } + + /** + * @param string $username + * @param array $queryParameters { + * + * @var string $type + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserHistoryBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserHistory|\Psr\Http\Message\ResponseInterface + */ + public function getUserHistory(string $username, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserHistory($username, $queryParameters), $fetch); + } + + /** + * @param string $username + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserFriendsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserFriends|\Psr\Http\Message\ResponseInterface + */ + public function getUserFriends(string $username, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserFriends($username, $queryParameters), $fetch); + } + + /** + * User Anime lists have been discontinued since May 1st, 2022. Read more. + * + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserAnimelistBadRequestException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function getUserAnimelist(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserAnimelist($username), $fetch); + } + + /** + * User Manga lists have been discontinued since May 1st, 2022. Read more. + * + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserMangaListBadRequestException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function getUserMangaList(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserMangaList($username), $fetch); + } + + /** + * @param string $username + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserReviewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUsernameReviewsGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function getUserReviews(string $username, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserReviews($username, $queryParameters), $fetch); + } + + /** + * @param string $username + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Recommendations|\Psr\Http\Message\ResponseInterface + */ + public function getUserRecommendations(string $username, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserRecommendations($username, $queryParameters), $fetch); + } + + /** + * @param string $username + * @param array $queryParameters { + * + * @var int $page + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserClubsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserClubs|\Psr\Http\Message\ResponseInterface + */ + public function getUserClubs(string $username, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserClubs($username, $queryParameters), $fetch); + } + + /** + * @param string $username + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetUserExternalBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks|\Psr\Http\Message\ResponseInterface + */ + public function getUserExternal(string $username, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetUserExternal($username), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $limit + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetWatchRecentEpisodesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\WatchEpisodes|\Psr\Http\Message\ResponseInterface + */ + public function getWatchRecentEpisodes(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetWatchRecentEpisodes($queryParameters), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $limit + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetWatchPopularEpisodesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\WatchEpisodes|\Psr\Http\Message\ResponseInterface + */ + public function getWatchPopularEpisodes(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetWatchPopularEpisodes($queryParameters), $fetch); + } + + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetWatchRecentPromosBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\WatchPromos|\Psr\Http\Message\ResponseInterface + */ + public function getWatchRecentPromos(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetWatchRecentPromos(), $fetch); + } + + /** + * @param array $queryParameters { + * + * @var int $limit + * } + * + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * + * @throws \Jikan\JikanPHP\Exception\GetWatchPopularPromosBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\WatchPromos|\Psr\Http\Message\ResponseInterface + */ + public function getWatchPopularPromos(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Jikan\JikanPHP\Endpoint\GetWatchPopularPromos($queryParameters), $fetch); + } + + public static function create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = []) + { + if (null === $httpClient) { + $httpClient = \Http\Discovery\Psr18ClientDiscovery::find(); + $plugins = []; + $uri = \Http\Discovery\Psr17FactoryDiscovery::findUrlFactory()->createUri('https://api.jikan.moe/v4'); + $plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri); + $plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri); + if (count($additionalPlugins) > 0) { + $plugins = array_merge($plugins, $additionalPlugins); + } + $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins); + } + $requestFactory = \Http\Discovery\Psr17FactoryDiscovery::findRequestFactory(); + $streamFactory = \Http\Discovery\Psr17FactoryDiscovery::findStreamFactory(); + $normalizers = [new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Jikan\JikanPHP\Normalizer\JaneObjectNormalizer()]; + if (count($additionalNormalizers) > 0) { + $normalizers = array_merge($normalizers, $additionalNormalizers); + } + $serializer = new \Symfony\Component\Serializer\Serializer($normalizers, [new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode(['json_decode_associative' => true]))]); + + return new static($httpClient, $requestFactory, $serializer, $streamFactory); + } +} diff --git a/src/Console/ExportMetaDataCommand.php b/src/Console/ExportMetaDataCommand.php deleted file mode 100644 index ac7c26b..0000000 --- a/src/Console/ExportMetaDataCommand.php +++ /dev/null @@ -1,42 +0,0 @@ -register('metadata:export') - ->setDescription('Extract class metadata.') - ->setCode( - function (InputInterface $input, OutputInterface $output) { - $io = new SymfonyStyle($input, $output); - $finder = new \Symfony\Component\Finder\Finder(); - $finder->files()->in(__DIR__.'/../../model'); - $classmap = []; - // Create a classmap and real class - foreach ($finder as $file) { - $rf = @new \Funkyproject\ReflectionFile($file->getRealPath()); - $classmap[$rf->getShortName()] = $rf->getName(); - } - foreach ($classmap as $class => $fqcn) { - $io->write(sprintf('Processing %s', $fqcn)); - $parser = new MetadataParser($fqcn, $classmap); - $properties = $parser->getParsedProperties(); - $filename = str_replace('\\', '.', $fqcn).'.yml'; - $yaml = new \Symfony\Component\Yaml\Dumper(); - $contents = $yaml->dump($properties, 4, 0, 0); - file_put_contents(__DIR__.'/../../metadata/'.$filename, $contents); - $io->writeln(' OK'); - } - } - ); - -$console->setDefaultCommand('metadata:export'); - -$console->run(); diff --git a/src/Endpoint/GetAnimeById.php b/src/Endpoint/GetAnimeById.php new file mode 100644 index 0000000..4c95319 --- /dev/null +++ b/src/Endpoint/GetAnimeById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeIdGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeIdGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeCharacters.php b/src/Endpoint/GetAnimeCharacters.php new file mode 100644 index 0000000..2e77adc --- /dev/null +++ b/src/Endpoint/GetAnimeCharacters.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/characters'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeCharactersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeCharacters + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeCharacters', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeCharactersBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeEpisodeById.php b/src/Endpoint/GetAnimeEpisodeById.php new file mode 100644 index 0000000..e918052 --- /dev/null +++ b/src/Endpoint/GetAnimeEpisodeById.php @@ -0,0 +1,62 @@ +id = $id; + $this->episode = $episode; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}', '{episode}'], [$this->id, $this->episode], '/anime/{id}/episodes/{episode}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeEpisodeByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeIdEpisodesEpisodeGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeIdEpisodesEpisodeGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeEpisodeByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeEpisodes.php b/src/Endpoint/GetAnimeEpisodes.php new file mode 100644 index 0000000..bad80f7 --- /dev/null +++ b/src/Endpoint/GetAnimeEpisodes.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/episodes'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeEpisodesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeEpisodes + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeEpisodes', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeEpisodesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeExternal.php b/src/Endpoint/GetAnimeExternal.php new file mode 100644 index 0000000..aa4e2d0 --- /dev/null +++ b/src/Endpoint/GetAnimeExternal.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/external'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeExternalBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ExternalLinks', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeExternalBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeForum.php b/src/Endpoint/GetAnimeForum.php new file mode 100644 index 0000000..0055ea3 --- /dev/null +++ b/src/Endpoint/GetAnimeForum.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/forum'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('filter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeForumBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Forum + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Forum', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeForumBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeFullById.php b/src/Endpoint/GetAnimeFullById.php new file mode 100644 index 0000000..28c5161 --- /dev/null +++ b/src/Endpoint/GetAnimeFullById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/full'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeIdFullGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeIdFullGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeFullByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeGenres.php b/src/Endpoint/GetAnimeGenres.php new file mode 100644 index 0000000..3851e83 --- /dev/null +++ b/src/Endpoint/GetAnimeGenres.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/genres/anime'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('filter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeGenresBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Genres + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Genres', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeGenresBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeMoreInfo.php b/src/Endpoint/GetAnimeMoreInfo.php new file mode 100644 index 0000000..3556251 --- /dev/null +++ b/src/Endpoint/GetAnimeMoreInfo.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/moreinfo'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeMoreInfoBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Moreinfo + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Moreinfo', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeMoreInfoBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeNews.php b/src/Endpoint/GetAnimeNews.php new file mode 100644 index 0000000..dfb6ec6 --- /dev/null +++ b/src/Endpoint/GetAnimeNews.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/news'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeNewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeNews + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeNews', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeNewsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimePictures.php b/src/Endpoint/GetAnimePictures.php new file mode 100644 index 0000000..b1a2834 --- /dev/null +++ b/src/Endpoint/GetAnimePictures.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/pictures'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimePicturesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PicturesVariants + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PicturesVariants', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimePicturesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeRecommendations.php b/src/Endpoint/GetAnimeRecommendations.php new file mode 100644 index 0000000..be2a3ee --- /dev/null +++ b/src/Endpoint/GetAnimeRecommendations.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/recommendations'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\EntryRecommendations + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\EntryRecommendations', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeRecommendationsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeRelations.php b/src/Endpoint/GetAnimeRelations.php new file mode 100644 index 0000000..c76d418 --- /dev/null +++ b/src/Endpoint/GetAnimeRelations.php @@ -0,0 +1,54 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/relations'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @return null|\Jikan\JikanPHP\Model\AnimeIdRelationsGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeIdRelationsGetResponse200', 'json'); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeReviews.php b/src/Endpoint/GetAnimeReviews.php new file mode 100644 index 0000000..b22175a --- /dev/null +++ b/src/Endpoint/GetAnimeReviews.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/reviews'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeReviewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeReviews + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeReviews', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeReviewsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeSearch.php b/src/Endpoint/GetAnimeSearch.php new file mode 100644 index 0000000..cdabc5e --- /dev/null +++ b/src/Endpoint/GetAnimeSearch.php @@ -0,0 +1,105 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/anime'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit', 'q', 'type', 'score', 'min_score', 'max_score', 'status', 'rating', 'sfw', 'genres', 'genres_exclude', 'order_by', 'sort', 'letter', 'producers', 'start_date', 'end_date']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + $optionsResolver->setAllowedTypes('q', ['string']); + $optionsResolver->setAllowedTypes('type', ['string']); + $optionsResolver->setAllowedTypes('score', ['float']); + $optionsResolver->setAllowedTypes('min_score', ['float']); + $optionsResolver->setAllowedTypes('max_score', ['float']); + $optionsResolver->setAllowedTypes('status', ['string']); + $optionsResolver->setAllowedTypes('rating', ['string']); + $optionsResolver->setAllowedTypes('sfw', ['bool']); + $optionsResolver->setAllowedTypes('genres', ['string']); + $optionsResolver->setAllowedTypes('genres_exclude', ['string']); + $optionsResolver->setAllowedTypes('order_by', ['string']); + $optionsResolver->setAllowedTypes('sort', ['string']); + $optionsResolver->setAllowedTypes('letter', ['string']); + $optionsResolver->setAllowedTypes('producers', ['string']); + $optionsResolver->setAllowedTypes('start_date', ['string']); + $optionsResolver->setAllowedTypes('end_date', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeSearchBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeStaff.php b/src/Endpoint/GetAnimeStaff.php new file mode 100644 index 0000000..3c538a1 --- /dev/null +++ b/src/Endpoint/GetAnimeStaff.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/staff'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeStaffBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeStaff + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeStaff', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeStaffBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeStatistics.php b/src/Endpoint/GetAnimeStatistics.php new file mode 100644 index 0000000..d72082b --- /dev/null +++ b/src/Endpoint/GetAnimeStatistics.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/statistics'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeStatisticsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeStatistics + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeStatistics', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeStatisticsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeStreaming.php b/src/Endpoint/GetAnimeStreaming.php new file mode 100644 index 0000000..c28221c --- /dev/null +++ b/src/Endpoint/GetAnimeStreaming.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/streaming'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeStreamingBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ExternalLinks', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeStreamingBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeThemes.php b/src/Endpoint/GetAnimeThemes.php new file mode 100644 index 0000000..b34f05f --- /dev/null +++ b/src/Endpoint/GetAnimeThemes.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/themes'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeThemesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeThemes + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeThemes', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeThemesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeUserUpdates.php b/src/Endpoint/GetAnimeUserUpdates.php new file mode 100644 index 0000000..a65cbf4 --- /dev/null +++ b/src/Endpoint/GetAnimeUserUpdates.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/userupdates'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeUserUpdatesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeUserupdates + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeUserupdates', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeUserUpdatesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeVideos.php b/src/Endpoint/GetAnimeVideos.php new file mode 100644 index 0000000..9f5f808 --- /dev/null +++ b/src/Endpoint/GetAnimeVideos.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/videos'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeVideosBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeVideos + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeVideos', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeVideosBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetAnimeVideosEpisodes.php b/src/Endpoint/GetAnimeVideosEpisodes.php new file mode 100644 index 0000000..b84777e --- /dev/null +++ b/src/Endpoint/GetAnimeVideosEpisodes.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/anime/{id}/videos/episodes'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetAnimeVideosEpisodesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeVideosEpisodes + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeVideosEpisodes', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetAnimeVideosEpisodesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetCharacterAnime.php b/src/Endpoint/GetCharacterAnime.php new file mode 100644 index 0000000..efa8b82 --- /dev/null +++ b/src/Endpoint/GetCharacterAnime.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/characters/{id}/anime'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterAnimeBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharacterAnime + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\CharacterAnime', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetCharacterAnimeBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetCharacterById.php b/src/Endpoint/GetCharacterById.php new file mode 100644 index 0000000..8856987 --- /dev/null +++ b/src/Endpoint/GetCharacterById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/characters/{id}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharactersIdGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\CharactersIdGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetCharacterByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetCharacterFullById.php b/src/Endpoint/GetCharacterFullById.php new file mode 100644 index 0000000..f4f1a98 --- /dev/null +++ b/src/Endpoint/GetCharacterFullById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/characters/{id}/full'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharactersIdFullGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\CharactersIdFullGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetCharacterFullByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetCharacterManga.php b/src/Endpoint/GetCharacterManga.php new file mode 100644 index 0000000..5499317 --- /dev/null +++ b/src/Endpoint/GetCharacterManga.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/characters/{id}/manga'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterMangaBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharacterManga + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\CharacterManga', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetCharacterMangaBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetCharacterPictures.php b/src/Endpoint/GetCharacterPictures.php new file mode 100644 index 0000000..e6dd4d5 --- /dev/null +++ b/src/Endpoint/GetCharacterPictures.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/characters/{id}/pictures'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterPicturesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharacterPictures + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\CharacterPictures', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetCharacterPicturesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetCharacterVoiceActors.php b/src/Endpoint/GetCharacterVoiceActors.php new file mode 100644 index 0000000..6fd56c4 --- /dev/null +++ b/src/Endpoint/GetCharacterVoiceActors.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/characters/{id}/voices'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetCharacterVoiceActorsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharacterVoiceActors + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\CharacterVoiceActors', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetCharacterVoiceActorsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetCharactersSearch.php b/src/Endpoint/GetCharactersSearch.php new file mode 100644 index 0000000..585175f --- /dev/null +++ b/src/Endpoint/GetCharactersSearch.php @@ -0,0 +1,81 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/characters'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit', 'q', 'order_by', 'sort', 'letter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + $optionsResolver->setAllowedTypes('q', ['string']); + $optionsResolver->setAllowedTypes('order_by', ['string']); + $optionsResolver->setAllowedTypes('sort', ['string']); + $optionsResolver->setAllowedTypes('letter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetCharactersSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharactersSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\CharactersSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetCharactersSearchBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetClubMembers.php b/src/Endpoint/GetClubMembers.php new file mode 100644 index 0000000..ca3200a --- /dev/null +++ b/src/Endpoint/GetClubMembers.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/clubs/{id}/members'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetClubMembersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubsIdMembersGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ClubsIdMembersGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetClubMembersBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetClubRelations.php b/src/Endpoint/GetClubRelations.php new file mode 100644 index 0000000..3041aac --- /dev/null +++ b/src/Endpoint/GetClubRelations.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/clubs/{id}/relations'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetClubRelationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubRelations + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ClubRelations', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetClubRelationsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetClubStaff.php b/src/Endpoint/GetClubStaff.php new file mode 100644 index 0000000..1349a90 --- /dev/null +++ b/src/Endpoint/GetClubStaff.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/clubs/{id}/staff'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetClubStaffBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubStaff + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ClubStaff', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetClubStaffBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetClubsById.php b/src/Endpoint/GetClubsById.php new file mode 100644 index 0000000..4c2cdea --- /dev/null +++ b/src/Endpoint/GetClubsById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/clubs/{id}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetClubsByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubsIdGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ClubsIdGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetClubsByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetClubsSearch.php b/src/Endpoint/GetClubsSearch.php new file mode 100644 index 0000000..410eb0c --- /dev/null +++ b/src/Endpoint/GetClubsSearch.php @@ -0,0 +1,85 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/clubs'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit', 'q', 'type', 'category', 'order_by', 'sort', 'letter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + $optionsResolver->setAllowedTypes('q', ['string']); + $optionsResolver->setAllowedTypes('type', ['string']); + $optionsResolver->setAllowedTypes('category', ['string']); + $optionsResolver->setAllowedTypes('order_by', ['string']); + $optionsResolver->setAllowedTypes('sort', ['string']); + $optionsResolver->setAllowedTypes('letter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetClubsSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ClubsSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ClubsSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetClubsSearchBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMagazines.php b/src/Endpoint/GetMagazines.php new file mode 100644 index 0000000..b4b3287 --- /dev/null +++ b/src/Endpoint/GetMagazines.php @@ -0,0 +1,81 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/magazines'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit', 'q', 'order_by', 'sort', 'letter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + $optionsResolver->setAllowedTypes('q', ['string']); + $optionsResolver->setAllowedTypes('order_by', ['string']); + $optionsResolver->setAllowedTypes('sort', ['string']); + $optionsResolver->setAllowedTypes('letter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMagazinesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Magazines + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Magazines', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMagazinesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaById.php b/src/Endpoint/GetMangaById.php new file mode 100644 index 0000000..eba1002 --- /dev/null +++ b/src/Endpoint/GetMangaById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaIdGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaIdGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaCharacters.php b/src/Endpoint/GetMangaCharacters.php new file mode 100644 index 0000000..d5db2ee --- /dev/null +++ b/src/Endpoint/GetMangaCharacters.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/characters'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaCharactersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaCharacters + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaCharacters', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaCharactersBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaExternal.php b/src/Endpoint/GetMangaExternal.php new file mode 100644 index 0000000..a2924fe --- /dev/null +++ b/src/Endpoint/GetMangaExternal.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/external'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaExternalBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ExternalLinks', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaExternalBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaFullById.php b/src/Endpoint/GetMangaFullById.php new file mode 100644 index 0000000..a90ce0d --- /dev/null +++ b/src/Endpoint/GetMangaFullById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/full'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaIdFullGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaIdFullGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaFullByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaGenres.php b/src/Endpoint/GetMangaGenres.php new file mode 100644 index 0000000..1bc6bfd --- /dev/null +++ b/src/Endpoint/GetMangaGenres.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/genres/manga'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('filter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaGenresBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Genres + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Genres', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaGenresBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaMoreInfo.php b/src/Endpoint/GetMangaMoreInfo.php new file mode 100644 index 0000000..707eae6 --- /dev/null +++ b/src/Endpoint/GetMangaMoreInfo.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/moreinfo'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaMoreInfoBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Moreinfo + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Moreinfo', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaMoreInfoBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaNews.php b/src/Endpoint/GetMangaNews.php new file mode 100644 index 0000000..8ebdcdd --- /dev/null +++ b/src/Endpoint/GetMangaNews.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/news'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaNewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaNews + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaNews', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaNewsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaPictures.php b/src/Endpoint/GetMangaPictures.php new file mode 100644 index 0000000..c16bd7f --- /dev/null +++ b/src/Endpoint/GetMangaPictures.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/pictures'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaPicturesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaPictures + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaPictures', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaPicturesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaRecommendations.php b/src/Endpoint/GetMangaRecommendations.php new file mode 100644 index 0000000..0fb454b --- /dev/null +++ b/src/Endpoint/GetMangaRecommendations.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/recommendations'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\EntryRecommendations + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\EntryRecommendations', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaRecommendationsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaRelations.php b/src/Endpoint/GetMangaRelations.php new file mode 100644 index 0000000..ae065c2 --- /dev/null +++ b/src/Endpoint/GetMangaRelations.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/relations'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaRelationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaIdRelationsGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaIdRelationsGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaRelationsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaReviews.php b/src/Endpoint/GetMangaReviews.php new file mode 100644 index 0000000..7a8ed0b --- /dev/null +++ b/src/Endpoint/GetMangaReviews.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/reviews'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaReviewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaReviews + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaReviews', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaReviewsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaSearch.php b/src/Endpoint/GetMangaSearch.php new file mode 100644 index 0000000..105ab51 --- /dev/null +++ b/src/Endpoint/GetMangaSearch.php @@ -0,0 +1,103 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/manga'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit', 'q', 'type', 'score', 'min_score', 'max_score', 'status', 'sfw', 'genres', 'genres_exclude', 'order_by', 'sort', 'letter', 'magazines', 'start_date', 'end_date']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + $optionsResolver->setAllowedTypes('q', ['string']); + $optionsResolver->setAllowedTypes('type', ['string']); + $optionsResolver->setAllowedTypes('score', ['float']); + $optionsResolver->setAllowedTypes('min_score', ['float']); + $optionsResolver->setAllowedTypes('max_score', ['float']); + $optionsResolver->setAllowedTypes('status', ['string']); + $optionsResolver->setAllowedTypes('sfw', ['bool']); + $optionsResolver->setAllowedTypes('genres', ['string']); + $optionsResolver->setAllowedTypes('genres_exclude', ['string']); + $optionsResolver->setAllowedTypes('order_by', ['string']); + $optionsResolver->setAllowedTypes('sort', ['string']); + $optionsResolver->setAllowedTypes('letter', ['string']); + $optionsResolver->setAllowedTypes('magazines', ['string']); + $optionsResolver->setAllowedTypes('start_date', ['string']); + $optionsResolver->setAllowedTypes('end_date', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaSearchBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaStatistics.php b/src/Endpoint/GetMangaStatistics.php new file mode 100644 index 0000000..516c7f3 --- /dev/null +++ b/src/Endpoint/GetMangaStatistics.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/statistics'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaStatisticsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaStatistics + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaStatistics', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaStatisticsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaTopics.php b/src/Endpoint/GetMangaTopics.php new file mode 100644 index 0000000..59eabcd --- /dev/null +++ b/src/Endpoint/GetMangaTopics.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/forum'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('filter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaTopicsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Forum + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Forum', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaTopicsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetMangaUserUpdates.php b/src/Endpoint/GetMangaUserUpdates.php new file mode 100644 index 0000000..004de95 --- /dev/null +++ b/src/Endpoint/GetMangaUserUpdates.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/manga/{id}/userupdates'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetMangaUserUpdatesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaUserupdates + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaUserupdates', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetMangaUserUpdatesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetPeopleSearch.php b/src/Endpoint/GetPeopleSearch.php new file mode 100644 index 0000000..02814fe --- /dev/null +++ b/src/Endpoint/GetPeopleSearch.php @@ -0,0 +1,81 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/people'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit', 'q', 'order_by', 'sort', 'letter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + $optionsResolver->setAllowedTypes('q', ['string']); + $optionsResolver->setAllowedTypes('order_by', ['string']); + $optionsResolver->setAllowedTypes('sort', ['string']); + $optionsResolver->setAllowedTypes('letter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetPeopleSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PeopleSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PeopleSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetPeopleSearchBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetPersonAnime.php b/src/Endpoint/GetPersonAnime.php new file mode 100644 index 0000000..aad6ed2 --- /dev/null +++ b/src/Endpoint/GetPersonAnime.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/people/{id}/anime'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetPersonAnimeBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PersonAnime + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PersonAnime', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetPersonAnimeBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetPersonById.php b/src/Endpoint/GetPersonById.php new file mode 100644 index 0000000..7bab6d0 --- /dev/null +++ b/src/Endpoint/GetPersonById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/people/{id}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetPersonByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PeopleIdGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PeopleIdGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetPersonByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetPersonFullById.php b/src/Endpoint/GetPersonFullById.php new file mode 100644 index 0000000..eb6e1af --- /dev/null +++ b/src/Endpoint/GetPersonFullById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/people/{id}/full'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetPersonFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PeopleIdFullGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PeopleIdFullGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetPersonFullByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetPersonManga.php b/src/Endpoint/GetPersonManga.php new file mode 100644 index 0000000..2cff4c4 --- /dev/null +++ b/src/Endpoint/GetPersonManga.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/people/{id}/manga'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetPersonMangaBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PersonManga + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PersonManga', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetPersonMangaBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetPersonPictures.php b/src/Endpoint/GetPersonPictures.php new file mode 100644 index 0000000..ee370c1 --- /dev/null +++ b/src/Endpoint/GetPersonPictures.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/people/{id}/pictures'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetPersonPicturesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PersonPictures + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PersonPictures', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetPersonPicturesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetPersonVoices.php b/src/Endpoint/GetPersonVoices.php new file mode 100644 index 0000000..86b1211 --- /dev/null +++ b/src/Endpoint/GetPersonVoices.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/people/{id}/voices'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetPersonVoicesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PersonVoiceActingRoles + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PersonVoiceActingRoles', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetPersonVoicesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetProducerById.php b/src/Endpoint/GetProducerById.php new file mode 100644 index 0000000..731a90e --- /dev/null +++ b/src/Endpoint/GetProducerById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/producers/{id}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetProducerByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ProducersIdGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ProducersIdGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetProducerByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetProducerExternal.php b/src/Endpoint/GetProducerExternal.php new file mode 100644 index 0000000..6f412d2 --- /dev/null +++ b/src/Endpoint/GetProducerExternal.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/producers/{id}/external'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetProducerExternalBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ExternalLinks', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetProducerExternalBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetProducerFullById.php b/src/Endpoint/GetProducerFullById.php new file mode 100644 index 0000000..609758d --- /dev/null +++ b/src/Endpoint/GetProducerFullById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/producers/{id}/full'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetProducerFullByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ProducersIdFullGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ProducersIdFullGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetProducerFullByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetProducers.php b/src/Endpoint/GetProducers.php new file mode 100644 index 0000000..a2dbcaa --- /dev/null +++ b/src/Endpoint/GetProducers.php @@ -0,0 +1,81 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/producers'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit', 'q', 'order_by', 'sort', 'letter']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + $optionsResolver->setAllowedTypes('q', ['string']); + $optionsResolver->setAllowedTypes('order_by', ['string']); + $optionsResolver->setAllowedTypes('sort', ['string']); + $optionsResolver->setAllowedTypes('letter', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetProducersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Producers + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Producers', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetProducersBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRandomAnime.php b/src/Endpoint/GetRandomAnime.php new file mode 100644 index 0000000..6da38df --- /dev/null +++ b/src/Endpoint/GetRandomAnime.php @@ -0,0 +1,50 @@ + ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRandomAnimeBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomAnimeGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\RandomAnimeGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRandomAnimeBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRandomCharacters.php b/src/Endpoint/GetRandomCharacters.php new file mode 100644 index 0000000..a09962b --- /dev/null +++ b/src/Endpoint/GetRandomCharacters.php @@ -0,0 +1,50 @@ + ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRandomCharactersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomCharactersGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\RandomCharactersGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRandomCharactersBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRandomManga.php b/src/Endpoint/GetRandomManga.php new file mode 100644 index 0000000..d5ac281 --- /dev/null +++ b/src/Endpoint/GetRandomManga.php @@ -0,0 +1,50 @@ + ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRandomMangaBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomMangaGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\RandomMangaGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRandomMangaBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRandomPeople.php b/src/Endpoint/GetRandomPeople.php new file mode 100644 index 0000000..45412d9 --- /dev/null +++ b/src/Endpoint/GetRandomPeople.php @@ -0,0 +1,50 @@ + ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRandomPeopleBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomPeopleGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\RandomPeopleGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRandomPeopleBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRandomUsers.php b/src/Endpoint/GetRandomUsers.php new file mode 100644 index 0000000..1c954c4 --- /dev/null +++ b/src/Endpoint/GetRandomUsers.php @@ -0,0 +1,50 @@ + ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRandomUsersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\RandomUsersGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\RandomUsersGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRandomUsersBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRecentAnimeRecommendations.php b/src/Endpoint/GetRecentAnimeRecommendations.php new file mode 100644 index 0000000..e4c7a44 --- /dev/null +++ b/src/Endpoint/GetRecentAnimeRecommendations.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/recommendations/anime'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRecentAnimeRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Recommendations + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Recommendations', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRecentAnimeRecommendationsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRecentAnimeReviews.php b/src/Endpoint/GetRecentAnimeReviews.php new file mode 100644 index 0000000..39eba50 --- /dev/null +++ b/src/Endpoint/GetRecentAnimeReviews.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/reviews/anime'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRecentAnimeReviewsBadRequestException + * + * @return null + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return json_decode($body); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRecentAnimeReviewsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRecentMangaRecommendations.php b/src/Endpoint/GetRecentMangaRecommendations.php new file mode 100644 index 0000000..173100e --- /dev/null +++ b/src/Endpoint/GetRecentMangaRecommendations.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/recommendations/manga'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRecentMangaRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Recommendations + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Recommendations', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRecentMangaRecommendationsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetRecentMangaReviews.php b/src/Endpoint/GetRecentMangaReviews.php new file mode 100644 index 0000000..1f9ff29 --- /dev/null +++ b/src/Endpoint/GetRecentMangaReviews.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/reviews/manga'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetRecentMangaReviewsBadRequestException + * + * @return null + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return json_decode($body); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetRecentMangaReviewsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetSchedules.php b/src/Endpoint/GetSchedules.php new file mode 100644 index 0000000..93b18b7 --- /dev/null +++ b/src/Endpoint/GetSchedules.php @@ -0,0 +1,79 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/schedules'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'filter', 'kids', 'sfw', 'limit']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('filter', ['string']); + $optionsResolver->setAllowedTypes('kids', ['string']); + $optionsResolver->setAllowedTypes('sfw', ['string']); + $optionsResolver->setAllowedTypes('limit', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetSchedulesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Schedules + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Schedules', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetSchedulesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetSeason.php b/src/Endpoint/GetSeason.php new file mode 100644 index 0000000..5a4f795 --- /dev/null +++ b/src/Endpoint/GetSeason.php @@ -0,0 +1,78 @@ +year = $year; + $this->season = $season; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{year}', '{season}'], [$this->year, $this->season], '/seasons/{year}/{season}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetSeasonBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetSeasonBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetSeasonNow.php b/src/Endpoint/GetSeasonNow.php new file mode 100644 index 0000000..741322e --- /dev/null +++ b/src/Endpoint/GetSeasonNow.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/seasons/now'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetSeasonNowBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetSeasonNowBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetSeasonUpcoming.php b/src/Endpoint/GetSeasonUpcoming.php new file mode 100644 index 0000000..4c77471 --- /dev/null +++ b/src/Endpoint/GetSeasonUpcoming.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/seasons/upcoming'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetSeasonUpcomingBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetSeasonUpcomingBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetSeasonsList.php b/src/Endpoint/GetSeasonsList.php new file mode 100644 index 0000000..8a34479 --- /dev/null +++ b/src/Endpoint/GetSeasonsList.php @@ -0,0 +1,50 @@ + ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetSeasonsListBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Seasons + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Seasons', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetSeasonsListBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetTopAnime.php b/src/Endpoint/GetTopAnime.php new file mode 100644 index 0000000..cbe7df2 --- /dev/null +++ b/src/Endpoint/GetTopAnime.php @@ -0,0 +1,77 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/top/anime'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['type', 'filter', 'page', 'limit']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('type', ['string']); + $optionsResolver->setAllowedTypes('filter', ['string']); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetTopAnimeBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\AnimeSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\AnimeSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetTopAnimeBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetTopCharacters.php b/src/Endpoint/GetTopCharacters.php new file mode 100644 index 0000000..70e2b19 --- /dev/null +++ b/src/Endpoint/GetTopCharacters.php @@ -0,0 +1,73 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/top/characters'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetTopCharactersBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\CharactersSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\CharactersSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetTopCharactersBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetTopManga.php b/src/Endpoint/GetTopManga.php new file mode 100644 index 0000000..64155f3 --- /dev/null +++ b/src/Endpoint/GetTopManga.php @@ -0,0 +1,77 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/top/manga'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['type', 'filter', 'page', 'limit']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('type', ['string']); + $optionsResolver->setAllowedTypes('filter', ['string']); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetTopMangaBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\MangaSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\MangaSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetTopMangaBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetTopPeople.php b/src/Endpoint/GetTopPeople.php new file mode 100644 index 0000000..fd14fae --- /dev/null +++ b/src/Endpoint/GetTopPeople.php @@ -0,0 +1,73 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/top/people'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetTopPeopleBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\PeopleSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\PeopleSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetTopPeopleBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetTopReviews.php b/src/Endpoint/GetTopReviews.php new file mode 100644 index 0000000..b15a51f --- /dev/null +++ b/src/Endpoint/GetTopReviews.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/top/reviews'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetTopReviewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\TopReviewsGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\TopReviewsGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetTopReviewsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserAbout.php b/src/Endpoint/GetUserAbout.php new file mode 100644 index 0000000..fe481b7 --- /dev/null +++ b/src/Endpoint/GetUserAbout.php @@ -0,0 +1,59 @@ +username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/about'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserAboutBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserAbout + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UserAbout', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserAboutBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserAnimelist.php b/src/Endpoint/GetUserAnimelist.php new file mode 100644 index 0000000..affc9f0 --- /dev/null +++ b/src/Endpoint/GetUserAnimelist.php @@ -0,0 +1,61 @@ +Read more. + * + * @param string $username + */ + public function __construct(string $username) + { + $this->username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/animelist'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserAnimelistBadRequestException + * + * @return null + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return json_decode($body); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserAnimelistBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserById.php b/src/Endpoint/GetUserById.php new file mode 100644 index 0000000..1732c65 --- /dev/null +++ b/src/Endpoint/GetUserById.php @@ -0,0 +1,59 @@ +id = $id; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/users/userbyid/{id}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserByIdBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUserbyidIdGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UsersUserbyidIdGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserByIdBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserClubs.php b/src/Endpoint/GetUserClubs.php new file mode 100644 index 0000000..e8367d1 --- /dev/null +++ b/src/Endpoint/GetUserClubs.php @@ -0,0 +1,75 @@ +username = $username; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/clubs'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserClubsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserClubs + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UserClubs', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserClubsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserExternal.php b/src/Endpoint/GetUserExternal.php new file mode 100644 index 0000000..6a2f41b --- /dev/null +++ b/src/Endpoint/GetUserExternal.php @@ -0,0 +1,59 @@ +username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/external'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserExternalBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\ExternalLinks + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\ExternalLinks', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserExternalBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserFavorites.php b/src/Endpoint/GetUserFavorites.php new file mode 100644 index 0000000..1640a41 --- /dev/null +++ b/src/Endpoint/GetUserFavorites.php @@ -0,0 +1,59 @@ +username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/favorites'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserFavoritesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUsernameFavoritesGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UsersUsernameFavoritesGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserFavoritesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserFriends.php b/src/Endpoint/GetUserFriends.php new file mode 100644 index 0000000..8777cad --- /dev/null +++ b/src/Endpoint/GetUserFriends.php @@ -0,0 +1,75 @@ +username = $username; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/friends'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserFriendsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserFriends + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UserFriends', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserFriendsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserFullProfile.php b/src/Endpoint/GetUserFullProfile.php new file mode 100644 index 0000000..caa610c --- /dev/null +++ b/src/Endpoint/GetUserFullProfile.php @@ -0,0 +1,59 @@ +username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/full'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserFullProfileBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUsernameFullGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UsersUsernameFullGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserFullProfileBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserHistory.php b/src/Endpoint/GetUserHistory.php new file mode 100644 index 0000000..7392bb8 --- /dev/null +++ b/src/Endpoint/GetUserHistory.php @@ -0,0 +1,75 @@ +username = $username; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/history'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['type']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('type', ['string']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserHistoryBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserHistory + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UserHistory', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserHistoryBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserMangaList.php b/src/Endpoint/GetUserMangaList.php new file mode 100644 index 0000000..2d45376 --- /dev/null +++ b/src/Endpoint/GetUserMangaList.php @@ -0,0 +1,61 @@ +Read more. + * + * @param string $username + */ + public function __construct(string $username) + { + $this->username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/mangalist'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserMangaListBadRequestException + * + * @return null + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return json_decode($body); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserMangaListBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserProfile.php b/src/Endpoint/GetUserProfile.php new file mode 100644 index 0000000..c0442d9 --- /dev/null +++ b/src/Endpoint/GetUserProfile.php @@ -0,0 +1,59 @@ +username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserProfileBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUsernameGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UsersUsernameGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserProfileBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserRecommendations.php b/src/Endpoint/GetUserRecommendations.php new file mode 100644 index 0000000..e439b18 --- /dev/null +++ b/src/Endpoint/GetUserRecommendations.php @@ -0,0 +1,75 @@ +username = $username; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/recommendations'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserRecommendationsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\Recommendations + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\Recommendations', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserRecommendationsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserReviews.php b/src/Endpoint/GetUserReviews.php new file mode 100644 index 0000000..c1438d7 --- /dev/null +++ b/src/Endpoint/GetUserReviews.php @@ -0,0 +1,75 @@ +username = $username; + $this->queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/reviews'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserReviewsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersUsernameReviewsGetResponse200 + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UsersUsernameReviewsGetResponse200', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserReviewsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserStatistics.php b/src/Endpoint/GetUserStatistics.php new file mode 100644 index 0000000..d722f75 --- /dev/null +++ b/src/Endpoint/GetUserStatistics.php @@ -0,0 +1,59 @@ +username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/statistics'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserStatisticsBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserStatistics + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UserStatistics', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserStatisticsBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUserUpdates.php b/src/Endpoint/GetUserUpdates.php new file mode 100644 index 0000000..a0cf7f9 --- /dev/null +++ b/src/Endpoint/GetUserUpdates.php @@ -0,0 +1,59 @@ +username = $username; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return str_replace(['{username}'], [$this->username], '/users/{username}/userupdates'); + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUserUpdatesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UserUpdates + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UserUpdates', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUserUpdatesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetUsersSearch.php b/src/Endpoint/GetUsersSearch.php new file mode 100644 index 0000000..bde93d9 --- /dev/null +++ b/src/Endpoint/GetUsersSearch.php @@ -0,0 +1,83 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/users'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['page', 'limit', 'q', 'gender', 'location', 'maxAge', 'minAge']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('page', ['int']); + $optionsResolver->setAllowedTypes('limit', ['int']); + $optionsResolver->setAllowedTypes('q', ['string']); + $optionsResolver->setAllowedTypes('gender', ['string']); + $optionsResolver->setAllowedTypes('location', ['string']); + $optionsResolver->setAllowedTypes('maxAge', ['int']); + $optionsResolver->setAllowedTypes('minAge', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetUsersSearchBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\UsersSearch + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\UsersSearch', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetUsersSearchBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetWatchPopularEpisodes.php b/src/Endpoint/GetWatchPopularEpisodes.php new file mode 100644 index 0000000..0f7acb5 --- /dev/null +++ b/src/Endpoint/GetWatchPopularEpisodes.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/watch/episodes/popular'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['limit']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('limit', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetWatchPopularEpisodesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\WatchEpisodes + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\WatchEpisodes', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetWatchPopularEpisodesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetWatchPopularPromos.php b/src/Endpoint/GetWatchPopularPromos.php new file mode 100644 index 0000000..5b4c3c0 --- /dev/null +++ b/src/Endpoint/GetWatchPopularPromos.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/watch/promos/popular'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['limit']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('limit', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetWatchPopularPromosBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\WatchPromos + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\WatchPromos', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetWatchPopularPromosBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetWatchRecentEpisodes.php b/src/Endpoint/GetWatchRecentEpisodes.php new file mode 100644 index 0000000..44cce98 --- /dev/null +++ b/src/Endpoint/GetWatchRecentEpisodes.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Jikan\JikanPHP\Runtime\Client\EndpointTrait; + + public function getMethod(): string + { + return 'GET'; + } + + public function getUri(): string + { + return '/watch/episodes'; + } + + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['limit']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->setAllowedTypes('limit', ['int']); + + return $optionsResolver; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetWatchRecentEpisodesBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\WatchEpisodes + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\WatchEpisodes', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetWatchRecentEpisodesBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Endpoint/GetWatchRecentPromos.php b/src/Endpoint/GetWatchRecentPromos.php new file mode 100644 index 0000000..aee1978 --- /dev/null +++ b/src/Endpoint/GetWatchRecentPromos.php @@ -0,0 +1,50 @@ + ['application/json']]; + } + + /** + * {@inheritdoc} + * + * @throws \Jikan\JikanPHP\Exception\GetWatchRecentPromosBadRequestException + * + * @return null|\Jikan\JikanPHP\Model\WatchPromos + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (false === is_null($contentType) && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { + return $serializer->deserialize($body, 'Jikan\\JikanPHP\\Model\\WatchPromos', 'json'); + } + if (400 === $status) { + throw new \Jikan\JikanPHP\Exception\GetWatchRecentPromosBadRequestException(); + } + } + + public function getAuthenticationScopes(): array + { + return []; + } +} diff --git a/src/Exception/ApiException.php b/src/Exception/ApiException.php new file mode 100644 index 0000000..e8ca35c --- /dev/null +++ b/src/Exception/ApiException.php @@ -0,0 +1,7 @@ +guzzle = $guzzle ?? new Client(); - $this->serializer = SerializerFactory::create(); - $this->baseUrl = $baseUrl; - } - - /** - * @return string - */ - public function getBaseUrl() : string - { - return $this->baseUrl; - } - - /** - * @param Request\Anime\AnimeRequest $request - * - * @return Model\Anime\Anime - */ - public function getAnime(Request\Anime\AnimeRequest $request): Model\Anime\Anime - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Anime\Anime::class, - 'json' - ); - } - - - /** - * @param Request\Anime\AnimeEpisodesRequest $request - * - * @return Model\Anime\Episodes - */ - public function getAnimeEpisodes(Request\Anime\AnimeEpisodesRequest $request): Model\Anime\Episodes - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Anime\Episodes::class, - 'json' - ); - } - - /** - * @param Request\Anime\AnimeVideosRequest $request - * - * @return Model\Anime\AnimeVideos - */ - public function getAnimeVideos(Request\Anime\AnimeVideosRequest $request): Model\Anime\AnimeVideos - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Anime\AnimeVideos::class, - 'json' - ); - } - - /** - * @param Request\Manga\MangaRequest $request - * - * @return Model\Manga\Manga - */ - public function getManga(Request\Manga\MangaRequest $request): Model\Manga\Manga - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Manga\Manga::class, - 'json' - ); - } - - /** - * @param Request\Character\CharacterRequest $request - * - * @return Model\Character\Character - */ - public function getCharacter(Request\Character\CharacterRequest $request): Model\Character\Character - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Character\Character::class, - 'json' - ); - } - - /** - * @param Request\Person\PersonRequest $request - * - * @return Model\Person\Person - */ - public function getPerson(Request\Person\PersonRequest $request): Model\Person\Person - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Person\Person::class, - 'json' - ); - } - - /** - * @param Request\User\UserProfileRequest $request - * - * @return Model\User\Profile - */ - public function getUserProfile(Request\User\UserProfileRequest $request): Model\User\Profile - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\User\Profile::class, - 'json' - ); - } - - /** - * @param Request\User\UserFriendsRequest $request - * - * @return array - */ - public function getUserFriends(Request\User\UserFriendsRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $friends = json_decode((string)$response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($friends->friends), - sprintf('array<%s>', Model\User\Friend::class), - 'json' - ); - } - - /** - * @param Request\Seasonal\SeasonalRequest $request - * - * @return Model\Seasonal\Seasonal - */ - public function getSeasonal(Request\Seasonal\SeasonalRequest $request): Model\Seasonal\Seasonal - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Seasonal\Seasonal::class, - 'json' - ); - } - - /** - * @param Request\Producer\ProducerRequest $request - * - * @return Model\Producer\Producer - */ - public function getProducer(Request\Producer\ProducerRequest $request): Model\Producer\Producer - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Producer\Producer::class, - 'json' - ); - } - - /** - * @param Request\Magazine\MagazineRequest $request - * - * @return Model\Magazine\Magazine - */ - public function getMagazine(Request\Magazine\MagazineRequest $request): Model\Magazine\Magazine - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Magazine\Magazine::class, - 'json' - ); - } - - /** - * @param Request\Genre\AnimeGenreRequest $request - * - * @return Model\Genre\AnimeGenre - */ - public function getAnimeGenre(Request\Genre\AnimeGenreRequest $request): Model\Genre\AnimeGenre - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Genre\AnimeGenre::class, - 'json' - ); - } - - /** - * @param Request\Genre\MangaGenreRequest $request - * - * @return Model\Genre\MangaGenre - */ - public function getMangaGenre(Request\Genre\MangaGenreRequest $request): Model\Genre\MangaGenre - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Genre\MangaGenre::class, - 'json' - ); - } - - /** - * @param Request\Schedule\ScheduleRequest $request - * - * @return Model\Schedule\Schedule - */ - public function getSchedule(Request\Schedule\ScheduleRequest $request): Model\Schedule\Schedule - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Schedule\Schedule::class, - 'json' - ); - } - - /** - * @param Request\Anime\AnimeCharactersAndStaffRequest $request - * - * @return Model\Anime\AnimeCharactersAndStaff - */ - public function getAnimeCharactersAndStaff( - Request\Anime\AnimeCharactersAndStaffRequest $request - ): Model\Anime\AnimeCharactersAndStaff { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Anime\AnimeCharactersAndStaff::class, - 'json' - ); - } - - /** - * @param Request\Anime\AnimePicturesRequest $request - * - * @return Model\Common\Picture[] - */ - public function getAnimePictures(Request\Anime\AnimePicturesRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->pictures), - sprintf('array<%s>', Model\Common\Picture::class), - 'json' - ); - } - - /** - * @param Request\Manga\MangaPicturesRequest $request - * - * @return Model\Common\Picture[] - * @throws \HttpResponseException - */ - public function getMangaPictures(Request\Manga\MangaPicturesRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->pictures), - sprintf('array<%s>', Model\Common\Picture::class), - 'json' - ); - } - - /** - * @param Request\Character\CharacterPicturesRequest $request - * - * @return Model\Common\Picture[] - */ - public function getCharacterPictures(Request\Character\CharacterPicturesRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->pictures), - sprintf('array<%s>', Model\Common\Picture::class), - 'json' - ); - } - - /** - * @param Request\Person\PersonPicturesRequest $request - * - * @return Model\Common\Picture[] - */ - public function getPersonPictures(Request\Person\PersonPicturesRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->pictures), - sprintf('array<%s>', Model\Common\Picture::class), - 'json' - ); - } - - /** - * @param Request\Search\AnimeSearchRequest $request - * - * @return Model\Search\AnimeSearch - */ - public function getAnimeSearch(Request\Search\AnimeSearchRequest $request): Model\Search\AnimeSearch - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Search\AnimeSearch::class, - 'json' - ); - } - - /** - * @param Request\Search\MangaSearchRequest $request - * - * @return Model\Search\MangaSearch - */ - public function getMangaSearch(Request\Search\MangaSearchRequest $request): Model\Search\MangaSearch - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Search\MangaSearch::class, - 'json' - ); - } - - /** - * @param Request\Search\CharacterSearchRequest $request - * - * @return Model\Search\CharacterSearch - */ - public function getCharacterSearch(Request\Search\CharacterSearchRequest $request): Model\Search\CharacterSearch - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Search\CharacterSearch::class, - 'json' - ); - } - - /** - * @param Request\Search\PersonSearchRequest $request - * - * @return Model\Search\PersonSearch - */ - public function getPersonSearch(Request\Search\PersonSearchRequest $request): Model\Search\PersonSearch - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Search\PersonSearch::class, - 'json' - ); - } - - /** - * @param Request\Manga\MangaCharactersRequest $request - * - * @return Model\Manga\CharacterListItem[] - */ - public function getMangaCharacters(Request\Manga\MangaCharactersRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->characters), - sprintf('array<%s>', Model\Manga\CharacterListItem::class), - 'json' - ); - } - - /** - * @param Request\Top\TopAnimeRequest $request - * - * @return Model\Top\TopAnime[] - */ - public function getTopAnime(Request\Top\TopAnimeRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->top), - sprintf('array<%s>', Model\Top\TopAnime::class), - 'json' - ); - } - - /** - * @param Request\Top\TopMangaRequest $request - * - * @return Model\Top\TopManga[] - */ - public function getTopManga(Request\Top\TopMangaRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->top), - sprintf('array<%s>', Model\Top\TopManga::class), - 'json' - ); - } - - /** - * @param Request\Top\TopCharactersRequest $request - * - * @return Model\Top\TopCharacter[] - */ - public function getTopCharacters(Request\Top\TopCharactersRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->top), - sprintf('array<%s>', Model\Top\TopCharacter::class), - 'json' - ); - } - - /** - * @param Request\Top\TopPeopleRequest $request - * - * @return Model\Top\TopPerson[] - */ - public function getTopPeople(Request\Top\TopPeopleRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->top), - sprintf('array<%s>', Model\Top\TopPerson::class), - 'json' - ); - } - - /** - * @param Request\Anime\AnimeStatsRequest $request - * - * @return Model\Anime\AnimeStats - */ - public function getAnimeStats(Request\Anime\AnimeStatsRequest $request): Model\Anime\AnimeStats - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Anime\AnimeStats::class, - 'json' - ); - } - - /** - * @param Request\Manga\MangaStatsRequest $request - * - * @return Model\Manga\MangaStats - */ - public function getMangaStats(Request\Manga\MangaStatsRequest $request): Model\Manga\MangaStats - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Manga\MangaStats::class, - 'json' - ); - } - - /** - * @param Request\Anime\AnimeForumRequest $request - * - * @return Model\Forum\ForumTopic[] - */ - public function getAnimeForum(Request\Anime\AnimeForumRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->topics), - sprintf('array<%s>', Model\Forum\ForumTopic::class), - 'json' - ); - } - - /** - * @param Request\Manga\MangaForumRequest $request - * - * @return Model\Forum\ForumTopic[] - */ - public function getMangaForum(Request\Manga\MangaForumRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->topics), - sprintf('array<%s>', Model\Forum\ForumTopic::class), - 'json' - ); - } - - /** - * @param Request\Anime\AnimeMoreInfoRequest $request - * - * @return string|null - */ - public function getAnimeMoreInfo(Request\Anime\AnimeMoreInfoRequest $request): ?string - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return json_decode($response->getBody()->getContents())->moreinfo ?? null; - } - - /** - * @param Request\Manga\MangaMoreInfoRequest $request - * - * @return string|null - */ - public function getMangaMoreInfo(Request\Manga\MangaMoreInfoRequest $request): ?string - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return json_decode($response->getBody()->getContents())->moreinfo ?? null; - } - - /** - * @param Request\SeasonList\SeasonListRequest $request - * - * @return Model\SeasonList\SeasonListItem[] - */ - public function getSeasonList(Request\SeasonList\SeasonListRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->archive), - sprintf('array<%s>', Model\SeasonList\SeasonListItem::class), - 'json' - ); - } - - /** - * @param Request\User\UserHistoryRequest $request - * - * @return Model\User\History[] - */ - public function getUserHistory(Request\User\UserHistoryRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->history), - sprintf('array<%s>', Model\User\History::class), - 'json' - ); - } - - /** - * @param Request\User\UserAnimeListRequest $request - * - * @return Model\User\AnimeListItem[] - */ - public function getUserAnimeList(Request\User\UserAnimeListRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->anime), - sprintf('array<%s>', Model\User\AnimeListItem::class), - 'json' - ); - } - - /** - * @param Request\User\UserMangaListRequest $request - * - * @return Model\User\MangaListItem[] - */ - public function getUserMangaList(Request\User\UserMangaListRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->manga), - sprintf('array<%s>', Model\User\MangaListItem::class), - 'json' - ); - } - - /** - * @param Request\Anime\AnimeRecentlyUpdatedByUsersRequest $request - * - * @return Model\User\AnimeListItem[] - */ - public function getAnimeRecentlyUpdatedByUsers(Request\Anime\AnimeRecentlyUpdatedByUsersRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->users), - sprintf('array<%s>', Model\User\AnimeListItem::class), - 'json' - ); - } - - /** - * @param Request\Manga\MangaRecentlyUpdatedByUsersRequest $request - * - * @return Model\User\MangaListItem[] - */ - public function getMangaRecentlyUpdatedByUsers(Request\Manga\MangaRecentlyUpdatedByUsersRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->users), - sprintf('array<%s>', Model\User\MangaListItem::class), - 'json' - ); - } - - /** - * @param Request\Anime\AnimeRecommendationsRequest $request - * - * @return Model\Common\Recommendation[] - */ - public function getAnimeRecommendations(Request\Anime\AnimeRecommendationsRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->recommendations), - sprintf('array<%s>', Model\Common\Recommendation::class), - 'json' - ); - } - - /** - * @param Request\Manga\MangaRecommendationsRequest $request - * - * @return Model\Common\Recommendation[] - */ - public function getMangaRecommendations(Request\Manga\MangaRecommendationsRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->recommendations), - sprintf('array<%s>', Model\Common\Recommendation::class), - 'json' - ); - } - - /** - * @param Request\Club\UserListRequest $request - * - * @return Model\Club\UserProfile[] - */ - public function getClubUsers(Request\Club\UserListRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->members), - sprintf('array<%s>', Model\Club\UserProfile::class), - 'json' - ); - } - - /** - * @param Request\Anime\AnimeReviewsRequest $request - * - * @return Model\Anime\AnimeReview[] - */ - public function getAnimeReviews(Request\Anime\AnimeReviewsRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->reviews), - sprintf('array<%s>', Model\Anime\AnimeReview::class), - 'json' - ); - } - - /** - * @param Request\Manga\MangaReviewsRequest $request - * - * @return Model\Manga\MangaReview[] - */ - public function getMangaReviews(Request\Manga\MangaReviewsRequest $request): array - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - $data = json_decode((string) $response->getBody()->getContents()); - - return $this->serializer->deserialize( - json_encode($data->reviews), - sprintf('array<%s>', Model\Manga\MangaReview::class), - 'json' - ); - } - - /** - * @param Request\Club\ClubRequest $request - * - * @return Model\Club\Club - */ - public function getClub(Request\Club\ClubRequest $request): Model\Club\Club - { - $response = $this->guzzle->get($request->getPath($this->baseUrl)); - - return $this->serializer->deserialize( - (string)$response->getBody()->getContents(), - Model\Club\Club::class, - 'json' - ); - } -} diff --git a/src/Model/Anime.php b/src/Model/Anime.php new file mode 100644 index 0000000..e42d22b --- /dev/null +++ b/src/Model/Anime.php @@ -0,0 +1,1063 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return AnimeImages + */ + public function getImages(): AnimeImages + { + return $this->images; + } + + /** + * @param AnimeImages $images + * + * @return self + */ + public function setImages(AnimeImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Youtube Details. + * + * @return TrailerBase + */ + public function getTrailer(): TrailerBase + { + return $this->trailer; + } + + /** + * Youtube Details. + * + * @param TrailerBase $trailer + * + * @return self + */ + public function setTrailer(TrailerBase $trailer): self + { + $this->trailer = $trailer; + + return $this; + } + + /** + * Whether the entry is pending approval on MAL or not. + * + * @return bool + */ + public function getApproved(): bool + { + return $this->approved; + } + + /** + * Whether the entry is pending approval on MAL or not. + * + * @param bool $approved + * + * @return self + */ + public function setApproved(bool $approved): self + { + $this->approved = $approved; + + return $this; + } + + /** + * All titles. + * + * @return string[] + */ + public function getTitles(): array + { + return $this->titles; + } + + /** + * All titles. + * + * @param string[] $titles + * + * @return self + */ + public function setTitles(array $titles): self + { + $this->titles = $titles; + + return $this; + } + + /** + * Title. + * + * @deprecated + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @deprecated + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * English Title. + * + * @deprecated + * + * @return string|null + */ + public function getTitleEnglish(): ?string + { + return $this->titleEnglish; + } + + /** + * English Title. + * + * @param string|null $titleEnglish + * + * @deprecated + * + * @return self + */ + public function setTitleEnglish(?string $titleEnglish): self + { + $this->titleEnglish = $titleEnglish; + + return $this; + } + + /** + * Japanese Title. + * + * @deprecated + * + * @return string|null + */ + public function getTitleJapanese(): ?string + { + return $this->titleJapanese; + } + + /** + * Japanese Title. + * + * @param string|null $titleJapanese + * + * @deprecated + * + * @return self + */ + public function setTitleJapanese(?string $titleJapanese): self + { + $this->titleJapanese = $titleJapanese; + + return $this; + } + + /** + * Other Titles. + * + * @deprecated + * + * @return string[] + */ + public function getTitleSynonyms(): array + { + return $this->titleSynonyms; + } + + /** + * Other Titles. + * + * @param string[] $titleSynonyms + * + * @deprecated + * + * @return self + */ + public function setTitleSynonyms(array $titleSynonyms): self + { + $this->titleSynonyms = $titleSynonyms; + + return $this; + } + + /** + * Anime Type. + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * Anime Type. + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Original Material/Source adapted from. + * + * @return string|null + */ + public function getSource(): ?string + { + return $this->source; + } + + /** + * Original Material/Source adapted from. + * + * @param string|null $source + * + * @return self + */ + public function setSource(?string $source): self + { + $this->source = $source; + + return $this; + } + + /** + * Episode count. + * + * @return int|null + */ + public function getEpisodes(): ?int + { + return $this->episodes; + } + + /** + * Episode count. + * + * @param int|null $episodes + * + * @return self + */ + public function setEpisodes(?int $episodes): self + { + $this->episodes = $episodes; + + return $this; + } + + /** + * Airing status. + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->status; + } + + /** + * Airing status. + * + * @param string|null $status + * + * @return self + */ + public function setStatus(?string $status): self + { + $this->status = $status; + + return $this; + } + + /** + * Airing boolean. + * + * @return bool + */ + public function getAiring(): bool + { + return $this->airing; + } + + /** + * Airing boolean. + * + * @param bool $airing + * + * @return self + */ + public function setAiring(bool $airing): self + { + $this->airing = $airing; + + return $this; + } + + /** + * Date range. + * + * @return Daterange + */ + public function getAired(): Daterange + { + return $this->aired; + } + + /** + * Date range. + * + * @param Daterange $aired + * + * @return self + */ + public function setAired(Daterange $aired): self + { + $this->aired = $aired; + + return $this; + } + + /** + * Parsed raw duration. + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->duration; + } + + /** + * Parsed raw duration. + * + * @param string|null $duration + * + * @return self + */ + public function setDuration(?string $duration): self + { + $this->duration = $duration; + + return $this; + } + + /** + * Anime audience rating. + * + * @return string|null + */ + public function getRating(): ?string + { + return $this->rating; + } + + /** + * Anime audience rating. + * + * @param string|null $rating + * + * @return self + */ + public function setRating(?string $rating): self + { + $this->rating = $rating; + + return $this; + } + + /** + * Score. + * + * @return float|null + */ + public function getScore(): ?float + { + return $this->score; + } + + /** + * Score. + * + * @param float|null $score + * + * @return self + */ + public function setScore(?float $score): self + { + $this->score = $score; + + return $this; + } + + /** + * Number of users. + * + * @return int|null + */ + public function getScoredBy(): ?int + { + return $this->scoredBy; + } + + /** + * Number of users. + * + * @param int|null $scoredBy + * + * @return self + */ + public function setScoredBy(?int $scoredBy): self + { + $this->scoredBy = $scoredBy; + + return $this; + } + + /** + * Ranking. + * + * @return int|null + */ + public function getRank(): ?int + { + return $this->rank; + } + + /** + * Ranking. + * + * @param int|null $rank + * + * @return self + */ + public function setRank(?int $rank): self + { + $this->rank = $rank; + + return $this; + } + + /** + * Popularity. + * + * @return int|null + */ + public function getPopularity(): ?int + { + return $this->popularity; + } + + /** + * Popularity. + * + * @param int|null $popularity + * + * @return self + */ + public function setPopularity(?int $popularity): self + { + $this->popularity = $popularity; + + return $this; + } + + /** + * Number of users who have added this entry to their list. + * + * @return int|null + */ + public function getMembers(): ?int + { + return $this->members; + } + + /** + * Number of users who have added this entry to their list. + * + * @param int|null $members + * + * @return self + */ + public function setMembers(?int $members): self + { + $this->members = $members; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int|null + */ + public function getFavorites(): ?int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int|null $favorites + * + * @return self + */ + public function setFavorites(?int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Synopsis. + * + * @return string|null + */ + public function getSynopsis(): ?string + { + return $this->synopsis; + } + + /** + * Synopsis. + * + * @param string|null $synopsis + * + * @return self + */ + public function setSynopsis(?string $synopsis): self + { + $this->synopsis = $synopsis; + + return $this; + } + + /** + * Background. + * + * @return string|null + */ + public function getBackground(): ?string + { + return $this->background; + } + + /** + * Background. + * + * @param string|null $background + * + * @return self + */ + public function setBackground(?string $background): self + { + $this->background = $background; + + return $this; + } + + /** + * Season. + * + * @return string|null + */ + public function getSeason(): ?string + { + return $this->season; + } + + /** + * Season. + * + * @param string|null $season + * + * @return self + */ + public function setSeason(?string $season): self + { + $this->season = $season; + + return $this; + } + + /** + * Year. + * + * @return int|null + */ + public function getYear(): ?int + { + return $this->year; + } + + /** + * Year. + * + * @param int|null $year + * + * @return self + */ + public function setYear(?int $year): self + { + $this->year = $year; + + return $this; + } + + /** + * Broadcast Details. + * + * @return Broadcast + */ + public function getBroadcast(): Broadcast + { + return $this->broadcast; + } + + /** + * Broadcast Details. + * + * @param Broadcast $broadcast + * + * @return self + */ + public function setBroadcast(Broadcast $broadcast): self + { + $this->broadcast = $broadcast; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getProducers(): array + { + return $this->producers; + } + + /** + * @param MalUrl[] $producers + * + * @return self + */ + public function setProducers(array $producers): self + { + $this->producers = $producers; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getLicensors(): array + { + return $this->licensors; + } + + /** + * @param MalUrl[] $licensors + * + * @return self + */ + public function setLicensors(array $licensors): self + { + $this->licensors = $licensors; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getStudios(): array + { + return $this->studios; + } + + /** + * @param MalUrl[] $studios + * + * @return self + */ + public function setStudios(array $studios): self + { + $this->studios = $studios; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getGenres(): array + { + return $this->genres; + } + + /** + * @param MalUrl[] $genres + * + * @return self + */ + public function setGenres(array $genres): self + { + $this->genres = $genres; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getExplicitGenres(): array + { + return $this->explicitGenres; + } + + /** + * @param MalUrl[] $explicitGenres + * + * @return self + */ + public function setExplicitGenres(array $explicitGenres): self + { + $this->explicitGenres = $explicitGenres; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getThemes(): array + { + return $this->themes; + } + + /** + * @param MalUrl[] $themes + * + * @return self + */ + public function setThemes(array $themes): self + { + $this->themes = $themes; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getDemographics(): array + { + return $this->demographics; + } + + /** + * @param MalUrl[] $demographics + * + * @return self + */ + public function setDemographics(array $demographics): self + { + $this->demographics = $demographics; + + return $this; + } +} diff --git a/src/Model/AnimeCharacters.php b/src/Model/AnimeCharacters.php new file mode 100644 index 0000000..de6ef45 --- /dev/null +++ b/src/Model/AnimeCharacters.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param AnimeCharactersDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeCharactersDataItem.php b/src/Model/AnimeCharactersDataItem.php new file mode 100644 index 0000000..ac8a4e9 --- /dev/null +++ b/src/Model/AnimeCharactersDataItem.php @@ -0,0 +1,91 @@ +character; + } + + /** + * Character details. + * + * @param AnimeCharactersDataItemCharacter $character + * + * @return self + */ + public function setCharacter(AnimeCharactersDataItemCharacter $character): self + { + $this->character = $character; + + return $this; + } + + /** + * Character's Role. + * + * @return string + */ + public function getRole(): string + { + return $this->role; + } + + /** + * Character's Role. + * + * @param string $role + * + * @return self + */ + public function setRole(string $role): self + { + $this->role = $role; + + return $this; + } + + /** + * @return AnimeCharactersDataItemVoiceActorsItem[] + */ + public function getVoiceActors(): array + { + return $this->voiceActors; + } + + /** + * @param AnimeCharactersDataItemVoiceActorsItem[] $voiceActors + * + * @return self + */ + public function setVoiceActors(array $voiceActors): self + { + $this->voiceActors = $voiceActors; + + return $this; + } +} diff --git a/src/Model/AnimeCharactersDataItemCharacter.php b/src/Model/AnimeCharactersDataItemCharacter.php new file mode 100644 index 0000000..9cbbee0 --- /dev/null +++ b/src/Model/AnimeCharactersDataItemCharacter.php @@ -0,0 +1,121 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return CharacterImages + */ + public function getImages(): CharacterImages + { + return $this->images; + } + + /** + * @param CharacterImages $images + * + * @return self + */ + public function setImages(CharacterImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Character Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Character Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } +} diff --git a/src/Model/AnimeCharactersDataItemVoiceActorsItem.php b/src/Model/AnimeCharactersDataItemVoiceActorsItem.php new file mode 100644 index 0000000..017d3ec --- /dev/null +++ b/src/Model/AnimeCharactersDataItemVoiceActorsItem.php @@ -0,0 +1,55 @@ +person; + } + + /** + * @param AnimeCharactersDataItemVoiceActorsItemPerson $person + * + * @return self + */ + public function setPerson(AnimeCharactersDataItemVoiceActorsItemPerson $person): self + { + $this->person = $person; + + return $this; + } + + /** + * @return string + */ + public function getLanguage(): string + { + return $this->language; + } + + /** + * @param string $language + * + * @return self + */ + public function setLanguage(string $language): self + { + $this->language = $language; + + return $this; + } +} diff --git a/src/Model/AnimeCharactersDataItemVoiceActorsItemPerson.php b/src/Model/AnimeCharactersDataItemVoiceActorsItemPerson.php new file mode 100644 index 0000000..7b60388 --- /dev/null +++ b/src/Model/AnimeCharactersDataItemVoiceActorsItemPerson.php @@ -0,0 +1,103 @@ +malId; + } + + /** + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return PeopleImages + */ + public function getImages(): PeopleImages + { + return $this->images; + } + + /** + * @param PeopleImages $images + * + * @return self + */ + public function setImages(PeopleImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } +} diff --git a/src/Model/AnimeEpisode.php b/src/Model/AnimeEpisode.php new file mode 100644 index 0000000..3896945 --- /dev/null +++ b/src/Model/AnimeEpisode.php @@ -0,0 +1,307 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * Title Japanese. + * + * @return string|null + */ + public function getTitleJapanese(): ?string + { + return $this->titleJapanese; + } + + /** + * Title Japanese. + * + * @param string|null $titleJapanese + * + * @return self + */ + public function setTitleJapanese(?string $titleJapanese): self + { + $this->titleJapanese = $titleJapanese; + + return $this; + } + + /** + * title_romanji. + * + * @return string|null + */ + public function getTitleRomanji(): ?string + { + return $this->titleRomanji; + } + + /** + * title_romanji. + * + * @param string|null $titleRomanji + * + * @return self + */ + public function setTitleRomanji(?string $titleRomanji): self + { + $this->titleRomanji = $titleRomanji; + + return $this; + } + + /** + * Episode duration in seconds. + * + * @return int|null + */ + public function getDuration(): ?int + { + return $this->duration; + } + + /** + * Episode duration in seconds. + * + * @param int|null $duration + * + * @return self + */ + public function setDuration(?int $duration): self + { + $this->duration = $duration; + + return $this; + } + + /** + * Aired Date ISO8601. + * + * @return string|null + */ + public function getAired(): ?string + { + return $this->aired; + } + + /** + * Aired Date ISO8601. + * + * @param string|null $aired + * + * @return self + */ + public function setAired(?string $aired): self + { + $this->aired = $aired; + + return $this; + } + + /** + * Filler episode. + * + * @return bool + */ + public function getFiller(): bool + { + return $this->filler; + } + + /** + * Filler episode. + * + * @param bool $filler + * + * @return self + */ + public function setFiller(bool $filler): self + { + $this->filler = $filler; + + return $this; + } + + /** + * Recap episode. + * + * @return bool + */ + public function getRecap(): bool + { + return $this->recap; + } + + /** + * Recap episode. + * + * @param bool $recap + * + * @return self + */ + public function setRecap(bool $recap): self + { + $this->recap = $recap; + + return $this; + } + + /** + * Episode Synopsis. + * + * @return string|null + */ + public function getSynopsis(): ?string + { + return $this->synopsis; + } + + /** + * Episode Synopsis. + * + * @param string|null $synopsis + * + * @return self + */ + public function setSynopsis(?string $synopsis): self + { + $this->synopsis = $synopsis; + + return $this; + } +} diff --git a/src/Model/AnimeEpisodes.php b/src/Model/AnimeEpisodes.php new file mode 100644 index 0000000..774d8c8 --- /dev/null +++ b/src/Model/AnimeEpisodes.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param AnimeEpisodesdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/AnimeEpisodesdataItem.php b/src/Model/AnimeEpisodesdataItem.php new file mode 100644 index 0000000..b7ea9da --- /dev/null +++ b/src/Model/AnimeEpisodesdataItem.php @@ -0,0 +1,307 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * Title Japanese. + * + * @return string|null + */ + public function getTitleJapanese(): ?string + { + return $this->titleJapanese; + } + + /** + * Title Japanese. + * + * @param string|null $titleJapanese + * + * @return self + */ + public function setTitleJapanese(?string $titleJapanese): self + { + $this->titleJapanese = $titleJapanese; + + return $this; + } + + /** + * title_romanji. + * + * @return string|null + */ + public function getTitleRomanji(): ?string + { + return $this->titleRomanji; + } + + /** + * title_romanji. + * + * @param string|null $titleRomanji + * + * @return self + */ + public function setTitleRomanji(?string $titleRomanji): self + { + $this->titleRomanji = $titleRomanji; + + return $this; + } + + /** + * Episode duration in seconds. + * + * @return int|null + */ + public function getDuration(): ?int + { + return $this->duration; + } + + /** + * Episode duration in seconds. + * + * @param int|null $duration + * + * @return self + */ + public function setDuration(?int $duration): self + { + $this->duration = $duration; + + return $this; + } + + /** + * Aired Date ISO8601. + * + * @return string|null + */ + public function getAired(): ?string + { + return $this->aired; + } + + /** + * Aired Date ISO8601. + * + * @param string|null $aired + * + * @return self + */ + public function setAired(?string $aired): self + { + $this->aired = $aired; + + return $this; + } + + /** + * Filler episode. + * + * @return bool + */ + public function getFiller(): bool + { + return $this->filler; + } + + /** + * Filler episode. + * + * @param bool $filler + * + * @return self + */ + public function setFiller(bool $filler): self + { + $this->filler = $filler; + + return $this; + } + + /** + * Recap episode. + * + * @return bool + */ + public function getRecap(): bool + { + return $this->recap; + } + + /** + * Recap episode. + * + * @param bool $recap + * + * @return self + */ + public function setRecap(bool $recap): self + { + $this->recap = $recap; + + return $this; + } + + /** + * Episode discussion forum URL. + * + * @return string|null + */ + public function getForumUrl(): ?string + { + return $this->forumUrl; + } + + /** + * Episode discussion forum URL. + * + * @param string|null $forumUrl + * + * @return self + */ + public function setForumUrl(?string $forumUrl): self + { + $this->forumUrl = $forumUrl; + + return $this; + } +} diff --git a/src/Model/AnimeFull.php b/src/Model/AnimeFull.php new file mode 100644 index 0000000..02bd83e --- /dev/null +++ b/src/Model/AnimeFull.php @@ -0,0 +1,1159 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return AnimeImages + */ + public function getImages(): AnimeImages + { + return $this->images; + } + + /** + * @param AnimeImages $images + * + * @return self + */ + public function setImages(AnimeImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Youtube Details. + * + * @return TrailerBase + */ + public function getTrailer(): TrailerBase + { + return $this->trailer; + } + + /** + * Youtube Details. + * + * @param TrailerBase $trailer + * + * @return self + */ + public function setTrailer(TrailerBase $trailer): self + { + $this->trailer = $trailer; + + return $this; + } + + /** + * Whether the entry is pending approval on MAL or not. + * + * @return bool + */ + public function getApproved(): bool + { + return $this->approved; + } + + /** + * Whether the entry is pending approval on MAL or not. + * + * @param bool $approved + * + * @return self + */ + public function setApproved(bool $approved): self + { + $this->approved = $approved; + + return $this; + } + + /** + * All titles. + * + * @return string[] + */ + public function getTitles(): array + { + return $this->titles; + } + + /** + * All titles. + * + * @param string[] $titles + * + * @return self + */ + public function setTitles(array $titles): self + { + $this->titles = $titles; + + return $this; + } + + /** + * Title. + * + * @deprecated + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @deprecated + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * English Title. + * + * @deprecated + * + * @return string|null + */ + public function getTitleEnglish(): ?string + { + return $this->titleEnglish; + } + + /** + * English Title. + * + * @param string|null $titleEnglish + * + * @deprecated + * + * @return self + */ + public function setTitleEnglish(?string $titleEnglish): self + { + $this->titleEnglish = $titleEnglish; + + return $this; + } + + /** + * Japanese Title. + * + * @deprecated + * + * @return string|null + */ + public function getTitleJapanese(): ?string + { + return $this->titleJapanese; + } + + /** + * Japanese Title. + * + * @param string|null $titleJapanese + * + * @deprecated + * + * @return self + */ + public function setTitleJapanese(?string $titleJapanese): self + { + $this->titleJapanese = $titleJapanese; + + return $this; + } + + /** + * Other Titles. + * + * @deprecated + * + * @return string[] + */ + public function getTitleSynonyms(): array + { + return $this->titleSynonyms; + } + + /** + * Other Titles. + * + * @param string[] $titleSynonyms + * + * @deprecated + * + * @return self + */ + public function setTitleSynonyms(array $titleSynonyms): self + { + $this->titleSynonyms = $titleSynonyms; + + return $this; + } + + /** + * Anime Type. + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * Anime Type. + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Original Material/Source adapted from. + * + * @return string|null + */ + public function getSource(): ?string + { + return $this->source; + } + + /** + * Original Material/Source adapted from. + * + * @param string|null $source + * + * @return self + */ + public function setSource(?string $source): self + { + $this->source = $source; + + return $this; + } + + /** + * Episode count. + * + * @return int|null + */ + public function getEpisodes(): ?int + { + return $this->episodes; + } + + /** + * Episode count. + * + * @param int|null $episodes + * + * @return self + */ + public function setEpisodes(?int $episodes): self + { + $this->episodes = $episodes; + + return $this; + } + + /** + * Airing status. + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->status; + } + + /** + * Airing status. + * + * @param string|null $status + * + * @return self + */ + public function setStatus(?string $status): self + { + $this->status = $status; + + return $this; + } + + /** + * Airing boolean. + * + * @return bool + */ + public function getAiring(): bool + { + return $this->airing; + } + + /** + * Airing boolean. + * + * @param bool $airing + * + * @return self + */ + public function setAiring(bool $airing): self + { + $this->airing = $airing; + + return $this; + } + + /** + * Date range. + * + * @return Daterange + */ + public function getAired(): Daterange + { + return $this->aired; + } + + /** + * Date range. + * + * @param Daterange $aired + * + * @return self + */ + public function setAired(Daterange $aired): self + { + $this->aired = $aired; + + return $this; + } + + /** + * Parsed raw duration. + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->duration; + } + + /** + * Parsed raw duration. + * + * @param string|null $duration + * + * @return self + */ + public function setDuration(?string $duration): self + { + $this->duration = $duration; + + return $this; + } + + /** + * Anime audience rating. + * + * @return string|null + */ + public function getRating(): ?string + { + return $this->rating; + } + + /** + * Anime audience rating. + * + * @param string|null $rating + * + * @return self + */ + public function setRating(?string $rating): self + { + $this->rating = $rating; + + return $this; + } + + /** + * Score. + * + * @return float|null + */ + public function getScore(): ?float + { + return $this->score; + } + + /** + * Score. + * + * @param float|null $score + * + * @return self + */ + public function setScore(?float $score): self + { + $this->score = $score; + + return $this; + } + + /** + * Number of users. + * + * @return int|null + */ + public function getScoredBy(): ?int + { + return $this->scoredBy; + } + + /** + * Number of users. + * + * @param int|null $scoredBy + * + * @return self + */ + public function setScoredBy(?int $scoredBy): self + { + $this->scoredBy = $scoredBy; + + return $this; + } + + /** + * Ranking. + * + * @return int|null + */ + public function getRank(): ?int + { + return $this->rank; + } + + /** + * Ranking. + * + * @param int|null $rank + * + * @return self + */ + public function setRank(?int $rank): self + { + $this->rank = $rank; + + return $this; + } + + /** + * Popularity. + * + * @return int|null + */ + public function getPopularity(): ?int + { + return $this->popularity; + } + + /** + * Popularity. + * + * @param int|null $popularity + * + * @return self + */ + public function setPopularity(?int $popularity): self + { + $this->popularity = $popularity; + + return $this; + } + + /** + * Number of users who have added this entry to their list. + * + * @return int|null + */ + public function getMembers(): ?int + { + return $this->members; + } + + /** + * Number of users who have added this entry to their list. + * + * @param int|null $members + * + * @return self + */ + public function setMembers(?int $members): self + { + $this->members = $members; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int|null + */ + public function getFavorites(): ?int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int|null $favorites + * + * @return self + */ + public function setFavorites(?int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Synopsis. + * + * @return string|null + */ + public function getSynopsis(): ?string + { + return $this->synopsis; + } + + /** + * Synopsis. + * + * @param string|null $synopsis + * + * @return self + */ + public function setSynopsis(?string $synopsis): self + { + $this->synopsis = $synopsis; + + return $this; + } + + /** + * Background. + * + * @return string|null + */ + public function getBackground(): ?string + { + return $this->background; + } + + /** + * Background. + * + * @param string|null $background + * + * @return self + */ + public function setBackground(?string $background): self + { + $this->background = $background; + + return $this; + } + + /** + * Season. + * + * @return string|null + */ + public function getSeason(): ?string + { + return $this->season; + } + + /** + * Season. + * + * @param string|null $season + * + * @return self + */ + public function setSeason(?string $season): self + { + $this->season = $season; + + return $this; + } + + /** + * Year. + * + * @return int|null + */ + public function getYear(): ?int + { + return $this->year; + } + + /** + * Year. + * + * @param int|null $year + * + * @return self + */ + public function setYear(?int $year): self + { + $this->year = $year; + + return $this; + } + + /** + * Broadcast Details. + * + * @return Broadcast + */ + public function getBroadcast(): Broadcast + { + return $this->broadcast; + } + + /** + * Broadcast Details. + * + * @param Broadcast $broadcast + * + * @return self + */ + public function setBroadcast(Broadcast $broadcast): self + { + $this->broadcast = $broadcast; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getProducers(): array + { + return $this->producers; + } + + /** + * @param MalUrl[] $producers + * + * @return self + */ + public function setProducers(array $producers): self + { + $this->producers = $producers; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getLicensors(): array + { + return $this->licensors; + } + + /** + * @param MalUrl[] $licensors + * + * @return self + */ + public function setLicensors(array $licensors): self + { + $this->licensors = $licensors; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getStudios(): array + { + return $this->studios; + } + + /** + * @param MalUrl[] $studios + * + * @return self + */ + public function setStudios(array $studios): self + { + $this->studios = $studios; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getGenres(): array + { + return $this->genres; + } + + /** + * @param MalUrl[] $genres + * + * @return self + */ + public function setGenres(array $genres): self + { + $this->genres = $genres; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getExplicitGenres(): array + { + return $this->explicitGenres; + } + + /** + * @param MalUrl[] $explicitGenres + * + * @return self + */ + public function setExplicitGenres(array $explicitGenres): self + { + $this->explicitGenres = $explicitGenres; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getThemes(): array + { + return $this->themes; + } + + /** + * @param MalUrl[] $themes + * + * @return self + */ + public function setThemes(array $themes): self + { + $this->themes = $themes; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getDemographics(): array + { + return $this->demographics; + } + + /** + * @param MalUrl[] $demographics + * + * @return self + */ + public function setDemographics(array $demographics): self + { + $this->demographics = $demographics; + + return $this; + } + + /** + * @return AnimeFullRelationsItem[] + */ + public function getRelations(): array + { + return $this->relations; + } + + /** + * @param AnimeFullRelationsItem[] $relations + * + * @return self + */ + public function setRelations(array $relations): self + { + $this->relations = $relations; + + return $this; + } + + /** + * @return AnimeFullTheme + */ + public function getTheme(): AnimeFullTheme + { + return $this->theme; + } + + /** + * @param AnimeFullTheme $theme + * + * @return self + */ + public function setTheme(AnimeFullTheme $theme): self + { + $this->theme = $theme; + + return $this; + } + + /** + * @return AnimeFullExternalItem[] + */ + public function getExternal(): array + { + return $this->external; + } + + /** + * @param AnimeFullExternalItem[] $external + * + * @return self + */ + public function setExternal(array $external): self + { + $this->external = $external; + + return $this; + } + + /** + * @return AnimeFullStreamingItem[] + */ + public function getStreaming(): array + { + return $this->streaming; + } + + /** + * @param AnimeFullStreamingItem[] $streaming + * + * @return self + */ + public function setStreaming(array $streaming): self + { + $this->streaming = $streaming; + + return $this; + } +} diff --git a/src/Model/AnimeFullExternalItem.php b/src/Model/AnimeFullExternalItem.php new file mode 100644 index 0000000..fed0040 --- /dev/null +++ b/src/Model/AnimeFullExternalItem.php @@ -0,0 +1,55 @@ +name; + } + + /** + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/AnimeFullRelationsItem.php b/src/Model/AnimeFullRelationsItem.php new file mode 100644 index 0000000..574e3b5 --- /dev/null +++ b/src/Model/AnimeFullRelationsItem.php @@ -0,0 +1,61 @@ +relation; + } + + /** + * Relation type. + * + * @param string $relation + * + * @return self + */ + public function setRelation(string $relation): self + { + $this->relation = $relation; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getEntry(): array + { + return $this->entry; + } + + /** + * @param MalUrl[] $entry + * + * @return self + */ + public function setEntry(array $entry): self + { + $this->entry = $entry; + + return $this; + } +} diff --git a/src/Model/AnimeFullStreamingItem.php b/src/Model/AnimeFullStreamingItem.php new file mode 100644 index 0000000..b8da174 --- /dev/null +++ b/src/Model/AnimeFullStreamingItem.php @@ -0,0 +1,55 @@ +name; + } + + /** + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/AnimeFullTheme.php b/src/Model/AnimeFullTheme.php new file mode 100644 index 0000000..f26ead0 --- /dev/null +++ b/src/Model/AnimeFullTheme.php @@ -0,0 +1,55 @@ +openings; + } + + /** + * @param string[] $openings + * + * @return self + */ + public function setOpenings(array $openings): self + { + $this->openings = $openings; + + return $this; + } + + /** + * @return string[] + */ + public function getEndings(): array + { + return $this->endings; + } + + /** + * @param string[] $endings + * + * @return self + */ + public function setEndings(array $endings): self + { + $this->endings = $endings; + + return $this; + } +} diff --git a/src/Model/AnimeIdEpisodesEpisodeGetResponse200.php b/src/Model/AnimeIdEpisodesEpisodeGetResponse200.php new file mode 100644 index 0000000..efce7bf --- /dev/null +++ b/src/Model/AnimeIdEpisodesEpisodeGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Anime Episode Resource. + * + * @param AnimeEpisode $data + * + * @return self + */ + public function setData(AnimeEpisode $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeIdFullGetResponse200.php b/src/Model/AnimeIdFullGetResponse200.php new file mode 100644 index 0000000..3464ff7 --- /dev/null +++ b/src/Model/AnimeIdFullGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Full anime Resource. + * + * @param AnimeFull $data + * + * @return self + */ + public function setData(AnimeFull $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeIdGetResponse200.php b/src/Model/AnimeIdGetResponse200.php new file mode 100644 index 0000000..6c96aa1 --- /dev/null +++ b/src/Model/AnimeIdGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Anime Resource. + * + * @param Anime $data + * + * @return self + */ + public function setData(Anime $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeIdRelationsGetResponse200.php b/src/Model/AnimeIdRelationsGetResponse200.php new file mode 100644 index 0000000..26383a4 --- /dev/null +++ b/src/Model/AnimeIdRelationsGetResponse200.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param Relation[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeImages.php b/src/Model/AnimeImages.php new file mode 100644 index 0000000..4b5848c --- /dev/null +++ b/src/Model/AnimeImages.php @@ -0,0 +1,67 @@ +jpg; + } + + /** + * Available images in JPG. + * + * @param AnimeImagesJpg $jpg + * + * @return self + */ + public function setJpg(AnimeImagesJpg $jpg): self + { + $this->jpg = $jpg; + + return $this; + } + + /** + * Available images in WEBP. + * + * @return AnimeImagesWebp + */ + public function getWebp(): AnimeImagesWebp + { + return $this->webp; + } + + /** + * Available images in WEBP. + * + * @param AnimeImagesWebp $webp + * + * @return self + */ + public function setWebp(AnimeImagesWebp $webp): self + { + $this->webp = $webp; + + return $this; + } +} diff --git a/src/Model/AnimeImagesJpg.php b/src/Model/AnimeImagesJpg.php new file mode 100644 index 0000000..ba30891 --- /dev/null +++ b/src/Model/AnimeImagesJpg.php @@ -0,0 +1,97 @@ +imageUrl; + } + + /** + * Image URL JPG. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Small Image URL JPG. + * + * @return string|null + */ + public function getSmallImageUrl(): ?string + { + return $this->smallImageUrl; + } + + /** + * Small Image URL JPG. + * + * @param string|null $smallImageUrl + * + * @return self + */ + public function setSmallImageUrl(?string $smallImageUrl): self + { + $this->smallImageUrl = $smallImageUrl; + + return $this; + } + + /** + * Image URL JPG. + * + * @return string|null + */ + public function getLargeImageUrl(): ?string + { + return $this->largeImageUrl; + } + + /** + * Image URL JPG. + * + * @param string|null $largeImageUrl + * + * @return self + */ + public function setLargeImageUrl(?string $largeImageUrl): self + { + $this->largeImageUrl = $largeImageUrl; + + return $this; + } +} diff --git a/src/Model/AnimeImagesWebp.php b/src/Model/AnimeImagesWebp.php new file mode 100644 index 0000000..f6486e4 --- /dev/null +++ b/src/Model/AnimeImagesWebp.php @@ -0,0 +1,97 @@ +imageUrl; + } + + /** + * Image URL WEBP. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Small Image URL WEBP. + * + * @return string|null + */ + public function getSmallImageUrl(): ?string + { + return $this->smallImageUrl; + } + + /** + * Small Image URL WEBP. + * + * @param string|null $smallImageUrl + * + * @return self + */ + public function setSmallImageUrl(?string $smallImageUrl): self + { + $this->smallImageUrl = $smallImageUrl; + + return $this; + } + + /** + * Image URL WEBP. + * + * @return string|null + */ + public function getLargeImageUrl(): ?string + { + return $this->largeImageUrl; + } + + /** + * Image URL WEBP. + * + * @param string|null $largeImageUrl + * + * @return self + */ + public function setLargeImageUrl(?string $largeImageUrl): self + { + $this->largeImageUrl = $largeImageUrl; + + return $this; + } +} diff --git a/src/Model/AnimeMeta.php b/src/Model/AnimeMeta.php new file mode 100644 index 0000000..40428da --- /dev/null +++ b/src/Model/AnimeMeta.php @@ -0,0 +1,121 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return AnimeImages + */ + public function getImages(): AnimeImages + { + return $this->images; + } + + /** + * @param AnimeImages $images + * + * @return self + */ + public function setImages(AnimeImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Entry title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Entry title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } +} diff --git a/src/Model/AnimeNews.php b/src/Model/AnimeNews.php new file mode 100644 index 0000000..8eef40e --- /dev/null +++ b/src/Model/AnimeNews.php @@ -0,0 +1,55 @@ +pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } + + /** + * @return NewsDataItem[] + */ + public function getData(): array + { + return $this->data; + } + + /** + * @param NewsDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeRelations.php b/src/Model/AnimeRelations.php new file mode 100644 index 0000000..2f0fdcb --- /dev/null +++ b/src/Model/AnimeRelations.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param AnimeRelationsDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeRelationsDataItem.php b/src/Model/AnimeRelationsDataItem.php new file mode 100644 index 0000000..9003afe --- /dev/null +++ b/src/Model/AnimeRelationsDataItem.php @@ -0,0 +1,61 @@ +relation; + } + + /** + * Relation type. + * + * @param string $relation + * + * @return self + */ + public function setRelation(string $relation): self + { + $this->relation = $relation; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getEntry(): array + { + return $this->entry; + } + + /** + * @param MalUrl[] $entry + * + * @return self + */ + public function setEntry(array $entry): self + { + $this->entry = $entry; + + return $this; + } +} diff --git a/src/Model/AnimeReview.php b/src/Model/AnimeReview.php new file mode 100644 index 0000000..cda5806 --- /dev/null +++ b/src/Model/AnimeReview.php @@ -0,0 +1,247 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Entry Type. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Entry Type. + * + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Number of user votes on the Review. + * + * @return int + */ + public function getVotes(): int + { + return $this->votes; + } + + /** + * Number of user votes on the Review. + * + * @param int $votes + * + * @return self + */ + public function setVotes(int $votes): self + { + $this->votes = $votes; + + return $this; + } + + /** + * Review created date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Review created date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } + + /** + * Review content. + * + * @return string + */ + public function getReview(): string + { + return $this->review; + } + + /** + * Review content. + * + * @param string $review + * + * @return self + */ + public function setReview(string $review): self + { + $this->review = $review; + + return $this; + } + + /** + * Number of episodes watched. + * + * @return int + */ + public function getEpisodesWatched(): int + { + return $this->episodesWatched; + } + + /** + * Number of episodes watched. + * + * @param int $episodesWatched + * + * @return self + */ + public function setEpisodesWatched(int $episodesWatched): self + { + $this->episodesWatched = $episodesWatched; + + return $this; + } + + /** + * Review Scores breakdown. + * + * @return AnimeReviewScores + */ + public function getScores(): AnimeReviewScores + { + return $this->scores; + } + + /** + * Review Scores breakdown. + * + * @param AnimeReviewScores $scores + * + * @return self + */ + public function setScores(AnimeReviewScores $scores): self + { + $this->scores = $scores; + + return $this; + } +} diff --git a/src/Model/AnimeReviewScores.php b/src/Model/AnimeReviewScores.php new file mode 100644 index 0000000..dd5fa73 --- /dev/null +++ b/src/Model/AnimeReviewScores.php @@ -0,0 +1,187 @@ +overall; + } + + /** + * Overall Score. + * + * @param int $overall + * + * @return self + */ + public function setOverall(int $overall): self + { + $this->overall = $overall; + + return $this; + } + + /** + * Story Score. + * + * @return int + */ + public function getStory(): int + { + return $this->story; + } + + /** + * Story Score. + * + * @param int $story + * + * @return self + */ + public function setStory(int $story): self + { + $this->story = $story; + + return $this; + } + + /** + * Animation Score. + * + * @return int + */ + public function getAnimation(): int + { + return $this->animation; + } + + /** + * Animation Score. + * + * @param int $animation + * + * @return self + */ + public function setAnimation(int $animation): self + { + $this->animation = $animation; + + return $this; + } + + /** + * Sound Score. + * + * @return int + */ + public function getSound(): int + { + return $this->sound; + } + + /** + * Sound Score. + * + * @param int $sound + * + * @return self + */ + public function setSound(int $sound): self + { + $this->sound = $sound; + + return $this; + } + + /** + * Character Score. + * + * @return int + */ + public function getCharacter(): int + { + return $this->character; + } + + /** + * Character Score. + * + * @param int $character + * + * @return self + */ + public function setCharacter(int $character): self + { + $this->character = $character; + + return $this; + } + + /** + * Enjoyment Score. + * + * @return int + */ + public function getEnjoyment(): int + { + return $this->enjoyment; + } + + /** + * Enjoyment Score. + * + * @param int $enjoyment + * + * @return self + */ + public function setEnjoyment(int $enjoyment): self + { + $this->enjoyment = $enjoyment; + + return $this; + } +} diff --git a/src/Model/AnimeReviews.php b/src/Model/AnimeReviews.php new file mode 100644 index 0000000..9f17566 --- /dev/null +++ b/src/Model/AnimeReviews.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param AnimeReviewsdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/AnimeReviewsdataItem.php b/src/Model/AnimeReviewsdataItem.php new file mode 100644 index 0000000..ce52fc7 --- /dev/null +++ b/src/Model/AnimeReviewsdataItem.php @@ -0,0 +1,271 @@ +user; + } + + /** + * @param UserMeta $user + * + * @return self + */ + public function setUser(UserMeta $user): self + { + $this->user = $user; + + return $this; + } + + /** + * MyAnimeList ID. + * + * @return int + */ + public function getMalId(): int + { + return $this->malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Entry Type. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Entry Type. + * + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Number of user votes on the Review. + * + * @return int + */ + public function getVotes(): int + { + return $this->votes; + } + + /** + * Number of user votes on the Review. + * + * @param int $votes + * + * @return self + */ + public function setVotes(int $votes): self + { + $this->votes = $votes; + + return $this; + } + + /** + * Review created date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Review created date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } + + /** + * Review content. + * + * @return string + */ + public function getReview(): string + { + return $this->review; + } + + /** + * Review content. + * + * @param string $review + * + * @return self + */ + public function setReview(string $review): self + { + $this->review = $review; + + return $this; + } + + /** + * Number of episodes watched. + * + * @return int + */ + public function getEpisodesWatched(): int + { + return $this->episodesWatched; + } + + /** + * Number of episodes watched. + * + * @param int $episodesWatched + * + * @return self + */ + public function setEpisodesWatched(int $episodesWatched): self + { + $this->episodesWatched = $episodesWatched; + + return $this; + } + + /** + * Review Scores breakdown. + * + * @return AnimeReviewScores + */ + public function getScores(): AnimeReviewScores + { + return $this->scores; + } + + /** + * Review Scores breakdown. + * + * @param AnimeReviewScores $scores + * + * @return self + */ + public function setScores(AnimeReviewScores $scores): self + { + $this->scores = $scores; + + return $this; + } +} diff --git a/src/Model/AnimeSearch.php b/src/Model/AnimeSearch.php new file mode 100644 index 0000000..69b8672 --- /dev/null +++ b/src/Model/AnimeSearch.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param Anime[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPlusPagination + */ + public function getPagination(): PaginationPlusPagination + { + return $this->pagination; + } + + /** + * @param PaginationPlusPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPlusPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/AnimeStaff.php b/src/Model/AnimeStaff.php new file mode 100644 index 0000000..c8205ee --- /dev/null +++ b/src/Model/AnimeStaff.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param AnimeStaffDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeStaffDataItem.php b/src/Model/AnimeStaffDataItem.php new file mode 100644 index 0000000..8290de2 --- /dev/null +++ b/src/Model/AnimeStaffDataItem.php @@ -0,0 +1,67 @@ +person; + } + + /** + * Person details. + * + * @param AnimeStaffDataItemPerson $person + * + * @return self + */ + public function setPerson(AnimeStaffDataItemPerson $person): self + { + $this->person = $person; + + return $this; + } + + /** + * Staff Positions. + * + * @return string[] + */ + public function getPositions(): array + { + return $this->positions; + } + + /** + * Staff Positions. + * + * @param string[] $positions + * + * @return self + */ + public function setPositions(array $positions): self + { + $this->positions = $positions; + + return $this; + } +} diff --git a/src/Model/AnimeStaffDataItemPerson.php b/src/Model/AnimeStaffDataItemPerson.php new file mode 100644 index 0000000..671a624 --- /dev/null +++ b/src/Model/AnimeStaffDataItemPerson.php @@ -0,0 +1,121 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return PeopleImages + */ + public function getImages(): PeopleImages + { + return $this->images; + } + + /** + * @param PeopleImages $images + * + * @return self + */ + public function setImages(PeopleImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } +} diff --git a/src/Model/AnimeStatistics.php b/src/Model/AnimeStatistics.php new file mode 100644 index 0000000..e15cc83 --- /dev/null +++ b/src/Model/AnimeStatistics.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param AnimeStatisticsData $data + * + * @return self + */ + public function setData(AnimeStatisticsData $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeStatisticsData.php b/src/Model/AnimeStatisticsData.php new file mode 100644 index 0000000..51004b9 --- /dev/null +++ b/src/Model/AnimeStatisticsData.php @@ -0,0 +1,211 @@ +watching; + } + + /** + * Number of users watching the resource. + * + * @param int $watching + * + * @return self + */ + public function setWatching(int $watching): self + { + $this->watching = $watching; + + return $this; + } + + /** + * Number of users who have completed the resource. + * + * @return int + */ + public function getCompleted(): int + { + return $this->completed; + } + + /** + * Number of users who have completed the resource. + * + * @param int $completed + * + * @return self + */ + public function setCompleted(int $completed): self + { + $this->completed = $completed; + + return $this; + } + + /** + * Number of users who have put the resource on hold. + * + * @return int + */ + public function getOnHold(): int + { + return $this->onHold; + } + + /** + * Number of users who have put the resource on hold. + * + * @param int $onHold + * + * @return self + */ + public function setOnHold(int $onHold): self + { + $this->onHold = $onHold; + + return $this; + } + + /** + * Number of users who have dropped the resource. + * + * @return int + */ + public function getDropped(): int + { + return $this->dropped; + } + + /** + * Number of users who have dropped the resource. + * + * @param int $dropped + * + * @return self + */ + public function setDropped(int $dropped): self + { + $this->dropped = $dropped; + + return $this; + } + + /** + * Number of users who have planned to watch the resource. + * + * @return int + */ + public function getPlanToWatch(): int + { + return $this->planToWatch; + } + + /** + * Number of users who have planned to watch the resource. + * + * @param int $planToWatch + * + * @return self + */ + public function setPlanToWatch(int $planToWatch): self + { + $this->planToWatch = $planToWatch; + + return $this; + } + + /** + * Total number of users who have the resource added to their lists. + * + * @return int + */ + public function getTotal(): int + { + return $this->total; + } + + /** + * Total number of users who have the resource added to their lists. + * + * @param int $total + * + * @return self + */ + public function setTotal(int $total): self + { + $this->total = $total; + + return $this; + } + + /** + * @return AnimeStatisticsDataScoresItem[] + */ + public function getScores(): array + { + return $this->scores; + } + + /** + * @param AnimeStatisticsDataScoresItem[] $scores + * + * @return self + */ + public function setScores(array $scores): self + { + $this->scores = $scores; + + return $this; + } +} diff --git a/src/Model/AnimeStatisticsDataScoresItem.php b/src/Model/AnimeStatisticsDataScoresItem.php new file mode 100644 index 0000000..5b109c3 --- /dev/null +++ b/src/Model/AnimeStatisticsDataScoresItem.php @@ -0,0 +1,97 @@ +score; + } + + /** + * Scoring value. + * + * @param int $score + * + * @return self + */ + public function setScore(int $score): self + { + $this->score = $score; + + return $this; + } + + /** + * Number of votes for this score. + * + * @return int + */ + public function getVotes(): int + { + return $this->votes; + } + + /** + * Number of votes for this score. + * + * @param int $votes + * + * @return self + */ + public function setVotes(int $votes): self + { + $this->votes = $votes; + + return $this; + } + + /** + * Percentage of votes for this score. + * + * @return float + */ + public function getPercentage(): float + { + return $this->percentage; + } + + /** + * Percentage of votes for this score. + * + * @param float $percentage + * + * @return self + */ + public function setPercentage(float $percentage): self + { + $this->percentage = $percentage; + + return $this; + } +} diff --git a/src/Model/AnimeThemes.php b/src/Model/AnimeThemes.php new file mode 100644 index 0000000..9c0f1b3 --- /dev/null +++ b/src/Model/AnimeThemes.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param AnimeThemesData $data + * + * @return self + */ + public function setData(AnimeThemesData $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeThemesData.php b/src/Model/AnimeThemesData.php new file mode 100644 index 0000000..3d31be1 --- /dev/null +++ b/src/Model/AnimeThemesData.php @@ -0,0 +1,55 @@ +openings; + } + + /** + * @param string[] $openings + * + * @return self + */ + public function setOpenings(array $openings): self + { + $this->openings = $openings; + + return $this; + } + + /** + * @return string[] + */ + public function getEndings(): array + { + return $this->endings; + } + + /** + * @param string[] $endings + * + * @return self + */ + public function setEndings(array $endings): self + { + $this->endings = $endings; + + return $this; + } +} diff --git a/src/Model/AnimeUserupdates.php b/src/Model/AnimeUserupdates.php new file mode 100644 index 0000000..389d447 --- /dev/null +++ b/src/Model/AnimeUserupdates.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param AnimeUserupdatesdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/AnimeUserupdatesdataItem.php b/src/Model/AnimeUserupdatesdataItem.php new file mode 100644 index 0000000..44f4bda --- /dev/null +++ b/src/Model/AnimeUserupdatesdataItem.php @@ -0,0 +1,181 @@ +user; + } + + /** + * @param UserMeta $user + * + * @return self + */ + public function setUser(UserMeta $user): self + { + $this->user = $user; + + return $this; + } + + /** + * User Score. + * + * @return int|null + */ + public function getScore(): ?int + { + return $this->score; + } + + /** + * User Score. + * + * @param int|null $score + * + * @return self + */ + public function setScore(?int $score): self + { + $this->score = $score; + + return $this; + } + + /** + * User list status. + * + * @return string + */ + public function getStatus(): string + { + return $this->status; + } + + /** + * User list status. + * + * @param string $status + * + * @return self + */ + public function setStatus(string $status): self + { + $this->status = $status; + + return $this; + } + + /** + * Number of episodes seen. + * + * @return int|null + */ + public function getEpisodesSeen(): ?int + { + return $this->episodesSeen; + } + + /** + * Number of episodes seen. + * + * @param int|null $episodesSeen + * + * @return self + */ + public function setEpisodesSeen(?int $episodesSeen): self + { + $this->episodesSeen = $episodesSeen; + + return $this; + } + + /** + * Total number of episodes. + * + * @return int|null + */ + public function getEpisodesTotal(): ?int + { + return $this->episodesTotal; + } + + /** + * Total number of episodes. + * + * @param int|null $episodesTotal + * + * @return self + */ + public function setEpisodesTotal(?int $episodesTotal): self + { + $this->episodesTotal = $episodesTotal; + + return $this; + } + + /** + * Last updated date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Last updated date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } +} diff --git a/src/Model/AnimeVideos.php b/src/Model/AnimeVideos.php new file mode 100644 index 0000000..397c75d --- /dev/null +++ b/src/Model/AnimeVideos.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param AnimeVideosData $data + * + * @return self + */ + public function setData(AnimeVideosData $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/AnimeVideosData.php b/src/Model/AnimeVideosData.php new file mode 100644 index 0000000..2ef3a44 --- /dev/null +++ b/src/Model/AnimeVideosData.php @@ -0,0 +1,79 @@ +promo; + } + + /** + * @param AnimeVideosDataPromoItem[] $promo + * + * @return self + */ + public function setPromo(array $promo): self + { + $this->promo = $promo; + + return $this; + } + + /** + * @return AnimeVideosDataEpisodesItem[] + */ + public function getEpisodes(): array + { + return $this->episodes; + } + + /** + * @param AnimeVideosDataEpisodesItem[] $episodes + * + * @return self + */ + public function setEpisodes(array $episodes): self + { + $this->episodes = $episodes; + + return $this; + } + + /** + * @return AnimeVideosDataMusicVideosItem[] + */ + public function getMusicVideos(): array + { + return $this->musicVideos; + } + + /** + * @param AnimeVideosDataMusicVideosItem[] $musicVideos + * + * @return self + */ + public function setMusicVideos(array $musicVideos): self + { + $this->musicVideos = $musicVideos; + + return $this; + } +} diff --git a/src/Model/AnimeVideosDataEpisodesItem.php b/src/Model/AnimeVideosDataEpisodesItem.php new file mode 100644 index 0000000..d68b081 --- /dev/null +++ b/src/Model/AnimeVideosDataEpisodesItem.php @@ -0,0 +1,151 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * Episode. + * + * @return string + */ + public function getEpisode(): string + { + return $this->episode; + } + + /** + * Episode. + * + * @param string $episode + * + * @return self + */ + public function setEpisode(string $episode): self + { + $this->episode = $episode; + + return $this; + } + + /** + * @return CommonImages + */ + public function getImages(): CommonImages + { + return $this->images; + } + + /** + * @param CommonImages $images + * + * @return self + */ + public function setImages(CommonImages $images): self + { + $this->images = $images; + + return $this; + } +} diff --git a/src/Model/AnimeVideosDataMusicVideosItem.php b/src/Model/AnimeVideosDataMusicVideosItem.php new file mode 100644 index 0000000..908e811 --- /dev/null +++ b/src/Model/AnimeVideosDataMusicVideosItem.php @@ -0,0 +1,91 @@ +title; + } + + /** + * Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * Youtube Details. + * + * @return Trailer + */ + public function getVideo(): Trailer + { + return $this->video; + } + + /** + * Youtube Details. + * + * @param Trailer $video + * + * @return self + */ + public function setVideo(Trailer $video): self + { + $this->video = $video; + + return $this; + } + + /** + * @return AnimeVideosDataMusicVideosItemMeta + */ + public function getMeta(): AnimeVideosDataMusicVideosItemMeta + { + return $this->meta; + } + + /** + * @param AnimeVideosDataMusicVideosItemMeta $meta + * + * @return self + */ + public function setMeta(AnimeVideosDataMusicVideosItemMeta $meta): self + { + $this->meta = $meta; + + return $this; + } +} diff --git a/src/Model/AnimeVideosDataMusicVideosItemMeta.php b/src/Model/AnimeVideosDataMusicVideosItemMeta.php new file mode 100644 index 0000000..1d66720 --- /dev/null +++ b/src/Model/AnimeVideosDataMusicVideosItemMeta.php @@ -0,0 +1,55 @@ +title; + } + + /** + * @param string|null $title + * + * @return self + */ + public function setTitle(?string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * @return string|null + */ + public function getAuthor(): ?string + { + return $this->author; + } + + /** + * @param string|null $author + * + * @return self + */ + public function setAuthor(?string $author): self + { + $this->author = $author; + + return $this; + } +} diff --git a/src/Model/AnimeVideosDataPromoItem.php b/src/Model/AnimeVideosDataPromoItem.php new file mode 100644 index 0000000..33ef4c9 --- /dev/null +++ b/src/Model/AnimeVideosDataPromoItem.php @@ -0,0 +1,67 @@ +title; + } + + /** + * Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * Youtube Details. + * + * @return Trailer + */ + public function getTrailer(): Trailer + { + return $this->trailer; + } + + /** + * Youtube Details. + * + * @param Trailer $trailer + * + * @return self + */ + public function setTrailer(Trailer $trailer): self + { + $this->trailer = $trailer; + + return $this; + } +} diff --git a/src/Model/AnimeVideosEpisodes.php b/src/Model/AnimeVideosEpisodes.php new file mode 100644 index 0000000..d91e644 --- /dev/null +++ b/src/Model/AnimeVideosEpisodes.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param AnimeVideosEpisodesdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/AnimeVideosEpisodesdataItem.php b/src/Model/AnimeVideosEpisodesdataItem.php new file mode 100644 index 0000000..e92618e --- /dev/null +++ b/src/Model/AnimeVideosEpisodesdataItem.php @@ -0,0 +1,151 @@ +malId; + } + + /** + * MyAnimeList ID or Episode Number. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * Episode Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Episode Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * Episode Subtitle. + * + * @return string + */ + public function getEpisode(): string + { + return $this->episode; + } + + /** + * Episode Subtitle. + * + * @param string $episode + * + * @return self + */ + public function setEpisode(string $episode): self + { + $this->episode = $episode; + + return $this; + } + + /** + * Episode Page URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * Episode Page URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return CommonImages + */ + public function getImages(): CommonImages + { + return $this->images; + } + + /** + * @param CommonImages $images + * + * @return self + */ + public function setImages(CommonImages $images): self + { + $this->images = $images; + + return $this; + } +} diff --git a/src/Model/Broadcast.php b/src/Model/Broadcast.php new file mode 100644 index 0000000..9fbf100 --- /dev/null +++ b/src/Model/Broadcast.php @@ -0,0 +1,127 @@ +day; + } + + /** + * Day of the week. + * + * @param string|null $day + * + * @return self + */ + public function setDay(?string $day): self + { + $this->day = $day; + + return $this; + } + + /** + * Time in 24 hour format. + * + * @return string|null + */ + public function getTime(): ?string + { + return $this->time; + } + + /** + * Time in 24 hour format. + * + * @param string|null $time + * + * @return self + */ + public function setTime(?string $time): self + { + $this->time = $time; + + return $this; + } + + /** + * Timezone (Tz Database format https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * + * @return string|null + */ + public function getTimezone(): ?string + { + return $this->timezone; + } + + /** + * Timezone (Tz Database format https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * + * @param string|null $timezone + * + * @return self + */ + public function setTimezone(?string $timezone): self + { + $this->timezone = $timezone; + + return $this; + } + + /** + * Raw parsed broadcast string. + * + * @return string|null + */ + public function getString(): ?string + { + return $this->string; + } + + /** + * Raw parsed broadcast string. + * + * @param string|null $string + * + * @return self + */ + public function setString(?string $string): self + { + $this->string = $string; + + return $this; + } +} diff --git a/src/Model/Character.php b/src/Model/Character.php new file mode 100644 index 0000000..3fb00b3 --- /dev/null +++ b/src/Model/Character.php @@ -0,0 +1,241 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return CharacterImages + */ + public function getImages(): CharacterImages + { + return $this->images; + } + + /** + * @param CharacterImages $images + * + * @return self + */ + public function setImages(CharacterImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Name. + * + * @return string|null + */ + public function getNameKanji(): ?string + { + return $this->nameKanji; + } + + /** + * Name. + * + * @param string|null $nameKanji + * + * @return self + */ + public function setNameKanji(?string $nameKanji): self + { + $this->nameKanji = $nameKanji; + + return $this; + } + + /** + * Other Names. + * + * @return string[] + */ + public function getNicknames(): array + { + return $this->nicknames; + } + + /** + * Other Names. + * + * @param string[] $nicknames + * + * @return self + */ + public function setNicknames(array $nicknames): self + { + $this->nicknames = $nicknames; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int + */ + public function getFavorites(): int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int $favorites + * + * @return self + */ + public function setFavorites(int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Biography. + * + * @return string|null + */ + public function getAbout(): ?string + { + return $this->about; + } + + /** + * Biography. + * + * @param string|null $about + * + * @return self + */ + public function setAbout(?string $about): self + { + $this->about = $about; + + return $this; + } +} diff --git a/src/Model/CharacterAnime.php b/src/Model/CharacterAnime.php new file mode 100644 index 0000000..aef14f8 --- /dev/null +++ b/src/Model/CharacterAnime.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param CharacterAnimeDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/CharacterAnimeDataItem.php b/src/Model/CharacterAnimeDataItem.php new file mode 100644 index 0000000..2e65dbd --- /dev/null +++ b/src/Model/CharacterAnimeDataItem.php @@ -0,0 +1,61 @@ +role; + } + + /** + * Character's Role. + * + * @param string $role + * + * @return self + */ + public function setRole(string $role): self + { + $this->role = $role; + + return $this; + } + + /** + * @return AnimeMeta + */ + public function getAnime(): AnimeMeta + { + return $this->anime; + } + + /** + * @param AnimeMeta $anime + * + * @return self + */ + public function setAnime(AnimeMeta $anime): self + { + $this->anime = $anime; + + return $this; + } +} diff --git a/src/Model/CharacterFull.php b/src/Model/CharacterFull.php new file mode 100644 index 0000000..e6c1031 --- /dev/null +++ b/src/Model/CharacterFull.php @@ -0,0 +1,313 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return CharacterImages + */ + public function getImages(): CharacterImages + { + return $this->images; + } + + /** + * @param CharacterImages $images + * + * @return self + */ + public function setImages(CharacterImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Name. + * + * @return string|null + */ + public function getNameKanji(): ?string + { + return $this->nameKanji; + } + + /** + * Name. + * + * @param string|null $nameKanji + * + * @return self + */ + public function setNameKanji(?string $nameKanji): self + { + $this->nameKanji = $nameKanji; + + return $this; + } + + /** + * Other Names. + * + * @return string[] + */ + public function getNicknames(): array + { + return $this->nicknames; + } + + /** + * Other Names. + * + * @param string[] $nicknames + * + * @return self + */ + public function setNicknames(array $nicknames): self + { + $this->nicknames = $nicknames; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int + */ + public function getFavorites(): int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int $favorites + * + * @return self + */ + public function setFavorites(int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Biography. + * + * @return string|null + */ + public function getAbout(): ?string + { + return $this->about; + } + + /** + * Biography. + * + * @param string|null $about + * + * @return self + */ + public function setAbout(?string $about): self + { + $this->about = $about; + + return $this; + } + + /** + * @return CharacterFullAnimeItem[] + */ + public function getAnime(): array + { + return $this->anime; + } + + /** + * @param CharacterFullAnimeItem[] $anime + * + * @return self + */ + public function setAnime(array $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * @return CharacterFullMangaItem[] + */ + public function getManga(): array + { + return $this->manga; + } + + /** + * @param CharacterFullMangaItem[] $manga + * + * @return self + */ + public function setManga(array $manga): self + { + $this->manga = $manga; + + return $this; + } + + /** + * @return CharacterFullVoicesItem[] + */ + public function getVoices(): array + { + return $this->voices; + } + + /** + * @param CharacterFullVoicesItem[] $voices + * + * @return self + */ + public function setVoices(array $voices): self + { + $this->voices = $voices; + + return $this; + } +} diff --git a/src/Model/CharacterFullAnimeItem.php b/src/Model/CharacterFullAnimeItem.php new file mode 100644 index 0000000..ce442a5 --- /dev/null +++ b/src/Model/CharacterFullAnimeItem.php @@ -0,0 +1,61 @@ +role; + } + + /** + * Character's Role. + * + * @param string $role + * + * @return self + */ + public function setRole(string $role): self + { + $this->role = $role; + + return $this; + } + + /** + * @return AnimeMeta + */ + public function getAnime(): AnimeMeta + { + return $this->anime; + } + + /** + * @param AnimeMeta $anime + * + * @return self + */ + public function setAnime(AnimeMeta $anime): self + { + $this->anime = $anime; + + return $this; + } +} diff --git a/src/Model/CharacterFullMangaItem.php b/src/Model/CharacterFullMangaItem.php new file mode 100644 index 0000000..3e76090 --- /dev/null +++ b/src/Model/CharacterFullMangaItem.php @@ -0,0 +1,61 @@ +role; + } + + /** + * Character's Role. + * + * @param string $role + * + * @return self + */ + public function setRole(string $role): self + { + $this->role = $role; + + return $this; + } + + /** + * @return MangaMeta + */ + public function getManga(): MangaMeta + { + return $this->manga; + } + + /** + * @param MangaMeta $manga + * + * @return self + */ + public function setManga(MangaMeta $manga): self + { + $this->manga = $manga; + + return $this; + } +} diff --git a/src/Model/CharacterFullVoicesItem.php b/src/Model/CharacterFullVoicesItem.php new file mode 100644 index 0000000..c61800c --- /dev/null +++ b/src/Model/CharacterFullVoicesItem.php @@ -0,0 +1,61 @@ +language; + } + + /** + * Character's Role. + * + * @param string $language + * + * @return self + */ + public function setLanguage(string $language): self + { + $this->language = $language; + + return $this; + } + + /** + * @return PersonMeta + */ + public function getPerson(): PersonMeta + { + return $this->person; + } + + /** + * @param PersonMeta $person + * + * @return self + */ + public function setPerson(PersonMeta $person): self + { + $this->person = $person; + + return $this; + } +} diff --git a/src/Model/CharacterImages.php b/src/Model/CharacterImages.php new file mode 100644 index 0000000..013315b --- /dev/null +++ b/src/Model/CharacterImages.php @@ -0,0 +1,67 @@ +jpg; + } + + /** + * Available images in JPG. + * + * @param CharacterImagesJpg $jpg + * + * @return self + */ + public function setJpg(CharacterImagesJpg $jpg): self + { + $this->jpg = $jpg; + + return $this; + } + + /** + * Available images in WEBP. + * + * @return CharacterImagesWebp + */ + public function getWebp(): CharacterImagesWebp + { + return $this->webp; + } + + /** + * Available images in WEBP. + * + * @param CharacterImagesWebp $webp + * + * @return self + */ + public function setWebp(CharacterImagesWebp $webp): self + { + $this->webp = $webp; + + return $this; + } +} diff --git a/src/Model/CharacterImagesJpg.php b/src/Model/CharacterImagesJpg.php new file mode 100644 index 0000000..ac88e0a --- /dev/null +++ b/src/Model/CharacterImagesJpg.php @@ -0,0 +1,67 @@ +imageUrl; + } + + /** + * Image URL JPG. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Small Image URL JPG. + * + * @return string|null + */ + public function getSmallImageUrl(): ?string + { + return $this->smallImageUrl; + } + + /** + * Small Image URL JPG. + * + * @param string|null $smallImageUrl + * + * @return self + */ + public function setSmallImageUrl(?string $smallImageUrl): self + { + $this->smallImageUrl = $smallImageUrl; + + return $this; + } +} diff --git a/src/Model/CharacterImagesWebp.php b/src/Model/CharacterImagesWebp.php new file mode 100644 index 0000000..1cae424 --- /dev/null +++ b/src/Model/CharacterImagesWebp.php @@ -0,0 +1,67 @@ +imageUrl; + } + + /** + * Image URL WEBP. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Small Image URL WEBP. + * + * @return string|null + */ + public function getSmallImageUrl(): ?string + { + return $this->smallImageUrl; + } + + /** + * Small Image URL WEBP. + * + * @param string|null $smallImageUrl + * + * @return self + */ + public function setSmallImageUrl(?string $smallImageUrl): self + { + $this->smallImageUrl = $smallImageUrl; + + return $this; + } +} diff --git a/src/Model/CharacterManga.php b/src/Model/CharacterManga.php new file mode 100644 index 0000000..8df4ccb --- /dev/null +++ b/src/Model/CharacterManga.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param CharacterMangaDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/CharacterMangaDataItem.php b/src/Model/CharacterMangaDataItem.php new file mode 100644 index 0000000..d6bd3f9 --- /dev/null +++ b/src/Model/CharacterMangaDataItem.php @@ -0,0 +1,61 @@ +role; + } + + /** + * Character's Role. + * + * @param string $role + * + * @return self + */ + public function setRole(string $role): self + { + $this->role = $role; + + return $this; + } + + /** + * @return MangaMeta + */ + public function getManga(): MangaMeta + { + return $this->manga; + } + + /** + * @param MangaMeta $manga + * + * @return self + */ + public function setManga(MangaMeta $manga): self + { + $this->manga = $manga; + + return $this; + } +} diff --git a/src/Model/CharacterMeta.php b/src/Model/CharacterMeta.php new file mode 100644 index 0000000..1d426d1 --- /dev/null +++ b/src/Model/CharacterMeta.php @@ -0,0 +1,121 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return CharacterImages + */ + public function getImages(): CharacterImages + { + return $this->images; + } + + /** + * @param CharacterImages $images + * + * @return self + */ + public function setImages(CharacterImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Entry name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Entry name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } +} diff --git a/src/Model/CharacterPictures.php b/src/Model/CharacterPictures.php new file mode 100644 index 0000000..b7b1661 --- /dev/null +++ b/src/Model/CharacterPictures.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param CharacterPicturesDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/CharacterPicturesDataItem.php b/src/Model/CharacterPicturesDataItem.php new file mode 100644 index 0000000..e804063 --- /dev/null +++ b/src/Model/CharacterPicturesDataItem.php @@ -0,0 +1,67 @@ +imageUrl; + } + + /** + * Default JPG Image Size URL. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Large JPG Image Size URL. + * + * @return string|null + */ + public function getLargeImageUrl(): ?string + { + return $this->largeImageUrl; + } + + /** + * Large JPG Image Size URL. + * + * @param string|null $largeImageUrl + * + * @return self + */ + public function setLargeImageUrl(?string $largeImageUrl): self + { + $this->largeImageUrl = $largeImageUrl; + + return $this; + } +} diff --git a/src/Model/CharacterVoiceActors.php b/src/Model/CharacterVoiceActors.php new file mode 100644 index 0000000..e65e2b0 --- /dev/null +++ b/src/Model/CharacterVoiceActors.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param CharacterVoiceActorsDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/CharacterVoiceActorsDataItem.php b/src/Model/CharacterVoiceActorsDataItem.php new file mode 100644 index 0000000..dd32ef2 --- /dev/null +++ b/src/Model/CharacterVoiceActorsDataItem.php @@ -0,0 +1,61 @@ +language; + } + + /** + * Character's Role. + * + * @param string $language + * + * @return self + */ + public function setLanguage(string $language): self + { + $this->language = $language; + + return $this; + } + + /** + * @return PersonMeta + */ + public function getPerson(): PersonMeta + { + return $this->person; + } + + /** + * @param PersonMeta $person + * + * @return self + */ + public function setPerson(PersonMeta $person): self + { + $this->person = $person; + + return $this; + } +} diff --git a/src/Model/CharactersIdFullGetResponse200.php b/src/Model/CharactersIdFullGetResponse200.php new file mode 100644 index 0000000..3a95917 --- /dev/null +++ b/src/Model/CharactersIdFullGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Character Resource. + * + * @param CharacterFull $data + * + * @return self + */ + public function setData(CharacterFull $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/CharactersIdGetResponse200.php b/src/Model/CharactersIdGetResponse200.php new file mode 100644 index 0000000..6c2ab2a --- /dev/null +++ b/src/Model/CharactersIdGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Character Resource. + * + * @param Character $data + * + * @return self + */ + public function setData(Character $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/CharactersSearch.php b/src/Model/CharactersSearch.php new file mode 100644 index 0000000..ecbe322 --- /dev/null +++ b/src/Model/CharactersSearch.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param Character[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPlusPagination + */ + public function getPagination(): PaginationPlusPagination + { + return $this->pagination; + } + + /** + * @param PaginationPlusPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPlusPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/Club.php b/src/Model/Club.php new file mode 100644 index 0000000..116aefa --- /dev/null +++ b/src/Model/Club.php @@ -0,0 +1,241 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * Club name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Club name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Club URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * Club URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return CommonImages + */ + public function getImages(): CommonImages + { + return $this->images; + } + + /** + * @param CommonImages $images + * + * @return self + */ + public function setImages(CommonImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Number of club members. + * + * @return int + */ + public function getMembers(): int + { + return $this->members; + } + + /** + * Number of club members. + * + * @param int $members + * + * @return self + */ + public function setMembers(int $members): self + { + $this->members = $members; + + return $this; + } + + /** + * Club Category. + * + * @return string + */ + public function getCategory(): string + { + return $this->category; + } + + /** + * Club Category. + * + * @param string $category + * + * @return self + */ + public function setCategory(string $category): self + { + $this->category = $category; + + return $this; + } + + /** + * Date Created ISO8601. + * + * @return string + */ + public function getCreated(): string + { + return $this->created; + } + + /** + * Date Created ISO8601. + * + * @param string $created + * + * @return self + */ + public function setCreated(string $created): self + { + $this->created = $created; + + return $this; + } + + /** + * Club access. + * + * @return string + */ + public function getAccess(): string + { + return $this->access; + } + + /** + * Club access. + * + * @param string $access + * + * @return self + */ + public function setAccess(string $access): self + { + $this->access = $access; + + return $this; + } +} diff --git a/src/Model/ClubMember.php b/src/Model/ClubMember.php new file mode 100644 index 0000000..61974ed --- /dev/null +++ b/src/Model/ClubMember.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UserImages[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/ClubRelations.php b/src/Model/ClubRelations.php new file mode 100644 index 0000000..6d2f73a --- /dev/null +++ b/src/Model/ClubRelations.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param ClubRelationsData $data + * + * @return self + */ + public function setData(ClubRelationsData $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/ClubRelationsData.php b/src/Model/ClubRelationsData.php new file mode 100644 index 0000000..858d515 --- /dev/null +++ b/src/Model/ClubRelationsData.php @@ -0,0 +1,79 @@ +anime; + } + + /** + * @param MalUrl[] $anime + * + * @return self + */ + public function setAnime(array $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getManga(): array + { + return $this->manga; + } + + /** + * @param MalUrl[] $manga + * + * @return self + */ + public function setManga(array $manga): self + { + $this->manga = $manga; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getCharacters(): array + { + return $this->characters; + } + + /** + * @param MalUrl[] $characters + * + * @return self + */ + public function setCharacters(array $characters): self + { + $this->characters = $characters; + + return $this; + } +} diff --git a/src/Model/ClubStaff.php b/src/Model/ClubStaff.php new file mode 100644 index 0000000..1d385c6 --- /dev/null +++ b/src/Model/ClubStaff.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param ClubStaffDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/ClubStaffDataItem.php b/src/Model/ClubStaffDataItem.php new file mode 100644 index 0000000..0e6b641 --- /dev/null +++ b/src/Model/ClubStaffDataItem.php @@ -0,0 +1,67 @@ +url; + } + + /** + * User URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * User's username. + * + * @return string + */ + public function getUsername(): string + { + return $this->username; + } + + /** + * User's username. + * + * @param string $username + * + * @return self + */ + public function setUsername(string $username): self + { + $this->username = $username; + + return $this; + } +} diff --git a/src/Model/ClubsIdGetResponse200.php b/src/Model/ClubsIdGetResponse200.php new file mode 100644 index 0000000..c49460f --- /dev/null +++ b/src/Model/ClubsIdGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Club Resource. + * + * @param Club $data + * + * @return self + */ + public function setData(Club $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/ClubsIdMembersGetResponse200.php b/src/Model/ClubsIdMembersGetResponse200.php new file mode 100644 index 0000000..4ac4ca9 --- /dev/null +++ b/src/Model/ClubsIdMembersGetResponse200.php @@ -0,0 +1,55 @@ +pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } + + /** + * @return UserImages[] + */ + public function getData(): array + { + return $this->data; + } + + /** + * @param UserImages[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/ClubsSearch.php b/src/Model/ClubsSearch.php new file mode 100644 index 0000000..4dd2567 --- /dev/null +++ b/src/Model/ClubsSearch.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param Club[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/CommonImages.php b/src/Model/CommonImages.php new file mode 100644 index 0000000..1c6d6ea --- /dev/null +++ b/src/Model/CommonImages.php @@ -0,0 +1,37 @@ +jpg; + } + + /** + * Available images in JPG. + * + * @param CommonImagesJpg $jpg + * + * @return self + */ + public function setJpg(CommonImagesJpg $jpg): self + { + $this->jpg = $jpg; + + return $this; + } +} diff --git a/src/Model/CommonImagesJpg.php b/src/Model/CommonImagesJpg.php new file mode 100644 index 0000000..e118b97 --- /dev/null +++ b/src/Model/CommonImagesJpg.php @@ -0,0 +1,37 @@ +imageUrl; + } + + /** + * Image URL JPG. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } +} diff --git a/src/Model/Daterange.php b/src/Model/Daterange.php new file mode 100644 index 0000000..44e24ba --- /dev/null +++ b/src/Model/Daterange.php @@ -0,0 +1,97 @@ +from; + } + + /** + * Date ISO8601. + * + * @param string|null $from + * + * @return self + */ + public function setFrom(?string $from): self + { + $this->from = $from; + + return $this; + } + + /** + * Date ISO8601. + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->to; + } + + /** + * Date ISO8601. + * + * @param string|null $to + * + * @return self + */ + public function setTo(?string $to): self + { + $this->to = $to; + + return $this; + } + + /** + * Date Prop. + * + * @return DaterangeProp + */ + public function getProp(): DaterangeProp + { + return $this->prop; + } + + /** + * Date Prop. + * + * @param DaterangeProp $prop + * + * @return self + */ + public function setProp(DaterangeProp $prop): self + { + $this->prop = $prop; + + return $this; + } +} diff --git a/src/Model/DaterangeProp.php b/src/Model/DaterangeProp.php new file mode 100644 index 0000000..a36d2b6 --- /dev/null +++ b/src/Model/DaterangeProp.php @@ -0,0 +1,97 @@ +from; + } + + /** + * Date Prop From. + * + * @param DaterangePropFrom $from + * + * @return self + */ + public function setFrom(DaterangePropFrom $from): self + { + $this->from = $from; + + return $this; + } + + /** + * Date Prop To. + * + * @return DaterangePropTo + */ + public function getTo(): DaterangePropTo + { + return $this->to; + } + + /** + * Date Prop To. + * + * @param DaterangePropTo $to + * + * @return self + */ + public function setTo(DaterangePropTo $to): self + { + $this->to = $to; + + return $this; + } + + /** + * Raw parsed string. + * + * @return string|null + */ + public function getString(): ?string + { + return $this->string; + } + + /** + * Raw parsed string. + * + * @param string|null $string + * + * @return self + */ + public function setString(?string $string): self + { + $this->string = $string; + + return $this; + } +} diff --git a/src/Model/DaterangePropFrom.php b/src/Model/DaterangePropFrom.php new file mode 100644 index 0000000..1856eb1 --- /dev/null +++ b/src/Model/DaterangePropFrom.php @@ -0,0 +1,97 @@ +day; + } + + /** + * Day. + * + * @param int|null $day + * + * @return self + */ + public function setDay(?int $day): self + { + $this->day = $day; + + return $this; + } + + /** + * Month. + * + * @return int|null + */ + public function getMonth(): ?int + { + return $this->month; + } + + /** + * Month. + * + * @param int|null $month + * + * @return self + */ + public function setMonth(?int $month): self + { + $this->month = $month; + + return $this; + } + + /** + * Year. + * + * @return int|null + */ + public function getYear(): ?int + { + return $this->year; + } + + /** + * Year. + * + * @param int|null $year + * + * @return self + */ + public function setYear(?int $year): self + { + $this->year = $year; + + return $this; + } +} diff --git a/src/Model/DaterangePropTo.php b/src/Model/DaterangePropTo.php new file mode 100644 index 0000000..c095a63 --- /dev/null +++ b/src/Model/DaterangePropTo.php @@ -0,0 +1,97 @@ +day; + } + + /** + * Day. + * + * @param int|null $day + * + * @return self + */ + public function setDay(?int $day): self + { + $this->day = $day; + + return $this; + } + + /** + * Month. + * + * @return int|null + */ + public function getMonth(): ?int + { + return $this->month; + } + + /** + * Month. + * + * @param int|null $month + * + * @return self + */ + public function setMonth(?int $month): self + { + $this->month = $month; + + return $this; + } + + /** + * Year. + * + * @return int|null + */ + public function getYear(): ?int + { + return $this->year; + } + + /** + * Year. + * + * @param int|null $year + * + * @return self + */ + public function setYear(?int $year): self + { + $this->year = $year; + + return $this; + } +} diff --git a/src/Model/EntryMeta.php b/src/Model/EntryMeta.php new file mode 100644 index 0000000..c644e1d --- /dev/null +++ b/src/Model/EntryMeta.php @@ -0,0 +1,127 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Image URL. + * + * @return string + */ + public function getImageUrl(): string + { + return $this->imageUrl; + } + + /** + * Image URL. + * + * @param string $imageUrl + * + * @return self + */ + public function setImageUrl(string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Entry Name/Title. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Entry Name/Title. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } +} diff --git a/src/Model/EntryRecommendations.php b/src/Model/EntryRecommendations.php new file mode 100644 index 0000000..c909a03 --- /dev/null +++ b/src/Model/EntryRecommendations.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param EntryRecommendationsDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/EntryRecommendationsDataItem.php b/src/Model/EntryRecommendationsDataItem.php new file mode 100644 index 0000000..b3ba4c9 --- /dev/null +++ b/src/Model/EntryRecommendationsDataItem.php @@ -0,0 +1,31 @@ +entry; + } + + /** + * @param mixed $entry + * + * @return self + */ + public function setEntry($entry): self + { + $this->entry = $entry; + + return $this; + } +} diff --git a/src/Model/ExternalLinks.php b/src/Model/ExternalLinks.php new file mode 100644 index 0000000..c2d36ff --- /dev/null +++ b/src/Model/ExternalLinks.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param ExternalLinksDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/ExternalLinksDataItem.php b/src/Model/ExternalLinksDataItem.php new file mode 100644 index 0000000..2eb3404 --- /dev/null +++ b/src/Model/ExternalLinksDataItem.php @@ -0,0 +1,55 @@ +name; + } + + /** + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/Forum.php b/src/Model/Forum.php new file mode 100644 index 0000000..95c4974 --- /dev/null +++ b/src/Model/Forum.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param ForumDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/ForumDataItem.php b/src/Model/ForumDataItem.php new file mode 100644 index 0000000..7eba231 --- /dev/null +++ b/src/Model/ForumDataItem.php @@ -0,0 +1,247 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * Post Date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Post Date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } + + /** + * Author MyAnimeList Username. + * + * @return string + */ + public function getAuthorUsername(): string + { + return $this->authorUsername; + } + + /** + * Author MyAnimeList Username. + * + * @param string $authorUsername + * + * @return self + */ + public function setAuthorUsername(string $authorUsername): self + { + $this->authorUsername = $authorUsername; + + return $this; + } + + /** + * Author Profile URL. + * + * @return string + */ + public function getAuthorUrl(): string + { + return $this->authorUrl; + } + + /** + * Author Profile URL. + * + * @param string $authorUrl + * + * @return self + */ + public function setAuthorUrl(string $authorUrl): self + { + $this->authorUrl = $authorUrl; + + return $this; + } + + /** + * Comment count. + * + * @return int + */ + public function getComments(): int + { + return $this->comments; + } + + /** + * Comment count. + * + * @param int $comments + * + * @return self + */ + public function setComments(int $comments): self + { + $this->comments = $comments; + + return $this; + } + + /** + * Last comment details. + * + * @return ForumDataItemLastComment + */ + public function getLastComment(): ForumDataItemLastComment + { + return $this->lastComment; + } + + /** + * Last comment details. + * + * @param ForumDataItemLastComment $lastComment + * + * @return self + */ + public function setLastComment(ForumDataItemLastComment $lastComment): self + { + $this->lastComment = $lastComment; + + return $this; + } +} diff --git a/src/Model/ForumDataItemLastComment.php b/src/Model/ForumDataItemLastComment.php new file mode 100644 index 0000000..176d099 --- /dev/null +++ b/src/Model/ForumDataItemLastComment.php @@ -0,0 +1,127 @@ +url; + } + + /** + * Last comment URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Author MyAnimeList Username. + * + * @return string + */ + public function getAuthorUsername(): string + { + return $this->authorUsername; + } + + /** + * Author MyAnimeList Username. + * + * @param string $authorUsername + * + * @return self + */ + public function setAuthorUsername(string $authorUsername): self + { + $this->authorUsername = $authorUsername; + + return $this; + } + + /** + * Author Profile URL. + * + * @return string + */ + public function getAuthorUrl(): string + { + return $this->authorUrl; + } + + /** + * Author Profile URL. + * + * @param string $authorUrl + * + * @return self + */ + public function setAuthorUrl(string $authorUrl): self + { + $this->authorUrl = $authorUrl; + + return $this; + } + + /** + * Last comment date posted ISO8601. + * + * @return string|null + */ + public function getDate(): ?string + { + return $this->date; + } + + /** + * Last comment date posted ISO8601. + * + * @param string|null $date + * + * @return self + */ + public function setDate(?string $date): self + { + $this->date = $date; + + return $this; + } +} diff --git a/src/Model/Genre.php b/src/Model/Genre.php new file mode 100644 index 0000000..d17aaa0 --- /dev/null +++ b/src/Model/Genre.php @@ -0,0 +1,127 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * Genre Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Genre Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Genre's entry count. + * + * @return int + */ + public function getCount(): int + { + return $this->count; + } + + /** + * Genre's entry count. + * + * @param int $count + * + * @return self + */ + public function setCount(int $count): self + { + $this->count = $count; + + return $this; + } +} diff --git a/src/Model/Genres.php b/src/Model/Genres.php new file mode 100644 index 0000000..919917f --- /dev/null +++ b/src/Model/Genres.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param Genre[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/History.php b/src/Model/History.php new file mode 100644 index 0000000..cfddf54 --- /dev/null +++ b/src/Model/History.php @@ -0,0 +1,97 @@ +entry; + } + + /** + * Parsed URL Data. + * + * @param MalUrl $entry + * + * @return self + */ + public function setEntry(MalUrl $entry): self + { + $this->entry = $entry; + + return $this; + } + + /** + * Number of episodes/chapters watched/read. + * + * @return int + */ + public function getIncrement(): int + { + return $this->increment; + } + + /** + * Number of episodes/chapters watched/read. + * + * @param int $increment + * + * @return self + */ + public function setIncrement(int $increment): self + { + $this->increment = $increment; + + return $this; + } + + /** + * Date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } +} diff --git a/src/Model/Magazine.php b/src/Model/Magazine.php new file mode 100644 index 0000000..302eee7 --- /dev/null +++ b/src/Model/Magazine.php @@ -0,0 +1,127 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * Magazine Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Magazine Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Magazine's manga count. + * + * @return int + */ + public function getCount(): int + { + return $this->count; + } + + /** + * Magazine's manga count. + * + * @param int $count + * + * @return self + */ + public function setCount(int $count): self + { + $this->count = $count; + + return $this; + } +} diff --git a/src/Model/Magazines.php b/src/Model/Magazines.php new file mode 100644 index 0000000..b2653e2 --- /dev/null +++ b/src/Model/Magazines.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param Magazine[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/MalUrl.php b/src/Model/MalUrl.php new file mode 100644 index 0000000..6d359cf --- /dev/null +++ b/src/Model/MalUrl.php @@ -0,0 +1,127 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * Type of resource. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Type of resource. + * + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Resource Name/Title. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Resource Name/Title. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/MalUrl2.php b/src/Model/MalUrl2.php new file mode 100644 index 0000000..b4e299b --- /dev/null +++ b/src/Model/MalUrl2.php @@ -0,0 +1,127 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * Type of resource. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Type of resource. + * + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Resource Name/Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Resource Name/Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/Manga.php b/src/Model/Manga.php new file mode 100644 index 0000000..9ea13fb --- /dev/null +++ b/src/Model/Manga.php @@ -0,0 +1,823 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return MangaImages + */ + public function getImages(): MangaImages + { + return $this->images; + } + + /** + * @param MangaImages $images + * + * @return self + */ + public function setImages(MangaImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Whether the entry is pending approval on MAL or not. + * + * @return bool + */ + public function getApproved(): bool + { + return $this->approved; + } + + /** + * Whether the entry is pending approval on MAL or not. + * + * @param bool $approved + * + * @return self + */ + public function setApproved(bool $approved): self + { + $this->approved = $approved; + + return $this; + } + + /** + * All Titles. + * + * @return string[] + */ + public function getTitles(): array + { + return $this->titles; + } + + /** + * All Titles. + * + * @param string[] $titles + * + * @return self + */ + public function setTitles(array $titles): self + { + $this->titles = $titles; + + return $this; + } + + /** + * Title. + * + * @deprecated + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @deprecated + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * English Title. + * + * @deprecated + * + * @return string|null + */ + public function getTitleEnglish(): ?string + { + return $this->titleEnglish; + } + + /** + * English Title. + * + * @param string|null $titleEnglish + * + * @deprecated + * + * @return self + */ + public function setTitleEnglish(?string $titleEnglish): self + { + $this->titleEnglish = $titleEnglish; + + return $this; + } + + /** + * Japanese Title. + * + * @deprecated + * + * @return string|null + */ + public function getTitleJapanese(): ?string + { + return $this->titleJapanese; + } + + /** + * Japanese Title. + * + * @param string|null $titleJapanese + * + * @deprecated + * + * @return self + */ + public function setTitleJapanese(?string $titleJapanese): self + { + $this->titleJapanese = $titleJapanese; + + return $this; + } + + /** + * Manga Type. + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * Manga Type. + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Chapter count. + * + * @return int|null + */ + public function getChapters(): ?int + { + return $this->chapters; + } + + /** + * Chapter count. + * + * @param int|null $chapters + * + * @return self + */ + public function setChapters(?int $chapters): self + { + $this->chapters = $chapters; + + return $this; + } + + /** + * Volume count. + * + * @return int|null + */ + public function getVolumes(): ?int + { + return $this->volumes; + } + + /** + * Volume count. + * + * @param int|null $volumes + * + * @return self + */ + public function setVolumes(?int $volumes): self + { + $this->volumes = $volumes; + + return $this; + } + + /** + * Publishing status. + * + * @return string + */ + public function getStatus(): string + { + return $this->status; + } + + /** + * Publishing status. + * + * @param string $status + * + * @return self + */ + public function setStatus(string $status): self + { + $this->status = $status; + + return $this; + } + + /** + * Publishing boolean. + * + * @return bool + */ + public function getPublishing(): bool + { + return $this->publishing; + } + + /** + * Publishing boolean. + * + * @param bool $publishing + * + * @return self + */ + public function setPublishing(bool $publishing): self + { + $this->publishing = $publishing; + + return $this; + } + + /** + * Date range. + * + * @return Daterange + */ + public function getPublished(): Daterange + { + return $this->published; + } + + /** + * Date range. + * + * @param Daterange $published + * + * @return self + */ + public function setPublished(Daterange $published): self + { + $this->published = $published; + + return $this; + } + + /** + * Score. + * + * @return float|null + */ + public function getScore(): ?float + { + return $this->score; + } + + /** + * Score. + * + * @param float|null $score + * + * @return self + */ + public function setScore(?float $score): self + { + $this->score = $score; + + return $this; + } + + /** + * Number of users. + * + * @return int|null + */ + public function getScoredBy(): ?int + { + return $this->scoredBy; + } + + /** + * Number of users. + * + * @param int|null $scoredBy + * + * @return self + */ + public function setScoredBy(?int $scoredBy): self + { + $this->scoredBy = $scoredBy; + + return $this; + } + + /** + * Ranking. + * + * @return int|null + */ + public function getRank(): ?int + { + return $this->rank; + } + + /** + * Ranking. + * + * @param int|null $rank + * + * @return self + */ + public function setRank(?int $rank): self + { + $this->rank = $rank; + + return $this; + } + + /** + * Popularity. + * + * @return int|null + */ + public function getPopularity(): ?int + { + return $this->popularity; + } + + /** + * Popularity. + * + * @param int|null $popularity + * + * @return self + */ + public function setPopularity(?int $popularity): self + { + $this->popularity = $popularity; + + return $this; + } + + /** + * Number of users who have added this entry to their list. + * + * @return int|null + */ + public function getMembers(): ?int + { + return $this->members; + } + + /** + * Number of users who have added this entry to their list. + * + * @param int|null $members + * + * @return self + */ + public function setMembers(?int $members): self + { + $this->members = $members; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int|null + */ + public function getFavorites(): ?int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int|null $favorites + * + * @return self + */ + public function setFavorites(?int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Synopsis. + * + * @return string|null + */ + public function getSynopsis(): ?string + { + return $this->synopsis; + } + + /** + * Synopsis. + * + * @param string|null $synopsis + * + * @return self + */ + public function setSynopsis(?string $synopsis): self + { + $this->synopsis = $synopsis; + + return $this; + } + + /** + * Background. + * + * @return string|null + */ + public function getBackground(): ?string + { + return $this->background; + } + + /** + * Background. + * + * @param string|null $background + * + * @return self + */ + public function setBackground(?string $background): self + { + $this->background = $background; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getAuthors(): array + { + return $this->authors; + } + + /** + * @param MalUrl[] $authors + * + * @return self + */ + public function setAuthors(array $authors): self + { + $this->authors = $authors; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getSerializations(): array + { + return $this->serializations; + } + + /** + * @param MalUrl[] $serializations + * + * @return self + */ + public function setSerializations(array $serializations): self + { + $this->serializations = $serializations; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getGenres(): array + { + return $this->genres; + } + + /** + * @param MalUrl[] $genres + * + * @return self + */ + public function setGenres(array $genres): self + { + $this->genres = $genres; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getExplicitGenres(): array + { + return $this->explicitGenres; + } + + /** + * @param MalUrl[] $explicitGenres + * + * @return self + */ + public function setExplicitGenres(array $explicitGenres): self + { + $this->explicitGenres = $explicitGenres; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getThemes(): array + { + return $this->themes; + } + + /** + * @param MalUrl[] $themes + * + * @return self + */ + public function setThemes(array $themes): self + { + $this->themes = $themes; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getDemographics(): array + { + return $this->demographics; + } + + /** + * @param MalUrl[] $demographics + * + * @return self + */ + public function setDemographics(array $demographics): self + { + $this->demographics = $demographics; + + return $this; + } +} diff --git a/src/Model/MangaCharacters.php b/src/Model/MangaCharacters.php new file mode 100644 index 0000000..2aa4091 --- /dev/null +++ b/src/Model/MangaCharacters.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param MangaCharactersDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/MangaCharactersDataItem.php b/src/Model/MangaCharactersDataItem.php new file mode 100644 index 0000000..6ab54ec --- /dev/null +++ b/src/Model/MangaCharactersDataItem.php @@ -0,0 +1,61 @@ +character; + } + + /** + * @param CharacterMeta $character + * + * @return self + */ + public function setCharacter(CharacterMeta $character): self + { + $this->character = $character; + + return $this; + } + + /** + * Character's Role. + * + * @return string + */ + public function getRole(): string + { + return $this->role; + } + + /** + * Character's Role. + * + * @param string $role + * + * @return self + */ + public function setRole(string $role): self + { + $this->role = $role; + + return $this; + } +} diff --git a/src/Model/MangaFull.php b/src/Model/MangaFull.php new file mode 100644 index 0000000..d112386 --- /dev/null +++ b/src/Model/MangaFull.php @@ -0,0 +1,907 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return MangaImages + */ + public function getImages(): MangaImages + { + return $this->images; + } + + /** + * @param MangaImages $images + * + * @return self + */ + public function setImages(MangaImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Whether the entry is pending approval on MAL or not. + * + * @return bool + */ + public function getApproved(): bool + { + return $this->approved; + } + + /** + * Whether the entry is pending approval on MAL or not. + * + * @param bool $approved + * + * @return self + */ + public function setApproved(bool $approved): self + { + $this->approved = $approved; + + return $this; + } + + /** + * All Titles. + * + * @return string[] + */ + public function getTitles(): array + { + return $this->titles; + } + + /** + * All Titles. + * + * @param string[] $titles + * + * @return self + */ + public function setTitles(array $titles): self + { + $this->titles = $titles; + + return $this; + } + + /** + * Title. + * + * @deprecated + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @deprecated + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * English Title. + * + * @deprecated + * + * @return string|null + */ + public function getTitleEnglish(): ?string + { + return $this->titleEnglish; + } + + /** + * English Title. + * + * @param string|null $titleEnglish + * + * @deprecated + * + * @return self + */ + public function setTitleEnglish(?string $titleEnglish): self + { + $this->titleEnglish = $titleEnglish; + + return $this; + } + + /** + * Japanese Title. + * + * @deprecated + * + * @return string|null + */ + public function getTitleJapanese(): ?string + { + return $this->titleJapanese; + } + + /** + * Japanese Title. + * + * @param string|null $titleJapanese + * + * @deprecated + * + * @return self + */ + public function setTitleJapanese(?string $titleJapanese): self + { + $this->titleJapanese = $titleJapanese; + + return $this; + } + + /** + * Other Titles. + * + * @deprecated + * + * @return string[] + */ + public function getTitleSynonyms(): array + { + return $this->titleSynonyms; + } + + /** + * Other Titles. + * + * @param string[] $titleSynonyms + * + * @deprecated + * + * @return self + */ + public function setTitleSynonyms(array $titleSynonyms): self + { + $this->titleSynonyms = $titleSynonyms; + + return $this; + } + + /** + * Manga Type. + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * Manga Type. + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Chapter count. + * + * @return int|null + */ + public function getChapters(): ?int + { + return $this->chapters; + } + + /** + * Chapter count. + * + * @param int|null $chapters + * + * @return self + */ + public function setChapters(?int $chapters): self + { + $this->chapters = $chapters; + + return $this; + } + + /** + * Volume count. + * + * @return int|null + */ + public function getVolumes(): ?int + { + return $this->volumes; + } + + /** + * Volume count. + * + * @param int|null $volumes + * + * @return self + */ + public function setVolumes(?int $volumes): self + { + $this->volumes = $volumes; + + return $this; + } + + /** + * Publishing status. + * + * @return string + */ + public function getStatus(): string + { + return $this->status; + } + + /** + * Publishing status. + * + * @param string $status + * + * @return self + */ + public function setStatus(string $status): self + { + $this->status = $status; + + return $this; + } + + /** + * Publishing boolean. + * + * @return bool + */ + public function getPublishing(): bool + { + return $this->publishing; + } + + /** + * Publishing boolean. + * + * @param bool $publishing + * + * @return self + */ + public function setPublishing(bool $publishing): self + { + $this->publishing = $publishing; + + return $this; + } + + /** + * Date range. + * + * @return Daterange + */ + public function getPublished(): Daterange + { + return $this->published; + } + + /** + * Date range. + * + * @param Daterange $published + * + * @return self + */ + public function setPublished(Daterange $published): self + { + $this->published = $published; + + return $this; + } + + /** + * Score. + * + * @return float|null + */ + public function getScore(): ?float + { + return $this->score; + } + + /** + * Score. + * + * @param float|null $score + * + * @return self + */ + public function setScore(?float $score): self + { + $this->score = $score; + + return $this; + } + + /** + * Number of users. + * + * @return int|null + */ + public function getScoredBy(): ?int + { + return $this->scoredBy; + } + + /** + * Number of users. + * + * @param int|null $scoredBy + * + * @return self + */ + public function setScoredBy(?int $scoredBy): self + { + $this->scoredBy = $scoredBy; + + return $this; + } + + /** + * Ranking. + * + * @return int|null + */ + public function getRank(): ?int + { + return $this->rank; + } + + /** + * Ranking. + * + * @param int|null $rank + * + * @return self + */ + public function setRank(?int $rank): self + { + $this->rank = $rank; + + return $this; + } + + /** + * Popularity. + * + * @return int|null + */ + public function getPopularity(): ?int + { + return $this->popularity; + } + + /** + * Popularity. + * + * @param int|null $popularity + * + * @return self + */ + public function setPopularity(?int $popularity): self + { + $this->popularity = $popularity; + + return $this; + } + + /** + * Number of users who have added this entry to their list. + * + * @return int|null + */ + public function getMembers(): ?int + { + return $this->members; + } + + /** + * Number of users who have added this entry to their list. + * + * @param int|null $members + * + * @return self + */ + public function setMembers(?int $members): self + { + $this->members = $members; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int|null + */ + public function getFavorites(): ?int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int|null $favorites + * + * @return self + */ + public function setFavorites(?int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Synopsis. + * + * @return string|null + */ + public function getSynopsis(): ?string + { + return $this->synopsis; + } + + /** + * Synopsis. + * + * @param string|null $synopsis + * + * @return self + */ + public function setSynopsis(?string $synopsis): self + { + $this->synopsis = $synopsis; + + return $this; + } + + /** + * Background. + * + * @return string|null + */ + public function getBackground(): ?string + { + return $this->background; + } + + /** + * Background. + * + * @param string|null $background + * + * @return self + */ + public function setBackground(?string $background): self + { + $this->background = $background; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getAuthors(): array + { + return $this->authors; + } + + /** + * @param MalUrl[] $authors + * + * @return self + */ + public function setAuthors(array $authors): self + { + $this->authors = $authors; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getSerializations(): array + { + return $this->serializations; + } + + /** + * @param MalUrl[] $serializations + * + * @return self + */ + public function setSerializations(array $serializations): self + { + $this->serializations = $serializations; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getGenres(): array + { + return $this->genres; + } + + /** + * @param MalUrl[] $genres + * + * @return self + */ + public function setGenres(array $genres): self + { + $this->genres = $genres; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getExplicitGenres(): array + { + return $this->explicitGenres; + } + + /** + * @param MalUrl[] $explicitGenres + * + * @return self + */ + public function setExplicitGenres(array $explicitGenres): self + { + $this->explicitGenres = $explicitGenres; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getThemes(): array + { + return $this->themes; + } + + /** + * @param MalUrl[] $themes + * + * @return self + */ + public function setThemes(array $themes): self + { + $this->themes = $themes; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getDemographics(): array + { + return $this->demographics; + } + + /** + * @param MalUrl[] $demographics + * + * @return self + */ + public function setDemographics(array $demographics): self + { + $this->demographics = $demographics; + + return $this; + } + + /** + * @return MangaFullRelationsItem[] + */ + public function getRelations(): array + { + return $this->relations; + } + + /** + * @param MangaFullRelationsItem[] $relations + * + * @return self + */ + public function setRelations(array $relations): self + { + $this->relations = $relations; + + return $this; + } + + /** + * @return MangaFullExternalItem[] + */ + public function getExternal(): array + { + return $this->external; + } + + /** + * @param MangaFullExternalItem[] $external + * + * @return self + */ + public function setExternal(array $external): self + { + $this->external = $external; + + return $this; + } +} diff --git a/src/Model/MangaFullExternalItem.php b/src/Model/MangaFullExternalItem.php new file mode 100644 index 0000000..049b135 --- /dev/null +++ b/src/Model/MangaFullExternalItem.php @@ -0,0 +1,55 @@ +name; + } + + /** + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/MangaFullRelationsItem.php b/src/Model/MangaFullRelationsItem.php new file mode 100644 index 0000000..ea6f2cc --- /dev/null +++ b/src/Model/MangaFullRelationsItem.php @@ -0,0 +1,61 @@ +relation; + } + + /** + * Relation type. + * + * @param string $relation + * + * @return self + */ + public function setRelation(string $relation): self + { + $this->relation = $relation; + + return $this; + } + + /** + * @return MalUrl[] + */ + public function getEntry(): array + { + return $this->entry; + } + + /** + * @param MalUrl[] $entry + * + * @return self + */ + public function setEntry(array $entry): self + { + $this->entry = $entry; + + return $this; + } +} diff --git a/src/Model/MangaIdFullGetResponse200.php b/src/Model/MangaIdFullGetResponse200.php new file mode 100644 index 0000000..488f856 --- /dev/null +++ b/src/Model/MangaIdFullGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Manga Resource. + * + * @param MangaFull $data + * + * @return self + */ + public function setData(MangaFull $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/MangaIdGetResponse200.php b/src/Model/MangaIdGetResponse200.php new file mode 100644 index 0000000..36fd771 --- /dev/null +++ b/src/Model/MangaIdGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Manga Resource. + * + * @param Manga $data + * + * @return self + */ + public function setData(Manga $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/MangaIdRelationsGetResponse200.php b/src/Model/MangaIdRelationsGetResponse200.php new file mode 100644 index 0000000..d6e9eb3 --- /dev/null +++ b/src/Model/MangaIdRelationsGetResponse200.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param Relation[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/MangaImages.php b/src/Model/MangaImages.php new file mode 100644 index 0000000..46fd44e --- /dev/null +++ b/src/Model/MangaImages.php @@ -0,0 +1,67 @@ +jpg; + } + + /** + * Available images in JPG. + * + * @param MangaImagesJpg $jpg + * + * @return self + */ + public function setJpg(MangaImagesJpg $jpg): self + { + $this->jpg = $jpg; + + return $this; + } + + /** + * Available images in WEBP. + * + * @return MangaImagesWebp + */ + public function getWebp(): MangaImagesWebp + { + return $this->webp; + } + + /** + * Available images in WEBP. + * + * @param MangaImagesWebp $webp + * + * @return self + */ + public function setWebp(MangaImagesWebp $webp): self + { + $this->webp = $webp; + + return $this; + } +} diff --git a/src/Model/MangaImagesJpg.php b/src/Model/MangaImagesJpg.php new file mode 100644 index 0000000..7ab1590 --- /dev/null +++ b/src/Model/MangaImagesJpg.php @@ -0,0 +1,97 @@ +imageUrl; + } + + /** + * Image URL JPG. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Small Image URL JPG. + * + * @return string|null + */ + public function getSmallImageUrl(): ?string + { + return $this->smallImageUrl; + } + + /** + * Small Image URL JPG. + * + * @param string|null $smallImageUrl + * + * @return self + */ + public function setSmallImageUrl(?string $smallImageUrl): self + { + $this->smallImageUrl = $smallImageUrl; + + return $this; + } + + /** + * Image URL JPG. + * + * @return string|null + */ + public function getLargeImageUrl(): ?string + { + return $this->largeImageUrl; + } + + /** + * Image URL JPG. + * + * @param string|null $largeImageUrl + * + * @return self + */ + public function setLargeImageUrl(?string $largeImageUrl): self + { + $this->largeImageUrl = $largeImageUrl; + + return $this; + } +} diff --git a/src/Model/MangaImagesWebp.php b/src/Model/MangaImagesWebp.php new file mode 100644 index 0000000..a3e242e --- /dev/null +++ b/src/Model/MangaImagesWebp.php @@ -0,0 +1,97 @@ +imageUrl; + } + + /** + * Image URL WEBP. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Small Image URL WEBP. + * + * @return string|null + */ + public function getSmallImageUrl(): ?string + { + return $this->smallImageUrl; + } + + /** + * Small Image URL WEBP. + * + * @param string|null $smallImageUrl + * + * @return self + */ + public function setSmallImageUrl(?string $smallImageUrl): self + { + $this->smallImageUrl = $smallImageUrl; + + return $this; + } + + /** + * Image URL WEBP. + * + * @return string|null + */ + public function getLargeImageUrl(): ?string + { + return $this->largeImageUrl; + } + + /** + * Image URL WEBP. + * + * @param string|null $largeImageUrl + * + * @return self + */ + public function setLargeImageUrl(?string $largeImageUrl): self + { + $this->largeImageUrl = $largeImageUrl; + + return $this; + } +} diff --git a/src/Model/MangaMeta.php b/src/Model/MangaMeta.php new file mode 100644 index 0000000..8ae6cce --- /dev/null +++ b/src/Model/MangaMeta.php @@ -0,0 +1,121 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return MangaImages + */ + public function getImages(): MangaImages + { + return $this->images; + } + + /** + * @param MangaImages $images + * + * @return self + */ + public function setImages(MangaImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Entry title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Entry title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } +} diff --git a/src/Model/MangaNews.php b/src/Model/MangaNews.php new file mode 100644 index 0000000..49fce2b --- /dev/null +++ b/src/Model/MangaNews.php @@ -0,0 +1,55 @@ +pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } + + /** + * @return NewsDataItem[] + */ + public function getData(): array + { + return $this->data; + } + + /** + * @param NewsDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/MangaPictures.php b/src/Model/MangaPictures.php new file mode 100644 index 0000000..83ba557 --- /dev/null +++ b/src/Model/MangaPictures.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param MangaImages[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/MangaReview.php b/src/Model/MangaReview.php new file mode 100644 index 0000000..411b2f6 --- /dev/null +++ b/src/Model/MangaReview.php @@ -0,0 +1,247 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Entry Type. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Entry Type. + * + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Number of user votes on the Review. + * + * @return int + */ + public function getVotes(): int + { + return $this->votes; + } + + /** + * Number of user votes on the Review. + * + * @param int $votes + * + * @return self + */ + public function setVotes(int $votes): self + { + $this->votes = $votes; + + return $this; + } + + /** + * Review created date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Review created date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } + + /** + * Number of chapters read by the reviewer. + * + * @return int + */ + public function getChaptersRead(): int + { + return $this->chaptersRead; + } + + /** + * Number of chapters read by the reviewer. + * + * @param int $chaptersRead + * + * @return self + */ + public function setChaptersRead(int $chaptersRead): self + { + $this->chaptersRead = $chaptersRead; + + return $this; + } + + /** + * Review content. + * + * @return string + */ + public function getReview(): string + { + return $this->review; + } + + /** + * Review content. + * + * @param string $review + * + * @return self + */ + public function setReview(string $review): self + { + $this->review = $review; + + return $this; + } + + /** + * Review Scores breakdown. + * + * @return MangaReviewScores + */ + public function getScores(): MangaReviewScores + { + return $this->scores; + } + + /** + * Review Scores breakdown. + * + * @param MangaReviewScores $scores + * + * @return self + */ + public function setScores(MangaReviewScores $scores): self + { + $this->scores = $scores; + + return $this; + } +} diff --git a/src/Model/MangaReviewScores.php b/src/Model/MangaReviewScores.php new file mode 100644 index 0000000..29b36a6 --- /dev/null +++ b/src/Model/MangaReviewScores.php @@ -0,0 +1,157 @@ +overall; + } + + /** + * Overall Score. + * + * @param int $overall + * + * @return self + */ + public function setOverall(int $overall): self + { + $this->overall = $overall; + + return $this; + } + + /** + * Story Score. + * + * @return int + */ + public function getStory(): int + { + return $this->story; + } + + /** + * Story Score. + * + * @param int $story + * + * @return self + */ + public function setStory(int $story): self + { + $this->story = $story; + + return $this; + } + + /** + * Art Score. + * + * @return int + */ + public function getArt(): int + { + return $this->art; + } + + /** + * Art Score. + * + * @param int $art + * + * @return self + */ + public function setArt(int $art): self + { + $this->art = $art; + + return $this; + } + + /** + * Character Score. + * + * @return int + */ + public function getCharacter(): int + { + return $this->character; + } + + /** + * Character Score. + * + * @param int $character + * + * @return self + */ + public function setCharacter(int $character): self + { + $this->character = $character; + + return $this; + } + + /** + * Enjoyment Score. + * + * @return int + */ + public function getEnjoyment(): int + { + return $this->enjoyment; + } + + /** + * Enjoyment Score. + * + * @param int $enjoyment + * + * @return self + */ + public function setEnjoyment(int $enjoyment): self + { + $this->enjoyment = $enjoyment; + + return $this; + } +} diff --git a/src/Model/MangaReviews.php b/src/Model/MangaReviews.php new file mode 100644 index 0000000..8a31a56 --- /dev/null +++ b/src/Model/MangaReviews.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param MangaReviewsdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/MangaReviewsdataItem.php b/src/Model/MangaReviewsdataItem.php new file mode 100644 index 0000000..a027320 --- /dev/null +++ b/src/Model/MangaReviewsdataItem.php @@ -0,0 +1,271 @@ +user; + } + + /** + * @param UserMeta $user + * + * @return self + */ + public function setUser(UserMeta $user): self + { + $this->user = $user; + + return $this; + } + + /** + * MyAnimeList ID. + * + * @return int + */ + public function getMalId(): int + { + return $this->malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Entry Type. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Entry Type. + * + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Number of user votes on the Review. + * + * @return int + */ + public function getVotes(): int + { + return $this->votes; + } + + /** + * Number of user votes on the Review. + * + * @param int $votes + * + * @return self + */ + public function setVotes(int $votes): self + { + $this->votes = $votes; + + return $this; + } + + /** + * Review created date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Review created date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } + + /** + * Number of chapters read by the reviewer. + * + * @return int + */ + public function getChaptersRead(): int + { + return $this->chaptersRead; + } + + /** + * Number of chapters read by the reviewer. + * + * @param int $chaptersRead + * + * @return self + */ + public function setChaptersRead(int $chaptersRead): self + { + $this->chaptersRead = $chaptersRead; + + return $this; + } + + /** + * Review content. + * + * @return string + */ + public function getReview(): string + { + return $this->review; + } + + /** + * Review content. + * + * @param string $review + * + * @return self + */ + public function setReview(string $review): self + { + $this->review = $review; + + return $this; + } + + /** + * Review Scores breakdown. + * + * @return MangaReviewScores + */ + public function getScores(): MangaReviewScores + { + return $this->scores; + } + + /** + * Review Scores breakdown. + * + * @param MangaReviewScores $scores + * + * @return self + */ + public function setScores(MangaReviewScores $scores): self + { + $this->scores = $scores; + + return $this; + } +} diff --git a/src/Model/MangaSearch.php b/src/Model/MangaSearch.php new file mode 100644 index 0000000..6796fb8 --- /dev/null +++ b/src/Model/MangaSearch.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param Manga[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPlusPagination + */ + public function getPagination(): PaginationPlusPagination + { + return $this->pagination; + } + + /** + * @param PaginationPlusPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPlusPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/MangaStatistics.php b/src/Model/MangaStatistics.php new file mode 100644 index 0000000..28938cc --- /dev/null +++ b/src/Model/MangaStatistics.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param MangaStatisticsData $data + * + * @return self + */ + public function setData(MangaStatisticsData $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/MangaStatisticsData.php b/src/Model/MangaStatisticsData.php new file mode 100644 index 0000000..70ab5c5 --- /dev/null +++ b/src/Model/MangaStatisticsData.php @@ -0,0 +1,211 @@ +reading; + } + + /** + * Number of users reading the resource. + * + * @param int $reading + * + * @return self + */ + public function setReading(int $reading): self + { + $this->reading = $reading; + + return $this; + } + + /** + * Number of users who have completed the resource. + * + * @return int + */ + public function getCompleted(): int + { + return $this->completed; + } + + /** + * Number of users who have completed the resource. + * + * @param int $completed + * + * @return self + */ + public function setCompleted(int $completed): self + { + $this->completed = $completed; + + return $this; + } + + /** + * Number of users who have put the resource on hold. + * + * @return int + */ + public function getOnHold(): int + { + return $this->onHold; + } + + /** + * Number of users who have put the resource on hold. + * + * @param int $onHold + * + * @return self + */ + public function setOnHold(int $onHold): self + { + $this->onHold = $onHold; + + return $this; + } + + /** + * Number of users who have dropped the resource. + * + * @return int + */ + public function getDropped(): int + { + return $this->dropped; + } + + /** + * Number of users who have dropped the resource. + * + * @param int $dropped + * + * @return self + */ + public function setDropped(int $dropped): self + { + $this->dropped = $dropped; + + return $this; + } + + /** + * Number of users who have planned to read the resource. + * + * @return int + */ + public function getPlanToRead(): int + { + return $this->planToRead; + } + + /** + * Number of users who have planned to read the resource. + * + * @param int $planToRead + * + * @return self + */ + public function setPlanToRead(int $planToRead): self + { + $this->planToRead = $planToRead; + + return $this; + } + + /** + * Total number of users who have the resource added to their lists. + * + * @return int + */ + public function getTotal(): int + { + return $this->total; + } + + /** + * Total number of users who have the resource added to their lists. + * + * @param int $total + * + * @return self + */ + public function setTotal(int $total): self + { + $this->total = $total; + + return $this; + } + + /** + * @return MangaStatisticsDataScoresItem[] + */ + public function getScores(): array + { + return $this->scores; + } + + /** + * @param MangaStatisticsDataScoresItem[] $scores + * + * @return self + */ + public function setScores(array $scores): self + { + $this->scores = $scores; + + return $this; + } +} diff --git a/src/Model/MangaStatisticsDataScoresItem.php b/src/Model/MangaStatisticsDataScoresItem.php new file mode 100644 index 0000000..7626297 --- /dev/null +++ b/src/Model/MangaStatisticsDataScoresItem.php @@ -0,0 +1,97 @@ +score; + } + + /** + * Scoring value. + * + * @param int $score + * + * @return self + */ + public function setScore(int $score): self + { + $this->score = $score; + + return $this; + } + + /** + * Number of votes for this score. + * + * @return int + */ + public function getVotes(): int + { + return $this->votes; + } + + /** + * Number of votes for this score. + * + * @param int $votes + * + * @return self + */ + public function setVotes(int $votes): self + { + $this->votes = $votes; + + return $this; + } + + /** + * Percentage of votes for this score. + * + * @return float + */ + public function getPercentage(): float + { + return $this->percentage; + } + + /** + * Percentage of votes for this score. + * + * @param float $percentage + * + * @return self + */ + public function setPercentage(float $percentage): self + { + $this->percentage = $percentage; + + return $this; + } +} diff --git a/src/Model/MangaUserupdates.php b/src/Model/MangaUserupdates.php new file mode 100644 index 0000000..98c0332 --- /dev/null +++ b/src/Model/MangaUserupdates.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param MangaUserupdatesdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/MangaUserupdatesdataItem.php b/src/Model/MangaUserupdatesdataItem.php new file mode 100644 index 0000000..5f38547 --- /dev/null +++ b/src/Model/MangaUserupdatesdataItem.php @@ -0,0 +1,241 @@ +user; + } + + /** + * @param UserMeta $user + * + * @return self + */ + public function setUser(UserMeta $user): self + { + $this->user = $user; + + return $this; + } + + /** + * User Score. + * + * @return int|null + */ + public function getScore(): ?int + { + return $this->score; + } + + /** + * User Score. + * + * @param int|null $score + * + * @return self + */ + public function setScore(?int $score): self + { + $this->score = $score; + + return $this; + } + + /** + * User list status. + * + * @return string + */ + public function getStatus(): string + { + return $this->status; + } + + /** + * User list status. + * + * @param string $status + * + * @return self + */ + public function setStatus(string $status): self + { + $this->status = $status; + + return $this; + } + + /** + * Number of volumes read. + * + * @return int + */ + public function getVolumesRead(): int + { + return $this->volumesRead; + } + + /** + * Number of volumes read. + * + * @param int $volumesRead + * + * @return self + */ + public function setVolumesRead(int $volumesRead): self + { + $this->volumesRead = $volumesRead; + + return $this; + } + + /** + * Total number of volumes. + * + * @return int + */ + public function getVolumesTotal(): int + { + return $this->volumesTotal; + } + + /** + * Total number of volumes. + * + * @param int $volumesTotal + * + * @return self + */ + public function setVolumesTotal(int $volumesTotal): self + { + $this->volumesTotal = $volumesTotal; + + return $this; + } + + /** + * Number of chapters read. + * + * @return int + */ + public function getChaptersRead(): int + { + return $this->chaptersRead; + } + + /** + * Number of chapters read. + * + * @param int $chaptersRead + * + * @return self + */ + public function setChaptersRead(int $chaptersRead): self + { + $this->chaptersRead = $chaptersRead; + + return $this; + } + + /** + * Total number of chapters. + * + * @return int + */ + public function getChaptersTotal(): int + { + return $this->chaptersTotal; + } + + /** + * Total number of chapters. + * + * @param int $chaptersTotal + * + * @return self + */ + public function setChaptersTotal(int $chaptersTotal): self + { + $this->chaptersTotal = $chaptersTotal; + + return $this; + } + + /** + * Last updated date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Last updated date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } +} diff --git a/src/Model/Moreinfo.php b/src/Model/Moreinfo.php new file mode 100644 index 0000000..349e640 --- /dev/null +++ b/src/Model/Moreinfo.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param MoreinfoData $data + * + * @return self + */ + public function setData(MoreinfoData $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/MoreinfoData.php b/src/Model/MoreinfoData.php new file mode 100644 index 0000000..151cec3 --- /dev/null +++ b/src/Model/MoreinfoData.php @@ -0,0 +1,37 @@ +moreinfo; + } + + /** + * Additional information on the entry. + * + * @param string|null $moreinfo + * + * @return self + */ + public function setMoreinfo(?string $moreinfo): self + { + $this->moreinfo = $moreinfo; + + return $this; + } +} diff --git a/src/Model/News.php b/src/Model/News.php new file mode 100644 index 0000000..d7ceb16 --- /dev/null +++ b/src/Model/News.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param NewsDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/NewsDataItem.php b/src/Model/NewsDataItem.php new file mode 100644 index 0000000..a34c194 --- /dev/null +++ b/src/Model/NewsDataItem.php @@ -0,0 +1,301 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * Post Date ISO8601. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * Post Date ISO8601. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } + + /** + * Author MyAnimeList Username. + * + * @return string + */ + public function getAuthorUsername(): string + { + return $this->authorUsername; + } + + /** + * Author MyAnimeList Username. + * + * @param string $authorUsername + * + * @return self + */ + public function setAuthorUsername(string $authorUsername): self + { + $this->authorUsername = $authorUsername; + + return $this; + } + + /** + * Author Profile URL. + * + * @return string + */ + public function getAuthorUrl(): string + { + return $this->authorUrl; + } + + /** + * Author Profile URL. + * + * @param string $authorUrl + * + * @return self + */ + public function setAuthorUrl(string $authorUrl): self + { + $this->authorUrl = $authorUrl; + + return $this; + } + + /** + * Forum topic URL. + * + * @return string + */ + public function getForumUrl(): string + { + return $this->forumUrl; + } + + /** + * Forum topic URL. + * + * @param string $forumUrl + * + * @return self + */ + public function setForumUrl(string $forumUrl): self + { + $this->forumUrl = $forumUrl; + + return $this; + } + + /** + * @return CommonImages + */ + public function getImages(): CommonImages + { + return $this->images; + } + + /** + * @param CommonImages $images + * + * @return self + */ + public function setImages(CommonImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Comment count. + * + * @return int + */ + public function getComments(): int + { + return $this->comments; + } + + /** + * Comment count. + * + * @param int $comments + * + * @return self + */ + public function setComments(int $comments): self + { + $this->comments = $comments; + + return $this; + } + + /** + * Excerpt. + * + * @return string + */ + public function getExcerpt(): string + { + return $this->excerpt; + } + + /** + * Excerpt. + * + * @param string $excerpt + * + * @return self + */ + public function setExcerpt(string $excerpt): self + { + $this->excerpt = $excerpt; + + return $this; + } +} diff --git a/src/Model/Pagination.php b/src/Model/Pagination.php new file mode 100644 index 0000000..9efca87 --- /dev/null +++ b/src/Model/Pagination.php @@ -0,0 +1,31 @@ +pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/PaginationPagination.php b/src/Model/PaginationPagination.php new file mode 100644 index 0000000..771cf21 --- /dev/null +++ b/src/Model/PaginationPagination.php @@ -0,0 +1,55 @@ +lastVisiblePage; + } + + /** + * @param int $lastVisiblePage + * + * @return self + */ + public function setLastVisiblePage(int $lastVisiblePage): self + { + $this->lastVisiblePage = $lastVisiblePage; + + return $this; + } + + /** + * @return bool + */ + public function getHasNextPage(): bool + { + return $this->hasNextPage; + } + + /** + * @param bool $hasNextPage + * + * @return self + */ + public function setHasNextPage(bool $hasNextPage): self + { + $this->hasNextPage = $hasNextPage; + + return $this; + } +} diff --git a/src/Model/PaginationPlus.php b/src/Model/PaginationPlus.php new file mode 100644 index 0000000..7c11816 --- /dev/null +++ b/src/Model/PaginationPlus.php @@ -0,0 +1,31 @@ +pagination; + } + + /** + * @param PaginationPlusPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPlusPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/PaginationPlusPagination.php b/src/Model/PaginationPlusPagination.php new file mode 100644 index 0000000..cc6c6d0 --- /dev/null +++ b/src/Model/PaginationPlusPagination.php @@ -0,0 +1,79 @@ +lastVisiblePage; + } + + /** + * @param int $lastVisiblePage + * + * @return self + */ + public function setLastVisiblePage(int $lastVisiblePage): self + { + $this->lastVisiblePage = $lastVisiblePage; + + return $this; + } + + /** + * @return bool + */ + public function getHasNextPage(): bool + { + return $this->hasNextPage; + } + + /** + * @param bool $hasNextPage + * + * @return self + */ + public function setHasNextPage(bool $hasNextPage): self + { + $this->hasNextPage = $hasNextPage; + + return $this; + } + + /** + * @return PaginationPlusPaginationItems + */ + public function getItems(): PaginationPlusPaginationItems + { + return $this->items; + } + + /** + * @param PaginationPlusPaginationItems $items + * + * @return self + */ + public function setItems(PaginationPlusPaginationItems $items): self + { + $this->items = $items; + + return $this; + } +} diff --git a/src/Model/PaginationPlusPaginationItems.php b/src/Model/PaginationPlusPaginationItems.php new file mode 100644 index 0000000..c0c46c8 --- /dev/null +++ b/src/Model/PaginationPlusPaginationItems.php @@ -0,0 +1,79 @@ +count; + } + + /** + * @param int $count + * + * @return self + */ + public function setCount(int $count): self + { + $this->count = $count; + + return $this; + } + + /** + * @return int + */ + public function getTotal(): int + { + return $this->total; + } + + /** + * @param int $total + * + * @return self + */ + public function setTotal(int $total): self + { + $this->total = $total; + + return $this; + } + + /** + * @return int + */ + public function getPerPage(): int + { + return $this->perPage; + } + + /** + * @param int $perPage + * + * @return self + */ + public function setPerPage(int $perPage): self + { + $this->perPage = $perPage; + + return $this; + } +} diff --git a/src/Model/PeopleIdFullGetResponse200.php b/src/Model/PeopleIdFullGetResponse200.php new file mode 100644 index 0000000..e15b26a --- /dev/null +++ b/src/Model/PeopleIdFullGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Person Resource. + * + * @param PersonFull $data + * + * @return self + */ + public function setData(PersonFull $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/PeopleIdGetResponse200.php b/src/Model/PeopleIdGetResponse200.php new file mode 100644 index 0000000..3b14853 --- /dev/null +++ b/src/Model/PeopleIdGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Person Resource. + * + * @param Person $data + * + * @return self + */ + public function setData(Person $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/PeopleImages.php b/src/Model/PeopleImages.php new file mode 100644 index 0000000..ff54d10 --- /dev/null +++ b/src/Model/PeopleImages.php @@ -0,0 +1,37 @@ +jpg; + } + + /** + * Available images in JPG. + * + * @param PeopleImagesJpg $jpg + * + * @return self + */ + public function setJpg(PeopleImagesJpg $jpg): self + { + $this->jpg = $jpg; + + return $this; + } +} diff --git a/src/Model/PeopleImagesJpg.php b/src/Model/PeopleImagesJpg.php new file mode 100644 index 0000000..61099e3 --- /dev/null +++ b/src/Model/PeopleImagesJpg.php @@ -0,0 +1,37 @@ +imageUrl; + } + + /** + * Image URL JPG. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } +} diff --git a/src/Model/PeopleSearch.php b/src/Model/PeopleSearch.php new file mode 100644 index 0000000..e0756c0 --- /dev/null +++ b/src/Model/PeopleSearch.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param PeopleSearchdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPlusPagination + */ + public function getPagination(): PaginationPlusPagination + { + return $this->pagination; + } + + /** + * @param PaginationPlusPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPlusPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/PeopleSearchdataItem.php b/src/Model/PeopleSearchdataItem.php new file mode 100644 index 0000000..ae8745f --- /dev/null +++ b/src/Model/PeopleSearchdataItem.php @@ -0,0 +1,331 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Person's website URL. + * + * @return string|null + */ + public function getWebsiteUrl(): ?string + { + return $this->websiteUrl; + } + + /** + * Person's website URL. + * + * @param string|null $websiteUrl + * + * @return self + */ + public function setWebsiteUrl(?string $websiteUrl): self + { + $this->websiteUrl = $websiteUrl; + + return $this; + } + + /** + * @return PeopleImages + */ + public function getImages(): PeopleImages + { + return $this->images; + } + + /** + * @param PeopleImages $images + * + * @return self + */ + public function setImages(PeopleImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Given Name. + * + * @return string|null + */ + public function getGivenName(): ?string + { + return $this->givenName; + } + + /** + * Given Name. + * + * @param string|null $givenName + * + * @return self + */ + public function setGivenName(?string $givenName): self + { + $this->givenName = $givenName; + + return $this; + } + + /** + * Family Name. + * + * @return string|null + */ + public function getFamilyName(): ?string + { + return $this->familyName; + } + + /** + * Family Name. + * + * @param string|null $familyName + * + * @return self + */ + public function setFamilyName(?string $familyName): self + { + $this->familyName = $familyName; + + return $this; + } + + /** + * Other Names. + * + * @return string[] + */ + public function getAlternateNames(): array + { + return $this->alternateNames; + } + + /** + * Other Names. + * + * @param string[] $alternateNames + * + * @return self + */ + public function setAlternateNames(array $alternateNames): self + { + $this->alternateNames = $alternateNames; + + return $this; + } + + /** + * Birthday Date ISO8601. + * + * @return string|null + */ + public function getBirthday(): ?string + { + return $this->birthday; + } + + /** + * Birthday Date ISO8601. + * + * @param string|null $birthday + * + * @return self + */ + public function setBirthday(?string $birthday): self + { + $this->birthday = $birthday; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int + */ + public function getFavorites(): int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int $favorites + * + * @return self + */ + public function setFavorites(int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Biography. + * + * @return string|null + */ + public function getAbout(): ?string + { + return $this->about; + } + + /** + * Biography. + * + * @param string|null $about + * + * @return self + */ + public function setAbout(?string $about): self + { + $this->about = $about; + + return $this; + } +} diff --git a/src/Model/Person.php b/src/Model/Person.php new file mode 100644 index 0000000..46f5dad --- /dev/null +++ b/src/Model/Person.php @@ -0,0 +1,331 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Person's website URL. + * + * @return string|null + */ + public function getWebsiteUrl(): ?string + { + return $this->websiteUrl; + } + + /** + * Person's website URL. + * + * @param string|null $websiteUrl + * + * @return self + */ + public function setWebsiteUrl(?string $websiteUrl): self + { + $this->websiteUrl = $websiteUrl; + + return $this; + } + + /** + * @return PeopleImages + */ + public function getImages(): PeopleImages + { + return $this->images; + } + + /** + * @param PeopleImages $images + * + * @return self + */ + public function setImages(PeopleImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Given Name. + * + * @return string|null + */ + public function getGivenName(): ?string + { + return $this->givenName; + } + + /** + * Given Name. + * + * @param string|null $givenName + * + * @return self + */ + public function setGivenName(?string $givenName): self + { + $this->givenName = $givenName; + + return $this; + } + + /** + * Family Name. + * + * @return string|null + */ + public function getFamilyName(): ?string + { + return $this->familyName; + } + + /** + * Family Name. + * + * @param string|null $familyName + * + * @return self + */ + public function setFamilyName(?string $familyName): self + { + $this->familyName = $familyName; + + return $this; + } + + /** + * Other Names. + * + * @return string[] + */ + public function getAlternateNames(): array + { + return $this->alternateNames; + } + + /** + * Other Names. + * + * @param string[] $alternateNames + * + * @return self + */ + public function setAlternateNames(array $alternateNames): self + { + $this->alternateNames = $alternateNames; + + return $this; + } + + /** + * Birthday Date ISO8601. + * + * @return string|null + */ + public function getBirthday(): ?string + { + return $this->birthday; + } + + /** + * Birthday Date ISO8601. + * + * @param string|null $birthday + * + * @return self + */ + public function setBirthday(?string $birthday): self + { + $this->birthday = $birthday; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int + */ + public function getFavorites(): int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int $favorites + * + * @return self + */ + public function setFavorites(int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Biography. + * + * @return string|null + */ + public function getAbout(): ?string + { + return $this->about; + } + + /** + * Biography. + * + * @param string|null $about + * + * @return self + */ + public function setAbout(?string $about): self + { + $this->about = $about; + + return $this; + } +} diff --git a/src/Model/PersonAnime.php b/src/Model/PersonAnime.php new file mode 100644 index 0000000..28ff8f7 --- /dev/null +++ b/src/Model/PersonAnime.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param PersonAnimeDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/PersonAnimeDataItem.php b/src/Model/PersonAnimeDataItem.php new file mode 100644 index 0000000..2c59185 --- /dev/null +++ b/src/Model/PersonAnimeDataItem.php @@ -0,0 +1,61 @@ +position; + } + + /** + * Person's position. + * + * @param string $position + * + * @return self + */ + public function setPosition(string $position): self + { + $this->position = $position; + + return $this; + } + + /** + * @return AnimeMeta + */ + public function getAnime(): AnimeMeta + { + return $this->anime; + } + + /** + * @param AnimeMeta $anime + * + * @return self + */ + public function setAnime(AnimeMeta $anime): self + { + $this->anime = $anime; + + return $this; + } +} diff --git a/src/Model/PersonFull.php b/src/Model/PersonFull.php new file mode 100644 index 0000000..d316045 --- /dev/null +++ b/src/Model/PersonFull.php @@ -0,0 +1,403 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Person's website URL. + * + * @return string|null + */ + public function getWebsiteUrl(): ?string + { + return $this->websiteUrl; + } + + /** + * Person's website URL. + * + * @param string|null $websiteUrl + * + * @return self + */ + public function setWebsiteUrl(?string $websiteUrl): self + { + $this->websiteUrl = $websiteUrl; + + return $this; + } + + /** + * @return PeopleImages + */ + public function getImages(): PeopleImages + { + return $this->images; + } + + /** + * @param PeopleImages $images + * + * @return self + */ + public function setImages(PeopleImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Given Name. + * + * @return string|null + */ + public function getGivenName(): ?string + { + return $this->givenName; + } + + /** + * Given Name. + * + * @param string|null $givenName + * + * @return self + */ + public function setGivenName(?string $givenName): self + { + $this->givenName = $givenName; + + return $this; + } + + /** + * Family Name. + * + * @return string|null + */ + public function getFamilyName(): ?string + { + return $this->familyName; + } + + /** + * Family Name. + * + * @param string|null $familyName + * + * @return self + */ + public function setFamilyName(?string $familyName): self + { + $this->familyName = $familyName; + + return $this; + } + + /** + * Other Names. + * + * @return string[] + */ + public function getAlternateNames(): array + { + return $this->alternateNames; + } + + /** + * Other Names. + * + * @param string[] $alternateNames + * + * @return self + */ + public function setAlternateNames(array $alternateNames): self + { + $this->alternateNames = $alternateNames; + + return $this; + } + + /** + * Birthday Date ISO8601. + * + * @return string|null + */ + public function getBirthday(): ?string + { + return $this->birthday; + } + + /** + * Birthday Date ISO8601. + * + * @param string|null $birthday + * + * @return self + */ + public function setBirthday(?string $birthday): self + { + $this->birthday = $birthday; + + return $this; + } + + /** + * Number of users who have favorited this entry. + * + * @return int + */ + public function getFavorites(): int + { + return $this->favorites; + } + + /** + * Number of users who have favorited this entry. + * + * @param int $favorites + * + * @return self + */ + public function setFavorites(int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Biography. + * + * @return string|null + */ + public function getAbout(): ?string + { + return $this->about; + } + + /** + * Biography. + * + * @param string|null $about + * + * @return self + */ + public function setAbout(?string $about): self + { + $this->about = $about; + + return $this; + } + + /** + * @return PersonFullAnimeItem[] + */ + public function getAnime(): array + { + return $this->anime; + } + + /** + * @param PersonFullAnimeItem[] $anime + * + * @return self + */ + public function setAnime(array $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * @return PersonFullMangaItem[] + */ + public function getManga(): array + { + return $this->manga; + } + + /** + * @param PersonFullMangaItem[] $manga + * + * @return self + */ + public function setManga(array $manga): self + { + $this->manga = $manga; + + return $this; + } + + /** + * @return PersonFullVoicesItem[] + */ + public function getVoices(): array + { + return $this->voices; + } + + /** + * @param PersonFullVoicesItem[] $voices + * + * @return self + */ + public function setVoices(array $voices): self + { + $this->voices = $voices; + + return $this; + } +} diff --git a/src/Model/PersonFullAnimeItem.php b/src/Model/PersonFullAnimeItem.php new file mode 100644 index 0000000..e196cd7 --- /dev/null +++ b/src/Model/PersonFullAnimeItem.php @@ -0,0 +1,61 @@ +position; + } + + /** + * Person's position. + * + * @param string $position + * + * @return self + */ + public function setPosition(string $position): self + { + $this->position = $position; + + return $this; + } + + /** + * @return AnimeMeta + */ + public function getAnime(): AnimeMeta + { + return $this->anime; + } + + /** + * @param AnimeMeta $anime + * + * @return self + */ + public function setAnime(AnimeMeta $anime): self + { + $this->anime = $anime; + + return $this; + } +} diff --git a/src/Model/PersonFullMangaItem.php b/src/Model/PersonFullMangaItem.php new file mode 100644 index 0000000..f13d6e8 --- /dev/null +++ b/src/Model/PersonFullMangaItem.php @@ -0,0 +1,61 @@ +position; + } + + /** + * Person's position. + * + * @param string $position + * + * @return self + */ + public function setPosition(string $position): self + { + $this->position = $position; + + return $this; + } + + /** + * @return MangaMeta + */ + public function getManga(): MangaMeta + { + return $this->manga; + } + + /** + * @param MangaMeta $manga + * + * @return self + */ + public function setManga(MangaMeta $manga): self + { + $this->manga = $manga; + + return $this; + } +} diff --git a/src/Model/PersonFullVoicesItem.php b/src/Model/PersonFullVoicesItem.php new file mode 100644 index 0000000..ac7075d --- /dev/null +++ b/src/Model/PersonFullVoicesItem.php @@ -0,0 +1,85 @@ +role; + } + + /** + * Person's Character's role in the anime. + * + * @param string $role + * + * @return self + */ + public function setRole(string $role): self + { + $this->role = $role; + + return $this; + } + + /** + * @return AnimeMeta + */ + public function getAnime(): AnimeMeta + { + return $this->anime; + } + + /** + * @param AnimeMeta $anime + * + * @return self + */ + public function setAnime(AnimeMeta $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * @return CharacterMeta + */ + public function getCharacter(): CharacterMeta + { + return $this->character; + } + + /** + * @param CharacterMeta $character + * + * @return self + */ + public function setCharacter(CharacterMeta $character): self + { + $this->character = $character; + + return $this; + } +} diff --git a/src/Model/PersonManga.php b/src/Model/PersonManga.php new file mode 100644 index 0000000..67de02c --- /dev/null +++ b/src/Model/PersonManga.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param PersonMangaDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/PersonMangaDataItem.php b/src/Model/PersonMangaDataItem.php new file mode 100644 index 0000000..3dc1147 --- /dev/null +++ b/src/Model/PersonMangaDataItem.php @@ -0,0 +1,61 @@ +position; + } + + /** + * Person's position. + * + * @param string $position + * + * @return self + */ + public function setPosition(string $position): self + { + $this->position = $position; + + return $this; + } + + /** + * @return MangaMeta + */ + public function getManga(): MangaMeta + { + return $this->manga; + } + + /** + * @param MangaMeta $manga + * + * @return self + */ + public function setManga(MangaMeta $manga): self + { + $this->manga = $manga; + + return $this; + } +} diff --git a/src/Model/PersonMeta.php b/src/Model/PersonMeta.php new file mode 100644 index 0000000..68b8b27 --- /dev/null +++ b/src/Model/PersonMeta.php @@ -0,0 +1,121 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return PeopleImages + */ + public function getImages(): PeopleImages + { + return $this->images; + } + + /** + * @param PeopleImages $images + * + * @return self + */ + public function setImages(PeopleImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Entry name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Entry name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } +} diff --git a/src/Model/PersonPictures.php b/src/Model/PersonPictures.php new file mode 100644 index 0000000..13d5e64 --- /dev/null +++ b/src/Model/PersonPictures.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param PeopleImages[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/PersonVoiceActingRoles.php b/src/Model/PersonVoiceActingRoles.php new file mode 100644 index 0000000..01c2bad --- /dev/null +++ b/src/Model/PersonVoiceActingRoles.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param PersonVoiceActingRolesDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/PersonVoiceActingRolesDataItem.php b/src/Model/PersonVoiceActingRolesDataItem.php new file mode 100644 index 0000000..4e8ecc7 --- /dev/null +++ b/src/Model/PersonVoiceActingRolesDataItem.php @@ -0,0 +1,85 @@ +role; + } + + /** + * Person's Character's role in the anime. + * + * @param string $role + * + * @return self + */ + public function setRole(string $role): self + { + $this->role = $role; + + return $this; + } + + /** + * @return AnimeMeta + */ + public function getAnime(): AnimeMeta + { + return $this->anime; + } + + /** + * @param AnimeMeta $anime + * + * @return self + */ + public function setAnime(AnimeMeta $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * @return CharacterMeta + */ + public function getCharacter(): CharacterMeta + { + return $this->character; + } + + /** + * @param CharacterMeta $character + * + * @return self + */ + public function setCharacter(CharacterMeta $character): self + { + $this->character = $character; + + return $this; + } +} diff --git a/src/Model/Pictures.php b/src/Model/Pictures.php new file mode 100644 index 0000000..51eb5d0 --- /dev/null +++ b/src/Model/Pictures.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param PicturesDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/PicturesDataItem.php b/src/Model/PicturesDataItem.php new file mode 100644 index 0000000..eff46c3 --- /dev/null +++ b/src/Model/PicturesDataItem.php @@ -0,0 +1,31 @@ +images; + } + + /** + * @param AnimeImages $images + * + * @return self + */ + public function setImages(AnimeImages $images): self + { + $this->images = $images; + + return $this; + } +} diff --git a/src/Model/PicturesVariants.php b/src/Model/PicturesVariants.php new file mode 100644 index 0000000..bffd81a --- /dev/null +++ b/src/Model/PicturesVariants.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param PicturesVariantsDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/PicturesVariantsDataItem.php b/src/Model/PicturesVariantsDataItem.php new file mode 100644 index 0000000..a6df35b --- /dev/null +++ b/src/Model/PicturesVariantsDataItem.php @@ -0,0 +1,31 @@ +images; + } + + /** + * @param CommonImages $images + * + * @return self + */ + public function setImages(CommonImages $images): self + { + $this->images = $images; + + return $this; + } +} diff --git a/src/Model/Producer.php b/src/Model/Producer.php new file mode 100644 index 0000000..68d07c5 --- /dev/null +++ b/src/Model/Producer.php @@ -0,0 +1,241 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * All titles. + * + * @return string[] + */ + public function getTitles(): array + { + return $this->titles; + } + + /** + * All titles. + * + * @param string[] $titles + * + * @return self + */ + public function setTitles(array $titles): self + { + $this->titles = $titles; + + return $this; + } + + /** + * @return CommonImages + */ + public function getImages(): CommonImages + { + return $this->images; + } + + /** + * @param CommonImages $images + * + * @return self + */ + public function setImages(CommonImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Producers's member favorites count. + * + * @return int + */ + public function getFavorites(): int + { + return $this->favorites; + } + + /** + * Producers's member favorites count. + * + * @param int $favorites + * + * @return self + */ + public function setFavorites(int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Producers's anime count. + * + * @return int + */ + public function getCount(): int + { + return $this->count; + } + + /** + * Producers's anime count. + * + * @param int $count + * + * @return self + */ + public function setCount(int $count): self + { + $this->count = $count; + + return $this; + } + + /** + * Established Date ISO8601. + * + * @return string|null + */ + public function getEstablished(): ?string + { + return $this->established; + } + + /** + * Established Date ISO8601. + * + * @param string|null $established + * + * @return self + */ + public function setEstablished(?string $established): self + { + $this->established = $established; + + return $this; + } + + /** + * About the Producer. + * + * @return string|null + */ + public function getAbout(): ?string + { + return $this->about; + } + + /** + * About the Producer. + * + * @param string|null $about + * + * @return self + */ + public function setAbout(?string $about): self + { + $this->about = $about; + + return $this; + } +} diff --git a/src/Model/ProducerFull.php b/src/Model/ProducerFull.php new file mode 100644 index 0000000..56e1d6b --- /dev/null +++ b/src/Model/ProducerFull.php @@ -0,0 +1,265 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * All titles. + * + * @return string[] + */ + public function getTitles(): array + { + return $this->titles; + } + + /** + * All titles. + * + * @param string[] $titles + * + * @return self + */ + public function setTitles(array $titles): self + { + $this->titles = $titles; + + return $this; + } + + /** + * @return CommonImages + */ + public function getImages(): CommonImages + { + return $this->images; + } + + /** + * @param CommonImages $images + * + * @return self + */ + public function setImages(CommonImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Producers's member favorites count. + * + * @return int + */ + public function getFavorites(): int + { + return $this->favorites; + } + + /** + * Producers's member favorites count. + * + * @param int $favorites + * + * @return self + */ + public function setFavorites(int $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * Producers's anime count. + * + * @return int + */ + public function getCount(): int + { + return $this->count; + } + + /** + * Producers's anime count. + * + * @param int $count + * + * @return self + */ + public function setCount(int $count): self + { + $this->count = $count; + + return $this; + } + + /** + * Established Date ISO8601. + * + * @return string|null + */ + public function getEstablished(): ?string + { + return $this->established; + } + + /** + * Established Date ISO8601. + * + * @param string|null $established + * + * @return self + */ + public function setEstablished(?string $established): self + { + $this->established = $established; + + return $this; + } + + /** + * About the Producer. + * + * @return string|null + */ + public function getAbout(): ?string + { + return $this->about; + } + + /** + * About the Producer. + * + * @param string|null $about + * + * @return self + */ + public function setAbout(?string $about): self + { + $this->about = $about; + + return $this; + } + + /** + * @return ProducerFullExternalItem[] + */ + public function getExternal(): array + { + return $this->external; + } + + /** + * @param ProducerFullExternalItem[] $external + * + * @return self + */ + public function setExternal(array $external): self + { + $this->external = $external; + + return $this; + } +} diff --git a/src/Model/ProducerFullExternalItem.php b/src/Model/ProducerFullExternalItem.php new file mode 100644 index 0000000..d32d817 --- /dev/null +++ b/src/Model/ProducerFullExternalItem.php @@ -0,0 +1,55 @@ +name; + } + + /** + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/Producers.php b/src/Model/Producers.php new file mode 100644 index 0000000..83e2646 --- /dev/null +++ b/src/Model/Producers.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param Producer[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/ProducersIdFullGetResponse200.php b/src/Model/ProducersIdFullGetResponse200.php new file mode 100644 index 0000000..9ebeb79 --- /dev/null +++ b/src/Model/ProducersIdFullGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Producers Resource. + * + * @param ProducerFull $data + * + * @return self + */ + public function setData(ProducerFull $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/ProducersIdGetResponse200.php b/src/Model/ProducersIdGetResponse200.php new file mode 100644 index 0000000..0ab0a9f --- /dev/null +++ b/src/Model/ProducersIdGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Producers Resource. + * + * @param Producer $data + * + * @return self + */ + public function setData(Producer $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/Random.php b/src/Model/Random.php new file mode 100644 index 0000000..7e2a0f3 --- /dev/null +++ b/src/Model/Random.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param mixed[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/RandomAnimeGetResponse200.php b/src/Model/RandomAnimeGetResponse200.php new file mode 100644 index 0000000..dd7dba3 --- /dev/null +++ b/src/Model/RandomAnimeGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Anime Resource. + * + * @param Anime $data + * + * @return self + */ + public function setData(Anime $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/RandomCharactersGetResponse200.php b/src/Model/RandomCharactersGetResponse200.php new file mode 100644 index 0000000..df5f861 --- /dev/null +++ b/src/Model/RandomCharactersGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Character Resource. + * + * @param Character $data + * + * @return self + */ + public function setData(Character $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/RandomMangaGetResponse200.php b/src/Model/RandomMangaGetResponse200.php new file mode 100644 index 0000000..bf0bef0 --- /dev/null +++ b/src/Model/RandomMangaGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Manga Resource. + * + * @param Manga $data + * + * @return self + */ + public function setData(Manga $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/RandomPeopleGetResponse200.php b/src/Model/RandomPeopleGetResponse200.php new file mode 100644 index 0000000..5cdc293 --- /dev/null +++ b/src/Model/RandomPeopleGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Person Resource. + * + * @param Person $data + * + * @return self + */ + public function setData(Person $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/RandomUsersGetResponse200.php b/src/Model/RandomUsersGetResponse200.php new file mode 100644 index 0000000..227d611 --- /dev/null +++ b/src/Model/RandomUsersGetResponse200.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UserProfile $data + * + * @return self + */ + public function setData(UserProfile $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/Recommendations.php b/src/Model/Recommendations.php new file mode 100644 index 0000000..42fdeb4 --- /dev/null +++ b/src/Model/Recommendations.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param RecommendationsdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/RecommendationsdataItem.php b/src/Model/RecommendationsdataItem.php new file mode 100644 index 0000000..35947ae --- /dev/null +++ b/src/Model/RecommendationsdataItem.php @@ -0,0 +1,127 @@ +malId; + } + + /** + * MAL IDs of recommendations is both of the MAL ID's with a `-` delimiter. + * + * @param string $malId + * + * @return self + */ + public function setMalId(string $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * Array of 2 entries that are being recommended to each other. + * + * @return mixed[] + */ + public function getEntry(): array + { + return $this->entry; + } + + /** + * Array of 2 entries that are being recommended to each other. + * + * @param mixed[] $entry + * + * @return self + */ + public function setEntry(array $entry): self + { + $this->entry = $entry; + + return $this; + } + + /** + * Recommendation context provided by the user. + * + * @return string + */ + public function getContent(): string + { + return $this->content; + } + + /** + * Recommendation context provided by the user. + * + * @param string $content + * + * @return self + */ + public function setContent(string $content): self + { + $this->content = $content; + + return $this; + } + + /** + * User Meta By ID. + * + * @return UserById + */ + public function getUser(): UserById + { + return $this->user; + } + + /** + * User Meta By ID. + * + * @param UserById $user + * + * @return self + */ + public function setUser(UserById $user): self + { + $this->user = $user; + + return $this; + } +} diff --git a/src/Model/Relation.php b/src/Model/Relation.php new file mode 100644 index 0000000..9312663 --- /dev/null +++ b/src/Model/Relation.php @@ -0,0 +1,67 @@ +relation; + } + + /** + * Relation type. + * + * @param string $relation + * + * @return self + */ + public function setRelation(string $relation): self + { + $this->relation = $relation; + + return $this; + } + + /** + * Related entries. + * + * @return MalUrl[] + */ + public function getEntry(): array + { + return $this->entry; + } + + /** + * Related entries. + * + * @param MalUrl[] $entry + * + * @return self + */ + public function setEntry(array $entry): self + { + $this->entry = $entry; + + return $this; + } +} diff --git a/src/Model/ReviewsCollection.php b/src/Model/ReviewsCollection.php new file mode 100644 index 0000000..653e221 --- /dev/null +++ b/src/Model/ReviewsCollection.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param mixed[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/Schedules.php b/src/Model/Schedules.php new file mode 100644 index 0000000..6e08e1a --- /dev/null +++ b/src/Model/Schedules.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param Anime[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPlusPagination + */ + public function getPagination(): PaginationPlusPagination + { + return $this->pagination; + } + + /** + * @param PaginationPlusPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPlusPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/Seasons.php b/src/Model/Seasons.php new file mode 100644 index 0000000..f896d1d --- /dev/null +++ b/src/Model/Seasons.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param SeasonsDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/SeasonsDataItem.php b/src/Model/SeasonsDataItem.php new file mode 100644 index 0000000..3d529f7 --- /dev/null +++ b/src/Model/SeasonsDataItem.php @@ -0,0 +1,67 @@ +year; + } + + /** + * Year. + * + * @param int $year + * + * @return self + */ + public function setYear(int $year): self + { + $this->year = $year; + + return $this; + } + + /** + * List of available seasons. + * + * @return string[] + */ + public function getSeasons(): array + { + return $this->seasons; + } + + /** + * List of available seasons. + * + * @param string[] $seasons + * + * @return self + */ + public function setSeasons(array $seasons): self + { + $this->seasons = $seasons; + + return $this; + } +} diff --git a/src/Model/StreamingLinks.php b/src/Model/StreamingLinks.php new file mode 100644 index 0000000..d3172fe --- /dev/null +++ b/src/Model/StreamingLinks.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param StreamingLinksDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/StreamingLinksDataItem.php b/src/Model/StreamingLinksDataItem.php new file mode 100644 index 0000000..5715e65 --- /dev/null +++ b/src/Model/StreamingLinksDataItem.php @@ -0,0 +1,55 @@ +name; + } + + /** + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/TopReviewsGetResponse200.php b/src/Model/TopReviewsGetResponse200.php new file mode 100644 index 0000000..a543d68 --- /dev/null +++ b/src/Model/TopReviewsGetResponse200.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param TopReviewsGetResponse200Data $data + * + * @return self + */ + public function setData(TopReviewsGetResponse200Data $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/TopReviewsGetResponse200Data.php b/src/Model/TopReviewsGetResponse200Data.php new file mode 100644 index 0000000..807831a --- /dev/null +++ b/src/Model/TopReviewsGetResponse200Data.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param mixed[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/Trailer.php b/src/Model/Trailer.php new file mode 100644 index 0000000..6e6eef5 --- /dev/null +++ b/src/Model/Trailer.php @@ -0,0 +1,121 @@ +youtubeId; + } + + /** + * YouTube ID. + * + * @param string|null $youtubeId + * + * @return self + */ + public function setYoutubeId(?string $youtubeId): self + { + $this->youtubeId = $youtubeId; + + return $this; + } + + /** + * YouTube URL. + * + * @return string|null + */ + public function getUrl(): ?string + { + return $this->url; + } + + /** + * YouTube URL. + * + * @param string|null $url + * + * @return self + */ + public function setUrl(?string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Parsed Embed URL. + * + * @return string|null + */ + public function getEmbedUrl(): ?string + { + return $this->embedUrl; + } + + /** + * Parsed Embed URL. + * + * @param string|null $embedUrl + * + * @return self + */ + public function setEmbedUrl(?string $embedUrl): self + { + $this->embedUrl = $embedUrl; + + return $this; + } + + /** + * @return TrailerImagesImages + */ + public function getImages(): TrailerImagesImages + { + return $this->images; + } + + /** + * @param TrailerImagesImages $images + * + * @return self + */ + public function setImages(TrailerImagesImages $images): self + { + $this->images = $images; + + return $this; + } +} diff --git a/src/Model/TrailerBase.php b/src/Model/TrailerBase.php new file mode 100644 index 0000000..be6062e --- /dev/null +++ b/src/Model/TrailerBase.php @@ -0,0 +1,97 @@ +youtubeId; + } + + /** + * YouTube ID. + * + * @param string|null $youtubeId + * + * @return self + */ + public function setYoutubeId(?string $youtubeId): self + { + $this->youtubeId = $youtubeId; + + return $this; + } + + /** + * YouTube URL. + * + * @return string|null + */ + public function getUrl(): ?string + { + return $this->url; + } + + /** + * YouTube URL. + * + * @param string|null $url + * + * @return self + */ + public function setUrl(?string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Parsed Embed URL. + * + * @return string|null + */ + public function getEmbedUrl(): ?string + { + return $this->embedUrl; + } + + /** + * Parsed Embed URL. + * + * @param string|null $embedUrl + * + * @return self + */ + public function setEmbedUrl(?string $embedUrl): self + { + $this->embedUrl = $embedUrl; + + return $this; + } +} diff --git a/src/Model/TrailerImages.php b/src/Model/TrailerImages.php new file mode 100644 index 0000000..6779f0f --- /dev/null +++ b/src/Model/TrailerImages.php @@ -0,0 +1,31 @@ +images; + } + + /** + * @param TrailerImagesImages $images + * + * @return self + */ + public function setImages(TrailerImagesImages $images): self + { + $this->images = $images; + + return $this; + } +} diff --git a/src/Model/TrailerImagesImages.php b/src/Model/TrailerImagesImages.php new file mode 100644 index 0000000..cebd616 --- /dev/null +++ b/src/Model/TrailerImagesImages.php @@ -0,0 +1,157 @@ +imageUrl; + } + + /** + * Default Image Size URL (120x90). + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } + + /** + * Small Image Size URL (640x480). + * + * @return string|null + */ + public function getSmallImageUrl(): ?string + { + return $this->smallImageUrl; + } + + /** + * Small Image Size URL (640x480). + * + * @param string|null $smallImageUrl + * + * @return self + */ + public function setSmallImageUrl(?string $smallImageUrl): self + { + $this->smallImageUrl = $smallImageUrl; + + return $this; + } + + /** + * Medium Image Size URL (320x180). + * + * @return string|null + */ + public function getMediumImageUrl(): ?string + { + return $this->mediumImageUrl; + } + + /** + * Medium Image Size URL (320x180). + * + * @param string|null $mediumImageUrl + * + * @return self + */ + public function setMediumImageUrl(?string $mediumImageUrl): self + { + $this->mediumImageUrl = $mediumImageUrl; + + return $this; + } + + /** + * Large Image Size URL (480x360). + * + * @return string|null + */ + public function getLargeImageUrl(): ?string + { + return $this->largeImageUrl; + } + + /** + * Large Image Size URL (480x360). + * + * @param string|null $largeImageUrl + * + * @return self + */ + public function setLargeImageUrl(?string $largeImageUrl): self + { + $this->largeImageUrl = $largeImageUrl; + + return $this; + } + + /** + * Maximum Image Size URL (1280x720). + * + * @return string|null + */ + public function getMaximumImageUrl(): ?string + { + return $this->maximumImageUrl; + } + + /** + * Maximum Image Size URL (1280x720). + * + * @param string|null $maximumImageUrl + * + * @return self + */ + public function setMaximumImageUrl(?string $maximumImageUrl): self + { + $this->maximumImageUrl = $maximumImageUrl; + + return $this; + } +} diff --git a/src/Model/UserAbout.php b/src/Model/UserAbout.php new file mode 100644 index 0000000..726ab08 --- /dev/null +++ b/src/Model/UserAbout.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UserAboutDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UserAboutDataItem.php b/src/Model/UserAboutDataItem.php new file mode 100644 index 0000000..e86852d --- /dev/null +++ b/src/Model/UserAboutDataItem.php @@ -0,0 +1,37 @@ +about; + } + + /** + * User About. NOTE: About information is customizable by users through BBCode on MyAnimeList. This means users can add multimedia content, different text sizes, etc. Due to this freeform, Jikan returns parsed HTML. Validate on your end! + * + * @param string|null $about + * + * @return self + */ + public function setAbout(?string $about): self + { + $this->about = $about; + + return $this; + } +} diff --git a/src/Model/UserById.php b/src/Model/UserById.php new file mode 100644 index 0000000..f44766a --- /dev/null +++ b/src/Model/UserById.php @@ -0,0 +1,67 @@ +url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * MyAnimeList Username. + * + * @return string + */ + public function getUsername(): string + { + return $this->username; + } + + /** + * MyAnimeList Username. + * + * @param string $username + * + * @return self + */ + public function setUsername(string $username): self + { + $this->username = $username; + + return $this; + } +} diff --git a/src/Model/UserClubs.php b/src/Model/UserClubs.php new file mode 100644 index 0000000..c14bfd1 --- /dev/null +++ b/src/Model/UserClubs.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param UserClubsdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/UserClubsdataItem.php b/src/Model/UserClubsdataItem.php new file mode 100644 index 0000000..3306e55 --- /dev/null +++ b/src/Model/UserClubsdataItem.php @@ -0,0 +1,97 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * Club Name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Club Name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Club URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * Club URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/UserFavorites.php b/src/Model/UserFavorites.php new file mode 100644 index 0000000..0240938 --- /dev/null +++ b/src/Model/UserFavorites.php @@ -0,0 +1,127 @@ +anime; + } + + /** + * Favorite Anime. + * + * @param UserFavoritesAnimeItem[] $anime + * + * @return self + */ + public function setAnime(array $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * Favorite Manga. + * + * @return UserFavoritesMangaItem[] + */ + public function getManga(): array + { + return $this->manga; + } + + /** + * Favorite Manga. + * + * @param UserFavoritesMangaItem[] $manga + * + * @return self + */ + public function setManga(array $manga): self + { + $this->manga = $manga; + + return $this; + } + + /** + * Favorite Characters. + * + * @return UserFavoritesCharactersItem[] + */ + public function getCharacters(): array + { + return $this->characters; + } + + /** + * Favorite Characters. + * + * @param UserFavoritesCharactersItem[] $characters + * + * @return self + */ + public function setCharacters(array $characters): self + { + $this->characters = $characters; + + return $this; + } + + /** + * Favorite People. + * + * @return CharacterMeta[] + */ + public function getPeople(): array + { + return $this->people; + } + + /** + * Favorite People. + * + * @param CharacterMeta[] $people + * + * @return self + */ + public function setPeople(array $people): self + { + $this->people = $people; + + return $this; + } +} diff --git a/src/Model/UserFavoritesAnimeItem.php b/src/Model/UserFavoritesAnimeItem.php new file mode 100644 index 0000000..380b26a --- /dev/null +++ b/src/Model/UserFavoritesAnimeItem.php @@ -0,0 +1,169 @@ +type; + } + + /** + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * @return int + */ + public function getStartYear(): int + { + return $this->startYear; + } + + /** + * @param int $startYear + * + * @return self + */ + public function setStartYear(int $startYear): self + { + $this->startYear = $startYear; + + return $this; + } + + /** + * MyAnimeList ID. + * + * @return int + */ + public function getMalId(): int + { + return $this->malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return AnimeImages + */ + public function getImages(): AnimeImages + { + return $this->images; + } + + /** + * @param AnimeImages $images + * + * @return self + */ + public function setImages(AnimeImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Entry title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Entry title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } +} diff --git a/src/Model/UserFavoritesCharactersItem.php b/src/Model/UserFavoritesCharactersItem.php new file mode 100644 index 0000000..08b4680 --- /dev/null +++ b/src/Model/UserFavoritesCharactersItem.php @@ -0,0 +1,181 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return CharacterImages + */ + public function getImages(): CharacterImages + { + return $this->images; + } + + /** + * @param CharacterImages $images + * + * @return self + */ + public function setImages(CharacterImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Entry name. + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Entry name. + * + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Type of resource. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Type of resource. + * + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * Resource Name/Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Resource Name/Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } +} diff --git a/src/Model/UserFavoritesMangaItem.php b/src/Model/UserFavoritesMangaItem.php new file mode 100644 index 0000000..24197cb --- /dev/null +++ b/src/Model/UserFavoritesMangaItem.php @@ -0,0 +1,169 @@ +type; + } + + /** + * @param string $type + * + * @return self + */ + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + /** + * @return int + */ + public function getStartYear(): int + { + return $this->startYear; + } + + /** + * @param int $startYear + * + * @return self + */ + public function setStartYear(int $startYear): self + { + $this->startYear = $startYear; + + return $this; + } + + /** + * MyAnimeList ID. + * + * @return int + */ + public function getMalId(): int + { + return $this->malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return MangaImages + */ + public function getImages(): MangaImages + { + return $this->images; + } + + /** + * @param MangaImages $images + * + * @return self + */ + public function setImages(MangaImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Entry title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Entry title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } +} diff --git a/src/Model/UserFriends.php b/src/Model/UserFriends.php new file mode 100644 index 0000000..ae8bca2 --- /dev/null +++ b/src/Model/UserFriends.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param UserFriendsdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/UserFriendsdataItem.php b/src/Model/UserFriendsdataItem.php new file mode 100644 index 0000000..89ce1b7 --- /dev/null +++ b/src/Model/UserFriendsdataItem.php @@ -0,0 +1,91 @@ +user; + } + + /** + * @param UserMeta $user + * + * @return self + */ + public function setUser(UserMeta $user): self + { + $this->user = $user; + + return $this; + } + + /** + * Last Online Date ISO8601 format. + * + * @return string + */ + public function getLastOnline(): string + { + return $this->lastOnline; + } + + /** + * Last Online Date ISO8601 format. + * + * @param string $lastOnline + * + * @return self + */ + public function setLastOnline(string $lastOnline): self + { + $this->lastOnline = $lastOnline; + + return $this; + } + + /** + * Friends Since Date ISO8601 format. + * + * @return string + */ + public function getFriendsSince(): string + { + return $this->friendsSince; + } + + /** + * Friends Since Date ISO8601 format. + * + * @param string $friendsSince + * + * @return self + */ + public function setFriendsSince(string $friendsSince): self + { + $this->friendsSince = $friendsSince; + + return $this; + } +} diff --git a/src/Model/UserHistory.php b/src/Model/UserHistory.php new file mode 100644 index 0000000..26d2c70 --- /dev/null +++ b/src/Model/UserHistory.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param History[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UserImages.php b/src/Model/UserImages.php new file mode 100644 index 0000000..49d8180 --- /dev/null +++ b/src/Model/UserImages.php @@ -0,0 +1,67 @@ +jpg; + } + + /** + * Available images in JPG. + * + * @param UserImagesJpg $jpg + * + * @return self + */ + public function setJpg(UserImagesJpg $jpg): self + { + $this->jpg = $jpg; + + return $this; + } + + /** + * Available images in WEBP. + * + * @return UserImagesWebp + */ + public function getWebp(): UserImagesWebp + { + return $this->webp; + } + + /** + * Available images in WEBP. + * + * @param UserImagesWebp $webp + * + * @return self + */ + public function setWebp(UserImagesWebp $webp): self + { + $this->webp = $webp; + + return $this; + } +} diff --git a/src/Model/UserImagesJpg.php b/src/Model/UserImagesJpg.php new file mode 100644 index 0000000..017d5d8 --- /dev/null +++ b/src/Model/UserImagesJpg.php @@ -0,0 +1,37 @@ +imageUrl; + } + + /** + * Image URL JPG. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } +} diff --git a/src/Model/UserImagesWebp.php b/src/Model/UserImagesWebp.php new file mode 100644 index 0000000..4648316 --- /dev/null +++ b/src/Model/UserImagesWebp.php @@ -0,0 +1,37 @@ +imageUrl; + } + + /** + * Image URL WEBP. + * + * @param string|null $imageUrl + * + * @return self + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } +} diff --git a/src/Model/UserMeta.php b/src/Model/UserMeta.php new file mode 100644 index 0000000..ea91b43 --- /dev/null +++ b/src/Model/UserMeta.php @@ -0,0 +1,91 @@ +username; + } + + /** + * MyAnimeList Username. + * + * @param string $username + * + * @return self + */ + public function setUsername(string $username): self + { + $this->username = $username; + + return $this; + } + + /** + * MyAnimeList Profile URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList Profile URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return UserImages + */ + public function getImages(): UserImages + { + return $this->images; + } + + /** + * @param UserImages $images + * + * @return self + */ + public function setImages(UserImages $images): self + { + $this->images = $images; + + return $this; + } +} diff --git a/src/Model/UserProfile.php b/src/Model/UserProfile.php new file mode 100644 index 0000000..d3c96cf --- /dev/null +++ b/src/Model/UserProfile.php @@ -0,0 +1,271 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int|null $malId + * + * @return self + */ + public function setMalId(?int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList Username. + * + * @return string + */ + public function getUsername(): string + { + return $this->username; + } + + /** + * MyAnimeList Username. + * + * @param string $username + * + * @return self + */ + public function setUsername(string $username): self + { + $this->username = $username; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return UserImages + */ + public function getImages(): UserImages + { + return $this->images; + } + + /** + * @param UserImages $images + * + * @return self + */ + public function setImages(UserImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Last Online Date ISO8601. + * + * @return string|null + */ + public function getLastOnline(): ?string + { + return $this->lastOnline; + } + + /** + * Last Online Date ISO8601. + * + * @param string|null $lastOnline + * + * @return self + */ + public function setLastOnline(?string $lastOnline): self + { + $this->lastOnline = $lastOnline; + + return $this; + } + + /** + * User Gender. + * + * @return string|null + */ + public function getGender(): ?string + { + return $this->gender; + } + + /** + * User Gender. + * + * @param string|null $gender + * + * @return self + */ + public function setGender(?string $gender): self + { + $this->gender = $gender; + + return $this; + } + + /** + * Birthday Date ISO8601. + * + * @return string|null + */ + public function getBirthday(): ?string + { + return $this->birthday; + } + + /** + * Birthday Date ISO8601. + * + * @param string|null $birthday + * + * @return self + */ + public function setBirthday(?string $birthday): self + { + $this->birthday = $birthday; + + return $this; + } + + /** + * Location. + * + * @return string|null + */ + public function getLocation(): ?string + { + return $this->location; + } + + /** + * Location. + * + * @param string|null $location + * + * @return self + */ + public function setLocation(?string $location): self + { + $this->location = $location; + + return $this; + } + + /** + * Joined Date ISO8601. + * + * @return string|null + */ + public function getJoined(): ?string + { + return $this->joined; + } + + /** + * Joined Date ISO8601. + * + * @param string|null $joined + * + * @return self + */ + public function setJoined(?string $joined): self + { + $this->joined = $joined; + + return $this; + } +} diff --git a/src/Model/UserProfileFull.php b/src/Model/UserProfileFull.php new file mode 100644 index 0000000..56d7611 --- /dev/null +++ b/src/Model/UserProfileFull.php @@ -0,0 +1,319 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int|null $malId + * + * @return self + */ + public function setMalId(?int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList Username. + * + * @return string + */ + public function getUsername(): string + { + return $this->username; + } + + /** + * MyAnimeList Username. + * + * @param string $username + * + * @return self + */ + public function setUsername(string $username): self + { + $this->username = $username; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * @return UserImages + */ + public function getImages(): UserImages + { + return $this->images; + } + + /** + * @param UserImages $images + * + * @return self + */ + public function setImages(UserImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Last Online Date ISO8601. + * + * @return string|null + */ + public function getLastOnline(): ?string + { + return $this->lastOnline; + } + + /** + * Last Online Date ISO8601. + * + * @param string|null $lastOnline + * + * @return self + */ + public function setLastOnline(?string $lastOnline): self + { + $this->lastOnline = $lastOnline; + + return $this; + } + + /** + * User Gender. + * + * @return string|null + */ + public function getGender(): ?string + { + return $this->gender; + } + + /** + * User Gender. + * + * @param string|null $gender + * + * @return self + */ + public function setGender(?string $gender): self + { + $this->gender = $gender; + + return $this; + } + + /** + * Birthday Date ISO8601. + * + * @return string|null + */ + public function getBirthday(): ?string + { + return $this->birthday; + } + + /** + * Birthday Date ISO8601. + * + * @param string|null $birthday + * + * @return self + */ + public function setBirthday(?string $birthday): self + { + $this->birthday = $birthday; + + return $this; + } + + /** + * Location. + * + * @return string|null + */ + public function getLocation(): ?string + { + return $this->location; + } + + /** + * Location. + * + * @param string|null $location + * + * @return self + */ + public function setLocation(?string $location): self + { + $this->location = $location; + + return $this; + } + + /** + * Joined Date ISO8601. + * + * @return string|null + */ + public function getJoined(): ?string + { + return $this->joined; + } + + /** + * Joined Date ISO8601. + * + * @param string|null $joined + * + * @return self + */ + public function setJoined(?string $joined): self + { + $this->joined = $joined; + + return $this; + } + + /** + * @return UserProfileFullStatistics + */ + public function getStatistics(): UserProfileFullStatistics + { + return $this->statistics; + } + + /** + * @param UserProfileFullStatistics $statistics + * + * @return self + */ + public function setStatistics(UserProfileFullStatistics $statistics): self + { + $this->statistics = $statistics; + + return $this; + } + + /** + * @return UserProfileFullExternalItem[] + */ + public function getExternal(): array + { + return $this->external; + } + + /** + * @param UserProfileFullExternalItem[] $external + * + * @return self + */ + public function setExternal(array $external): self + { + $this->external = $external; + + return $this; + } +} diff --git a/src/Model/UserProfileFullExternalItem.php b/src/Model/UserProfileFullExternalItem.php new file mode 100644 index 0000000..3609b21 --- /dev/null +++ b/src/Model/UserProfileFullExternalItem.php @@ -0,0 +1,55 @@ +name; + } + + /** + * @param string $name + * + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } +} diff --git a/src/Model/UserProfileFullStatistics.php b/src/Model/UserProfileFullStatistics.php new file mode 100644 index 0000000..4d4e2f1 --- /dev/null +++ b/src/Model/UserProfileFullStatistics.php @@ -0,0 +1,67 @@ +anime; + } + + /** + * Anime Statistics. + * + * @param UserProfileFullStatisticsAnime $anime + * + * @return self + */ + public function setAnime(UserProfileFullStatisticsAnime $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * Manga Statistics. + * + * @return UserProfileFullStatisticsManga + */ + public function getManga(): UserProfileFullStatisticsManga + { + return $this->manga; + } + + /** + * Manga Statistics. + * + * @param UserProfileFullStatisticsManga $manga + * + * @return self + */ + public function setManga(UserProfileFullStatisticsManga $manga): self + { + $this->manga = $manga; + + return $this; + } +} diff --git a/src/Model/UserProfileFullStatisticsAnime.php b/src/Model/UserProfileFullStatisticsAnime.php new file mode 100644 index 0000000..4a6bcdf --- /dev/null +++ b/src/Model/UserProfileFullStatisticsAnime.php @@ -0,0 +1,307 @@ +daysWatched; + } + + /** + * Number of days spent watching Anime. + * + * @param float $daysWatched + * + * @return self + */ + public function setDaysWatched(float $daysWatched): self + { + $this->daysWatched = $daysWatched; + + return $this; + } + + /** + * Mean Score. + * + * @return float + */ + public function getMeanScore(): float + { + return $this->meanScore; + } + + /** + * Mean Score. + * + * @param float $meanScore + * + * @return self + */ + public function setMeanScore(float $meanScore): self + { + $this->meanScore = $meanScore; + + return $this; + } + + /** + * Anime Watching. + * + * @return int + */ + public function getWatching(): int + { + return $this->watching; + } + + /** + * Anime Watching. + * + * @param int $watching + * + * @return self + */ + public function setWatching(int $watching): self + { + $this->watching = $watching; + + return $this; + } + + /** + * Anime Completed. + * + * @return int + */ + public function getCompleted(): int + { + return $this->completed; + } + + /** + * Anime Completed. + * + * @param int $completed + * + * @return self + */ + public function setCompleted(int $completed): self + { + $this->completed = $completed; + + return $this; + } + + /** + * Anime On-Hold. + * + * @return int + */ + public function getOnHold(): int + { + return $this->onHold; + } + + /** + * Anime On-Hold. + * + * @param int $onHold + * + * @return self + */ + public function setOnHold(int $onHold): self + { + $this->onHold = $onHold; + + return $this; + } + + /** + * Anime Dropped. + * + * @return int + */ + public function getDropped(): int + { + return $this->dropped; + } + + /** + * Anime Dropped. + * + * @param int $dropped + * + * @return self + */ + public function setDropped(int $dropped): self + { + $this->dropped = $dropped; + + return $this; + } + + /** + * Anime Planned to Watch. + * + * @return int + */ + public function getPlanToWatch(): int + { + return $this->planToWatch; + } + + /** + * Anime Planned to Watch. + * + * @param int $planToWatch + * + * @return self + */ + public function setPlanToWatch(int $planToWatch): self + { + $this->planToWatch = $planToWatch; + + return $this; + } + + /** + * Total Anime entries on User list. + * + * @return int + */ + public function getTotalEntries(): int + { + return $this->totalEntries; + } + + /** + * Total Anime entries on User list. + * + * @param int $totalEntries + * + * @return self + */ + public function setTotalEntries(int $totalEntries): self + { + $this->totalEntries = $totalEntries; + + return $this; + } + + /** + * Anime re-watched. + * + * @return int + */ + public function getRewatched(): int + { + return $this->rewatched; + } + + /** + * Anime re-watched. + * + * @param int $rewatched + * + * @return self + */ + public function setRewatched(int $rewatched): self + { + $this->rewatched = $rewatched; + + return $this; + } + + /** + * Number of Anime Episodes Watched. + * + * @return int + */ + public function getEpisodesWatched(): int + { + return $this->episodesWatched; + } + + /** + * Number of Anime Episodes Watched. + * + * @param int $episodesWatched + * + * @return self + */ + public function setEpisodesWatched(int $episodesWatched): self + { + $this->episodesWatched = $episodesWatched; + + return $this; + } +} diff --git a/src/Model/UserProfileFullStatisticsManga.php b/src/Model/UserProfileFullStatisticsManga.php new file mode 100644 index 0000000..ba94c04 --- /dev/null +++ b/src/Model/UserProfileFullStatisticsManga.php @@ -0,0 +1,337 @@ +daysRead; + } + + /** + * Number of days spent reading Manga. + * + * @param float $daysRead + * + * @return self + */ + public function setDaysRead(float $daysRead): self + { + $this->daysRead = $daysRead; + + return $this; + } + + /** + * Mean Score. + * + * @return float + */ + public function getMeanScore(): float + { + return $this->meanScore; + } + + /** + * Mean Score. + * + * @param float $meanScore + * + * @return self + */ + public function setMeanScore(float $meanScore): self + { + $this->meanScore = $meanScore; + + return $this; + } + + /** + * Manga Reading. + * + * @return int + */ + public function getReading(): int + { + return $this->reading; + } + + /** + * Manga Reading. + * + * @param int $reading + * + * @return self + */ + public function setReading(int $reading): self + { + $this->reading = $reading; + + return $this; + } + + /** + * Manga Completed. + * + * @return int + */ + public function getCompleted(): int + { + return $this->completed; + } + + /** + * Manga Completed. + * + * @param int $completed + * + * @return self + */ + public function setCompleted(int $completed): self + { + $this->completed = $completed; + + return $this; + } + + /** + * Manga On-Hold. + * + * @return int + */ + public function getOnHold(): int + { + return $this->onHold; + } + + /** + * Manga On-Hold. + * + * @param int $onHold + * + * @return self + */ + public function setOnHold(int $onHold): self + { + $this->onHold = $onHold; + + return $this; + } + + /** + * Manga Dropped. + * + * @return int + */ + public function getDropped(): int + { + return $this->dropped; + } + + /** + * Manga Dropped. + * + * @param int $dropped + * + * @return self + */ + public function setDropped(int $dropped): self + { + $this->dropped = $dropped; + + return $this; + } + + /** + * Manga Planned to Read. + * + * @return int + */ + public function getPlanToRead(): int + { + return $this->planToRead; + } + + /** + * Manga Planned to Read. + * + * @param int $planToRead + * + * @return self + */ + public function setPlanToRead(int $planToRead): self + { + $this->planToRead = $planToRead; + + return $this; + } + + /** + * Total Manga entries on User list. + * + * @return int + */ + public function getTotalEntries(): int + { + return $this->totalEntries; + } + + /** + * Total Manga entries on User list. + * + * @param int $totalEntries + * + * @return self + */ + public function setTotalEntries(int $totalEntries): self + { + $this->totalEntries = $totalEntries; + + return $this; + } + + /** + * Manga re-read. + * + * @return int + */ + public function getReread(): int + { + return $this->reread; + } + + /** + * Manga re-read. + * + * @param int $reread + * + * @return self + */ + public function setReread(int $reread): self + { + $this->reread = $reread; + + return $this; + } + + /** + * Number of Manga Chapters Read. + * + * @return int + */ + public function getChaptersRead(): int + { + return $this->chaptersRead; + } + + /** + * Number of Manga Chapters Read. + * + * @param int $chaptersRead + * + * @return self + */ + public function setChaptersRead(int $chaptersRead): self + { + $this->chaptersRead = $chaptersRead; + + return $this; + } + + /** + * Number of Manga Volumes Read. + * + * @return int + */ + public function getVolumesRead(): int + { + return $this->volumesRead; + } + + /** + * Number of Manga Volumes Read. + * + * @param int $volumesRead + * + * @return self + */ + public function setVolumesRead(int $volumesRead): self + { + $this->volumesRead = $volumesRead; + + return $this; + } +} diff --git a/src/Model/UserStatistics.php b/src/Model/UserStatistics.php new file mode 100644 index 0000000..e014e73 --- /dev/null +++ b/src/Model/UserStatistics.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UserStatisticsData $data + * + * @return self + */ + public function setData(UserStatisticsData $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UserStatisticsData.php b/src/Model/UserStatisticsData.php new file mode 100644 index 0000000..75161e2 --- /dev/null +++ b/src/Model/UserStatisticsData.php @@ -0,0 +1,67 @@ +anime; + } + + /** + * Anime Statistics. + * + * @param UserStatisticsDataAnime $anime + * + * @return self + */ + public function setAnime(UserStatisticsDataAnime $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * Manga Statistics. + * + * @return UserStatisticsDataManga + */ + public function getManga(): UserStatisticsDataManga + { + return $this->manga; + } + + /** + * Manga Statistics. + * + * @param UserStatisticsDataManga $manga + * + * @return self + */ + public function setManga(UserStatisticsDataManga $manga): self + { + $this->manga = $manga; + + return $this; + } +} diff --git a/src/Model/UserStatisticsDataAnime.php b/src/Model/UserStatisticsDataAnime.php new file mode 100644 index 0000000..04c1247 --- /dev/null +++ b/src/Model/UserStatisticsDataAnime.php @@ -0,0 +1,307 @@ +daysWatched; + } + + /** + * Number of days spent watching Anime. + * + * @param float $daysWatched + * + * @return self + */ + public function setDaysWatched(float $daysWatched): self + { + $this->daysWatched = $daysWatched; + + return $this; + } + + /** + * Mean Score. + * + * @return float + */ + public function getMeanScore(): float + { + return $this->meanScore; + } + + /** + * Mean Score. + * + * @param float $meanScore + * + * @return self + */ + public function setMeanScore(float $meanScore): self + { + $this->meanScore = $meanScore; + + return $this; + } + + /** + * Anime Watching. + * + * @return int + */ + public function getWatching(): int + { + return $this->watching; + } + + /** + * Anime Watching. + * + * @param int $watching + * + * @return self + */ + public function setWatching(int $watching): self + { + $this->watching = $watching; + + return $this; + } + + /** + * Anime Completed. + * + * @return int + */ + public function getCompleted(): int + { + return $this->completed; + } + + /** + * Anime Completed. + * + * @param int $completed + * + * @return self + */ + public function setCompleted(int $completed): self + { + $this->completed = $completed; + + return $this; + } + + /** + * Anime On-Hold. + * + * @return int + */ + public function getOnHold(): int + { + return $this->onHold; + } + + /** + * Anime On-Hold. + * + * @param int $onHold + * + * @return self + */ + public function setOnHold(int $onHold): self + { + $this->onHold = $onHold; + + return $this; + } + + /** + * Anime Dropped. + * + * @return int + */ + public function getDropped(): int + { + return $this->dropped; + } + + /** + * Anime Dropped. + * + * @param int $dropped + * + * @return self + */ + public function setDropped(int $dropped): self + { + $this->dropped = $dropped; + + return $this; + } + + /** + * Anime Planned to Watch. + * + * @return int + */ + public function getPlanToWatch(): int + { + return $this->planToWatch; + } + + /** + * Anime Planned to Watch. + * + * @param int $planToWatch + * + * @return self + */ + public function setPlanToWatch(int $planToWatch): self + { + $this->planToWatch = $planToWatch; + + return $this; + } + + /** + * Total Anime entries on User list. + * + * @return int + */ + public function getTotalEntries(): int + { + return $this->totalEntries; + } + + /** + * Total Anime entries on User list. + * + * @param int $totalEntries + * + * @return self + */ + public function setTotalEntries(int $totalEntries): self + { + $this->totalEntries = $totalEntries; + + return $this; + } + + /** + * Anime re-watched. + * + * @return int + */ + public function getRewatched(): int + { + return $this->rewatched; + } + + /** + * Anime re-watched. + * + * @param int $rewatched + * + * @return self + */ + public function setRewatched(int $rewatched): self + { + $this->rewatched = $rewatched; + + return $this; + } + + /** + * Number of Anime Episodes Watched. + * + * @return int + */ + public function getEpisodesWatched(): int + { + return $this->episodesWatched; + } + + /** + * Number of Anime Episodes Watched. + * + * @param int $episodesWatched + * + * @return self + */ + public function setEpisodesWatched(int $episodesWatched): self + { + $this->episodesWatched = $episodesWatched; + + return $this; + } +} diff --git a/src/Model/UserStatisticsDataManga.php b/src/Model/UserStatisticsDataManga.php new file mode 100644 index 0000000..7c2435e --- /dev/null +++ b/src/Model/UserStatisticsDataManga.php @@ -0,0 +1,337 @@ +daysRead; + } + + /** + * Number of days spent reading Manga. + * + * @param float $daysRead + * + * @return self + */ + public function setDaysRead(float $daysRead): self + { + $this->daysRead = $daysRead; + + return $this; + } + + /** + * Mean Score. + * + * @return float + */ + public function getMeanScore(): float + { + return $this->meanScore; + } + + /** + * Mean Score. + * + * @param float $meanScore + * + * @return self + */ + public function setMeanScore(float $meanScore): self + { + $this->meanScore = $meanScore; + + return $this; + } + + /** + * Manga Reading. + * + * @return int + */ + public function getReading(): int + { + return $this->reading; + } + + /** + * Manga Reading. + * + * @param int $reading + * + * @return self + */ + public function setReading(int $reading): self + { + $this->reading = $reading; + + return $this; + } + + /** + * Manga Completed. + * + * @return int + */ + public function getCompleted(): int + { + return $this->completed; + } + + /** + * Manga Completed. + * + * @param int $completed + * + * @return self + */ + public function setCompleted(int $completed): self + { + $this->completed = $completed; + + return $this; + } + + /** + * Manga On-Hold. + * + * @return int + */ + public function getOnHold(): int + { + return $this->onHold; + } + + /** + * Manga On-Hold. + * + * @param int $onHold + * + * @return self + */ + public function setOnHold(int $onHold): self + { + $this->onHold = $onHold; + + return $this; + } + + /** + * Manga Dropped. + * + * @return int + */ + public function getDropped(): int + { + return $this->dropped; + } + + /** + * Manga Dropped. + * + * @param int $dropped + * + * @return self + */ + public function setDropped(int $dropped): self + { + $this->dropped = $dropped; + + return $this; + } + + /** + * Manga Planned to Read. + * + * @return int + */ + public function getPlanToRead(): int + { + return $this->planToRead; + } + + /** + * Manga Planned to Read. + * + * @param int $planToRead + * + * @return self + */ + public function setPlanToRead(int $planToRead): self + { + $this->planToRead = $planToRead; + + return $this; + } + + /** + * Total Manga entries on User list. + * + * @return int + */ + public function getTotalEntries(): int + { + return $this->totalEntries; + } + + /** + * Total Manga entries on User list. + * + * @param int $totalEntries + * + * @return self + */ + public function setTotalEntries(int $totalEntries): self + { + $this->totalEntries = $totalEntries; + + return $this; + } + + /** + * Manga re-read. + * + * @return int + */ + public function getReread(): int + { + return $this->reread; + } + + /** + * Manga re-read. + * + * @param int $reread + * + * @return self + */ + public function setReread(int $reread): self + { + $this->reread = $reread; + + return $this; + } + + /** + * Number of Manga Chapters Read. + * + * @return int + */ + public function getChaptersRead(): int + { + return $this->chaptersRead; + } + + /** + * Number of Manga Chapters Read. + * + * @param int $chaptersRead + * + * @return self + */ + public function setChaptersRead(int $chaptersRead): self + { + $this->chaptersRead = $chaptersRead; + + return $this; + } + + /** + * Number of Manga Volumes Read. + * + * @return int + */ + public function getVolumesRead(): int + { + return $this->volumesRead; + } + + /** + * Number of Manga Volumes Read. + * + * @param int $volumesRead + * + * @return self + */ + public function setVolumesRead(int $volumesRead): self + { + $this->volumesRead = $volumesRead; + + return $this; + } +} diff --git a/src/Model/UserUpdates.php b/src/Model/UserUpdates.php new file mode 100644 index 0000000..7cb44bf --- /dev/null +++ b/src/Model/UserUpdates.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UserUpdatesData $data + * + * @return self + */ + public function setData(UserUpdatesData $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UserUpdatesData.php b/src/Model/UserUpdatesData.php new file mode 100644 index 0000000..7de1194 --- /dev/null +++ b/src/Model/UserUpdatesData.php @@ -0,0 +1,67 @@ +anime; + } + + /** + * Last updated Anime. + * + * @param UserUpdatesDataAnimeItem[] $anime + * + * @return self + */ + public function setAnime(array $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * Last updated Manga. + * + * @return UserUpdatesDataMangaItem[] + */ + public function getManga(): array + { + return $this->manga; + } + + /** + * Last updated Manga. + * + * @param UserUpdatesDataMangaItem[] $manga + * + * @return self + */ + public function setManga(array $manga): self + { + $this->manga = $manga; + + return $this; + } +} diff --git a/src/Model/UserUpdatesDataAnimeItem.php b/src/Model/UserUpdatesDataAnimeItem.php new file mode 100644 index 0000000..c6628fa --- /dev/null +++ b/src/Model/UserUpdatesDataAnimeItem.php @@ -0,0 +1,157 @@ +entry; + } + + /** + * @param AnimeMeta $entry + * + * @return self + */ + public function setEntry(AnimeMeta $entry): self + { + $this->entry = $entry; + + return $this; + } + + /** + * @return int|null + */ + public function getScore(): ?int + { + return $this->score; + } + + /** + * @param int|null $score + * + * @return self + */ + public function setScore(?int $score): self + { + $this->score = $score; + + return $this; + } + + /** + * @return string + */ + public function getStatus(): string + { + return $this->status; + } + + /** + * @param string $status + * + * @return self + */ + public function setStatus(string $status): self + { + $this->status = $status; + + return $this; + } + + /** + * @return int|null + */ + public function getEpisodesSeen(): ?int + { + return $this->episodesSeen; + } + + /** + * @param int|null $episodesSeen + * + * @return self + */ + public function setEpisodesSeen(?int $episodesSeen): self + { + $this->episodesSeen = $episodesSeen; + + return $this; + } + + /** + * @return int|null + */ + public function getEpisodesTotal(): ?int + { + return $this->episodesTotal; + } + + /** + * @param int|null $episodesTotal + * + * @return self + */ + public function setEpisodesTotal(?int $episodesTotal): self + { + $this->episodesTotal = $episodesTotal; + + return $this; + } + + /** + * ISO8601 format. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * ISO8601 format. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } +} diff --git a/src/Model/UserUpdatesDataMangaItem.php b/src/Model/UserUpdatesDataMangaItem.php new file mode 100644 index 0000000..4935baa --- /dev/null +++ b/src/Model/UserUpdatesDataMangaItem.php @@ -0,0 +1,205 @@ +entry; + } + + /** + * @param MangaMeta $entry + * + * @return self + */ + public function setEntry(MangaMeta $entry): self + { + $this->entry = $entry; + + return $this; + } + + /** + * @return int|null + */ + public function getScore(): ?int + { + return $this->score; + } + + /** + * @param int|null $score + * + * @return self + */ + public function setScore(?int $score): self + { + $this->score = $score; + + return $this; + } + + /** + * @return string + */ + public function getStatus(): string + { + return $this->status; + } + + /** + * @param string $status + * + * @return self + */ + public function setStatus(string $status): self + { + $this->status = $status; + + return $this; + } + + /** + * @return int|null + */ + public function getChaptersRead(): ?int + { + return $this->chaptersRead; + } + + /** + * @param int|null $chaptersRead + * + * @return self + */ + public function setChaptersRead(?int $chaptersRead): self + { + $this->chaptersRead = $chaptersRead; + + return $this; + } + + /** + * @return int|null + */ + public function getChaptersTotal(): ?int + { + return $this->chaptersTotal; + } + + /** + * @param int|null $chaptersTotal + * + * @return self + */ + public function setChaptersTotal(?int $chaptersTotal): self + { + $this->chaptersTotal = $chaptersTotal; + + return $this; + } + + /** + * @return int|null + */ + public function getVolumesRead(): ?int + { + return $this->volumesRead; + } + + /** + * @param int|null $volumesRead + * + * @return self + */ + public function setVolumesRead(?int $volumesRead): self + { + $this->volumesRead = $volumesRead; + + return $this; + } + + /** + * @return int|null + */ + public function getVolumesTotal(): ?int + { + return $this->volumesTotal; + } + + /** + * @param int|null $volumesTotal + * + * @return self + */ + public function setVolumesTotal(?int $volumesTotal): self + { + $this->volumesTotal = $volumesTotal; + + return $this; + } + + /** + * ISO8601 format. + * + * @return string + */ + public function getDate(): string + { + return $this->date; + } + + /** + * ISO8601 format. + * + * @param string $date + * + * @return self + */ + public function setDate(string $date): self + { + $this->date = $date; + + return $this; + } +} diff --git a/src/Model/UsersSearch.php b/src/Model/UsersSearch.php new file mode 100644 index 0000000..caf6e1e --- /dev/null +++ b/src/Model/UsersSearch.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param UsersSearchdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/UsersSearchdataItem.php b/src/Model/UsersSearchdataItem.php new file mode 100644 index 0000000..fb1c0f2 --- /dev/null +++ b/src/Model/UsersSearchdataItem.php @@ -0,0 +1,121 @@ +url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * MyAnimeList Username. + * + * @return string + */ + public function getUsername(): string + { + return $this->username; + } + + /** + * MyAnimeList Username. + * + * @param string $username + * + * @return self + */ + public function setUsername(string $username): self + { + $this->username = $username; + + return $this; + } + + /** + * @return UserImages + */ + public function getImages(): UserImages + { + return $this->images; + } + + /** + * @param UserImages $images + * + * @return self + */ + public function setImages(UserImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Last Online Date ISO8601. + * + * @return string + */ + public function getLastOnline(): string + { + return $this->lastOnline; + } + + /** + * Last Online Date ISO8601. + * + * @param string $lastOnline + * + * @return self + */ + public function setLastOnline(string $lastOnline): self + { + $this->lastOnline = $lastOnline; + + return $this; + } +} diff --git a/src/Model/UsersTemp.php b/src/Model/UsersTemp.php new file mode 100644 index 0000000..3fe234d --- /dev/null +++ b/src/Model/UsersTemp.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UsersTempDataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UsersTempDataItem.php b/src/Model/UsersTempDataItem.php new file mode 100644 index 0000000..a89f187 --- /dev/null +++ b/src/Model/UsersTempDataItem.php @@ -0,0 +1,397 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param int $malId + * + * @return self + */ + public function setMalId(int $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList Username. + * + * @return string + */ + public function getUsername(): string + { + return $this->username; + } + + /** + * MyAnimeList Username. + * + * @param string $username + * + * @return self + */ + public function setUsername(string $username): self + { + $this->username = $username; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Images. + * + * @return UsersTempDataItemImages + */ + public function getImages(): UsersTempDataItemImages + { + return $this->images; + } + + /** + * Images. + * + * @param UsersTempDataItemImages $images + * + * @return self + */ + public function setImages(UsersTempDataItemImages $images): self + { + $this->images = $images; + + return $this; + } + + /** + * Last Online Date ISO8601. + * + * @return string + */ + public function getLastOnline(): string + { + return $this->lastOnline; + } + + /** + * Last Online Date ISO8601. + * + * @param string $lastOnline + * + * @return self + */ + public function setLastOnline(string $lastOnline): self + { + $this->lastOnline = $lastOnline; + + return $this; + } + + /** + * User Gender. + * + * @return string + */ + public function getGender(): string + { + return $this->gender; + } + + /** + * User Gender. + * + * @param string $gender + * + * @return self + */ + public function setGender(string $gender): self + { + $this->gender = $gender; + + return $this; + } + + /** + * Birthday Date ISO8601. + * + * @return string + */ + public function getBirthday(): string + { + return $this->birthday; + } + + /** + * Birthday Date ISO8601. + * + * @param string $birthday + * + * @return self + */ + public function setBirthday(string $birthday): self + { + $this->birthday = $birthday; + + return $this; + } + + /** + * Location. + * + * @return string + */ + public function getLocation(): string + { + return $this->location; + } + + /** + * Location. + * + * @param string $location + * + * @return self + */ + public function setLocation(string $location): self + { + $this->location = $location; + + return $this; + } + + /** + * Joined Date ISO8601. + * + * @return string + */ + public function getJoined(): string + { + return $this->joined; + } + + /** + * Joined Date ISO8601. + * + * @param string $joined + * + * @return self + */ + public function setJoined(string $joined): self + { + $this->joined = $joined; + + return $this; + } + + /** + * Anime Stats. + * + * @return UsersTempDataItemAnimeStats + */ + public function getAnimeStats(): UsersTempDataItemAnimeStats + { + return $this->animeStats; + } + + /** + * Anime Stats. + * + * @param UsersTempDataItemAnimeStats $animeStats + * + * @return self + */ + public function setAnimeStats(UsersTempDataItemAnimeStats $animeStats): self + { + $this->animeStats = $animeStats; + + return $this; + } + + /** + * Manga Stats. + * + * @return UsersTempDataItemMangaStats + */ + public function getMangaStats(): UsersTempDataItemMangaStats + { + return $this->mangaStats; + } + + /** + * Manga Stats. + * + * @param UsersTempDataItemMangaStats $mangaStats + * + * @return self + */ + public function setMangaStats(UsersTempDataItemMangaStats $mangaStats): self + { + $this->mangaStats = $mangaStats; + + return $this; + } + + /** + * Favorite entries. + * + * @return UsersTempDataItemFavorites + */ + public function getFavorites(): UsersTempDataItemFavorites + { + return $this->favorites; + } + + /** + * Favorite entries. + * + * @param UsersTempDataItemFavorites $favorites + * + * @return self + */ + public function setFavorites(UsersTempDataItemFavorites $favorites): self + { + $this->favorites = $favorites; + + return $this; + } + + /** + * User About. NOTE: About information is customizable by users through BBCode on MyAnimeList. This means users can add multimedia content, different text sizes, etc. Due to this freeform, Jikan returns parsed HTML. Validate on your end! + * + * @return string + */ + public function getAbout(): string + { + return $this->about; + } + + /** + * User About. NOTE: About information is customizable by users through BBCode on MyAnimeList. This means users can add multimedia content, different text sizes, etc. Due to this freeform, Jikan returns parsed HTML. Validate on your end! + * + * @param string $about + * + * @return self + */ + public function setAbout(string $about): self + { + $this->about = $about; + + return $this; + } +} diff --git a/src/Model/UsersTempDataItemAnimeStats.php b/src/Model/UsersTempDataItemAnimeStats.php new file mode 100644 index 0000000..cd2a455 --- /dev/null +++ b/src/Model/UsersTempDataItemAnimeStats.php @@ -0,0 +1,307 @@ +daysWatched; + } + + /** + * Number of days spent watching Anime. + * + * @param float $daysWatched + * + * @return self + */ + public function setDaysWatched(float $daysWatched): self + { + $this->daysWatched = $daysWatched; + + return $this; + } + + /** + * Mean Score. + * + * @return float + */ + public function getMeanScore(): float + { + return $this->meanScore; + } + + /** + * Mean Score. + * + * @param float $meanScore + * + * @return self + */ + public function setMeanScore(float $meanScore): self + { + $this->meanScore = $meanScore; + + return $this; + } + + /** + * Anime Watching. + * + * @return int + */ + public function getWatching(): int + { + return $this->watching; + } + + /** + * Anime Watching. + * + * @param int $watching + * + * @return self + */ + public function setWatching(int $watching): self + { + $this->watching = $watching; + + return $this; + } + + /** + * Anime Completed. + * + * @return int + */ + public function getCompleted(): int + { + return $this->completed; + } + + /** + * Anime Completed. + * + * @param int $completed + * + * @return self + */ + public function setCompleted(int $completed): self + { + $this->completed = $completed; + + return $this; + } + + /** + * Anime On-Hold. + * + * @return int + */ + public function getOnHold(): int + { + return $this->onHold; + } + + /** + * Anime On-Hold. + * + * @param int $onHold + * + * @return self + */ + public function setOnHold(int $onHold): self + { + $this->onHold = $onHold; + + return $this; + } + + /** + * Anime Dropped. + * + * @return int + */ + public function getDropped(): int + { + return $this->dropped; + } + + /** + * Anime Dropped. + * + * @param int $dropped + * + * @return self + */ + public function setDropped(int $dropped): self + { + $this->dropped = $dropped; + + return $this; + } + + /** + * Anime Planned to Watch. + * + * @return int + */ + public function getPlanToWatch(): int + { + return $this->planToWatch; + } + + /** + * Anime Planned to Watch. + * + * @param int $planToWatch + * + * @return self + */ + public function setPlanToWatch(int $planToWatch): self + { + $this->planToWatch = $planToWatch; + + return $this; + } + + /** + * Total Anime entries on User list. + * + * @return int + */ + public function getTotalEntries(): int + { + return $this->totalEntries; + } + + /** + * Total Anime entries on User list. + * + * @param int $totalEntries + * + * @return self + */ + public function setTotalEntries(int $totalEntries): self + { + $this->totalEntries = $totalEntries; + + return $this; + } + + /** + * Anime re-watched. + * + * @return int + */ + public function getRewatched(): int + { + return $this->rewatched; + } + + /** + * Anime re-watched. + * + * @param int $rewatched + * + * @return self + */ + public function setRewatched(int $rewatched): self + { + $this->rewatched = $rewatched; + + return $this; + } + + /** + * Number of Anime Episodes Watched. + * + * @return int + */ + public function getEpisodesWatched(): int + { + return $this->episodesWatched; + } + + /** + * Number of Anime Episodes Watched. + * + * @param int $episodesWatched + * + * @return self + */ + public function setEpisodesWatched(int $episodesWatched): self + { + $this->episodesWatched = $episodesWatched; + + return $this; + } +} diff --git a/src/Model/UsersTempDataItemFavorites.php b/src/Model/UsersTempDataItemFavorites.php new file mode 100644 index 0000000..e029042 --- /dev/null +++ b/src/Model/UsersTempDataItemFavorites.php @@ -0,0 +1,127 @@ +anime; + } + + /** + * Favorite Anime. + * + * @param EntryMeta[] $anime + * + * @return self + */ + public function setAnime(array $anime): self + { + $this->anime = $anime; + + return $this; + } + + /** + * Favorite Manga. + * + * @return EntryMeta[] + */ + public function getManga(): array + { + return $this->manga; + } + + /** + * Favorite Manga. + * + * @param EntryMeta[] $manga + * + * @return self + */ + public function setManga(array $manga): self + { + $this->manga = $manga; + + return $this; + } + + /** + * Favorite Characters. + * + * @return EntryMeta[] + */ + public function getCharacters(): array + { + return $this->characters; + } + + /** + * Favorite Characters. + * + * @param EntryMeta[] $characters + * + * @return self + */ + public function setCharacters(array $characters): self + { + $this->characters = $characters; + + return $this; + } + + /** + * Favorite People. + * + * @return EntryMeta[] + */ + public function getPeople(): array + { + return $this->people; + } + + /** + * Favorite People. + * + * @param EntryMeta[] $people + * + * @return self + */ + public function setPeople(array $people): self + { + $this->people = $people; + + return $this; + } +} diff --git a/src/Model/UsersTempDataItemImages.php b/src/Model/UsersTempDataItemImages.php new file mode 100644 index 0000000..9555adb --- /dev/null +++ b/src/Model/UsersTempDataItemImages.php @@ -0,0 +1,67 @@ +jpg; + } + + /** + * Available images in JPG. + * + * @param UsersTempDataItemImagesJpg $jpg + * + * @return self + */ + public function setJpg(UsersTempDataItemImagesJpg $jpg): self + { + $this->jpg = $jpg; + + return $this; + } + + /** + * Available images in WEBP. + * + * @return UsersTempDataItemImagesWebp + */ + public function getWebp(): UsersTempDataItemImagesWebp + { + return $this->webp; + } + + /** + * Available images in WEBP. + * + * @param UsersTempDataItemImagesWebp $webp + * + * @return self + */ + public function setWebp(UsersTempDataItemImagesWebp $webp): self + { + $this->webp = $webp; + + return $this; + } +} diff --git a/src/Model/UsersTempDataItemImagesJpg.php b/src/Model/UsersTempDataItemImagesJpg.php new file mode 100644 index 0000000..09ba97e --- /dev/null +++ b/src/Model/UsersTempDataItemImagesJpg.php @@ -0,0 +1,37 @@ +imageUrl; + } + + /** + * Image URL JPG (225x335). + * + * @param string $imageUrl + * + * @return self + */ + public function setImageUrl(string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } +} diff --git a/src/Model/UsersTempDataItemImagesWebp.php b/src/Model/UsersTempDataItemImagesWebp.php new file mode 100644 index 0000000..5f46bb6 --- /dev/null +++ b/src/Model/UsersTempDataItemImagesWebp.php @@ -0,0 +1,37 @@ +imageUrl; + } + + /** + * Image URL WEBP (225x335). + * + * @param string $imageUrl + * + * @return self + */ + public function setImageUrl(string $imageUrl): self + { + $this->imageUrl = $imageUrl; + + return $this; + } +} diff --git a/src/Model/UsersTempDataItemMangaStats.php b/src/Model/UsersTempDataItemMangaStats.php new file mode 100644 index 0000000..27e3fda --- /dev/null +++ b/src/Model/UsersTempDataItemMangaStats.php @@ -0,0 +1,337 @@ +daysRead; + } + + /** + * Number of days spent reading Manga. + * + * @param float $daysRead + * + * @return self + */ + public function setDaysRead(float $daysRead): self + { + $this->daysRead = $daysRead; + + return $this; + } + + /** + * Mean Score. + * + * @return float + */ + public function getMeanScore(): float + { + return $this->meanScore; + } + + /** + * Mean Score. + * + * @param float $meanScore + * + * @return self + */ + public function setMeanScore(float $meanScore): self + { + $this->meanScore = $meanScore; + + return $this; + } + + /** + * Manga Reading. + * + * @return int + */ + public function getReading(): int + { + return $this->reading; + } + + /** + * Manga Reading. + * + * @param int $reading + * + * @return self + */ + public function setReading(int $reading): self + { + $this->reading = $reading; + + return $this; + } + + /** + * Manga Completed. + * + * @return int + */ + public function getCompleted(): int + { + return $this->completed; + } + + /** + * Manga Completed. + * + * @param int $completed + * + * @return self + */ + public function setCompleted(int $completed): self + { + $this->completed = $completed; + + return $this; + } + + /** + * Manga On-Hold. + * + * @return int + */ + public function getOnHold(): int + { + return $this->onHold; + } + + /** + * Manga On-Hold. + * + * @param int $onHold + * + * @return self + */ + public function setOnHold(int $onHold): self + { + $this->onHold = $onHold; + + return $this; + } + + /** + * Manga Dropped. + * + * @return int + */ + public function getDropped(): int + { + return $this->dropped; + } + + /** + * Manga Dropped. + * + * @param int $dropped + * + * @return self + */ + public function setDropped(int $dropped): self + { + $this->dropped = $dropped; + + return $this; + } + + /** + * Manga Planned to Read. + * + * @return int + */ + public function getPlanToRead(): int + { + return $this->planToRead; + } + + /** + * Manga Planned to Read. + * + * @param int $planToRead + * + * @return self + */ + public function setPlanToRead(int $planToRead): self + { + $this->planToRead = $planToRead; + + return $this; + } + + /** + * Total Manga entries on User list. + * + * @return int + */ + public function getTotalEntries(): int + { + return $this->totalEntries; + } + + /** + * Total Manga entries on User list. + * + * @param int $totalEntries + * + * @return self + */ + public function setTotalEntries(int $totalEntries): self + { + $this->totalEntries = $totalEntries; + + return $this; + } + + /** + * Manga re-read. + * + * @return int + */ + public function getReread(): int + { + return $this->reread; + } + + /** + * Manga re-read. + * + * @param int $reread + * + * @return self + */ + public function setReread(int $reread): self + { + $this->reread = $reread; + + return $this; + } + + /** + * Number of Manga Chapters Read. + * + * @return int + */ + public function getChaptersRead(): int + { + return $this->chaptersRead; + } + + /** + * Number of Manga Chapters Read. + * + * @param int $chaptersRead + * + * @return self + */ + public function setChaptersRead(int $chaptersRead): self + { + $this->chaptersRead = $chaptersRead; + + return $this; + } + + /** + * Number of Manga Volumes Read. + * + * @return int + */ + public function getVolumesRead(): int + { + return $this->volumesRead; + } + + /** + * Number of Manga Volumes Read. + * + * @param int $volumesRead + * + * @return self + */ + public function setVolumesRead(int $volumesRead): self + { + $this->volumesRead = $volumesRead; + + return $this; + } +} diff --git a/src/Model/UsersUserbyidIdGetResponse200.php b/src/Model/UsersUserbyidIdGetResponse200.php new file mode 100644 index 0000000..3841f67 --- /dev/null +++ b/src/Model/UsersUserbyidIdGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * User Meta By ID. + * + * @param UserById $data + * + * @return self + */ + public function setData(UserById $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UsersUsernameFavoritesGetResponse200.php b/src/Model/UsersUsernameFavoritesGetResponse200.php new file mode 100644 index 0000000..827f9a8 --- /dev/null +++ b/src/Model/UsersUsernameFavoritesGetResponse200.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UserFavorites $data + * + * @return self + */ + public function setData(UserFavorites $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UsersUsernameFullGetResponse200.php b/src/Model/UsersUsernameFullGetResponse200.php new file mode 100644 index 0000000..087f0ec --- /dev/null +++ b/src/Model/UsersUsernameFullGetResponse200.php @@ -0,0 +1,37 @@ +data; + } + + /** + * Transform the resource into an array. + * + * @param UserProfileFull $data + * + * @return self + */ + public function setData(UserProfileFull $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UsersUsernameGetResponse200.php b/src/Model/UsersUsernameGetResponse200.php new file mode 100644 index 0000000..ae0ba1a --- /dev/null +++ b/src/Model/UsersUsernameGetResponse200.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UserProfile $data + * + * @return self + */ + public function setData(UserProfile $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UsersUsernameReviewsGetResponse200.php b/src/Model/UsersUsernameReviewsGetResponse200.php new file mode 100644 index 0000000..8ec947d --- /dev/null +++ b/src/Model/UsersUsernameReviewsGetResponse200.php @@ -0,0 +1,31 @@ +data; + } + + /** + * @param UsersUsernameReviewsGetResponse200Data $data + * + * @return self + */ + public function setData(UsersUsernameReviewsGetResponse200Data $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Model/UsersUsernameReviewsGetResponse200Data.php b/src/Model/UsersUsernameReviewsGetResponse200Data.php new file mode 100644 index 0000000..fbfa0ce --- /dev/null +++ b/src/Model/UsersUsernameReviewsGetResponse200Data.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param mixed[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/WatchEpisodes.php b/src/Model/WatchEpisodes.php new file mode 100644 index 0000000..9f2a9ab --- /dev/null +++ b/src/Model/WatchEpisodes.php @@ -0,0 +1,55 @@ +data; + } + + /** + * @param WatchEpisodesdataItem[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } + + /** + * @return PaginationPagination + */ + public function getPagination(): PaginationPagination + { + return $this->pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } +} diff --git a/src/Model/WatchEpisodesdataItem.php b/src/Model/WatchEpisodesdataItem.php new file mode 100644 index 0000000..4cbb933 --- /dev/null +++ b/src/Model/WatchEpisodesdataItem.php @@ -0,0 +1,91 @@ +entry; + } + + /** + * @param AnimeMeta $entry + * + * @return self + */ + public function setEntry(AnimeMeta $entry): self + { + $this->entry = $entry; + + return $this; + } + + /** + * Recent Episodes (max 2 listed). + * + * @return WatchEpisodesdataItemEpisodesItem[] + */ + public function getEpisodes(): array + { + return $this->episodes; + } + + /** + * Recent Episodes (max 2 listed). + * + * @param WatchEpisodesdataItemEpisodesItem[] $episodes + * + * @return self + */ + public function setEpisodes(array $episodes): self + { + $this->episodes = $episodes; + + return $this; + } + + /** + * Region Locked Episode. + * + * @return bool + */ + public function getRegionLocked(): bool + { + return $this->regionLocked; + } + + /** + * Region Locked Episode. + * + * @param bool $regionLocked + * + * @return self + */ + public function setRegionLocked(bool $regionLocked): self + { + $this->regionLocked = $regionLocked; + + return $this; + } +} diff --git a/src/Model/WatchEpisodesdataItemEpisodesItem.php b/src/Model/WatchEpisodesdataItemEpisodesItem.php new file mode 100644 index 0000000..e2c8aab --- /dev/null +++ b/src/Model/WatchEpisodesdataItemEpisodesItem.php @@ -0,0 +1,127 @@ +malId; + } + + /** + * MyAnimeList ID. + * + * @param string $malId + * + * @return self + */ + public function setMalId(string $malId): self + { + $this->malId = $malId; + + return $this; + } + + /** + * MyAnimeList URL. + * + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * MyAnimeList URL. + * + * @param string $url + * + * @return self + */ + public function setUrl(string $url): self + { + $this->url = $url; + + return $this; + } + + /** + * Episode Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Episode Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * For MyAnimeList Premium Users. + * + * @return bool + */ + public function getPremium(): bool + { + return $this->premium; + } + + /** + * For MyAnimeList Premium Users. + * + * @param bool $premium + * + * @return self + */ + public function setPremium(bool $premium): self + { + $this->premium = $premium; + + return $this; + } +} diff --git a/src/Model/WatchPromos.php b/src/Model/WatchPromos.php new file mode 100644 index 0000000..d45e85e --- /dev/null +++ b/src/Model/WatchPromos.php @@ -0,0 +1,85 @@ +pagination; + } + + /** + * @param PaginationPagination $pagination + * + * @return self + */ + public function setPagination(PaginationPagination $pagination): self + { + $this->pagination = $pagination; + + return $this; + } + + /** + * Promo Title. + * + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * Promo Title. + * + * @param string $title + * + * @return self + */ + public function setTitle(string $title): self + { + $this->title = $title; + + return $this; + } + + /** + * @return object[] + */ + public function getData(): array + { + return $this->data; + } + + /** + * @param object[] $data + * + * @return self + */ + public function setData(array $data): self + { + $this->data = $data; + + return $this; + } +} diff --git a/src/Normalizer/AnimeCharactersDataItemCharacterNormalizer.php b/src/Normalizer/AnimeCharactersDataItemCharacterNormalizer.php new file mode 100644 index 0000000..c24db64 --- /dev/null +++ b/src/Normalizer/AnimeCharactersDataItemCharacterNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CharacterImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeCharactersDataItemNormalizer.php b/src/Normalizer/AnimeCharactersDataItemNormalizer.php new file mode 100644 index 0000000..ca9ac95 --- /dev/null +++ b/src/Normalizer/AnimeCharactersDataItemNormalizer.php @@ -0,0 +1,91 @@ +setCharacter($this->denormalizer->denormalize($data['character'], 'Jikan\\JikanPHP\\Model\\AnimeCharactersDataItemCharacter', 'json', $context)); + } + if (\array_key_exists('role', $data)) { + $object->setRole($data['role']); + } + if (\array_key_exists('voice_actors', $data)) { + $values = []; + foreach ($data['voice_actors'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeCharactersDataItemVoiceActorsItem', 'json', $context); + } + $object->setVoiceActors($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getCharacter()) { + $data['character'] = $this->normalizer->normalize($object->getCharacter(), 'json', $context); + } + if (null !== $object->getRole()) { + $data['role'] = $object->getRole(); + } + if (null !== $object->getVoiceActors()) { + $values = []; + foreach ($object->getVoiceActors() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['voice_actors'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeCharactersDataItemVoiceActorsItemNormalizer.php b/src/Normalizer/AnimeCharactersDataItemVoiceActorsItemNormalizer.php new file mode 100644 index 0000000..57da70a --- /dev/null +++ b/src/Normalizer/AnimeCharactersDataItemVoiceActorsItemNormalizer.php @@ -0,0 +1,77 @@ +setPerson($this->denormalizer->denormalize($data['person'], 'Jikan\\JikanPHP\\Model\\AnimeCharactersDataItemVoiceActorsItemPerson', 'json', $context)); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPerson()) { + $data['person'] = $this->normalizer->normalize($object->getPerson(), 'json', $context); + } + if (null !== $object->getLanguage()) { + $data['language'] = $object->getLanguage(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeCharactersDataItemVoiceActorsItemPersonNormalizer.php b/src/Normalizer/AnimeCharactersDataItemVoiceActorsItemPersonNormalizer.php new file mode 100644 index 0000000..947a7e2 --- /dev/null +++ b/src/Normalizer/AnimeCharactersDataItemVoiceActorsItemPersonNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\PeopleImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeCharactersNormalizer.php b/src/Normalizer/AnimeCharactersNormalizer.php new file mode 100644 index 0000000..9d93134 --- /dev/null +++ b/src/Normalizer/AnimeCharactersNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeCharactersDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeEpisodeNormalizer.php b/src/Normalizer/AnimeEpisodeNormalizer.php new file mode 100644 index 0000000..22d2e10 --- /dev/null +++ b/src/Normalizer/AnimeEpisodeNormalizer.php @@ -0,0 +1,135 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('title_japanese', $data) && null !== $data['title_japanese']) { + $object->setTitleJapanese($data['title_japanese']); + } elseif (\array_key_exists('title_japanese', $data) && null === $data['title_japanese']) { + $object->setTitleJapanese(null); + } + if (\array_key_exists('title_romanji', $data) && null !== $data['title_romanji']) { + $object->setTitleRomanji($data['title_romanji']); + } elseif (\array_key_exists('title_romanji', $data) && null === $data['title_romanji']) { + $object->setTitleRomanji(null); + } + if (\array_key_exists('duration', $data) && null !== $data['duration']) { + $object->setDuration($data['duration']); + } elseif (\array_key_exists('duration', $data) && null === $data['duration']) { + $object->setDuration(null); + } + if (\array_key_exists('aired', $data) && null !== $data['aired']) { + $object->setAired($data['aired']); + } elseif (\array_key_exists('aired', $data) && null === $data['aired']) { + $object->setAired(null); + } + if (\array_key_exists('filler', $data)) { + $object->setFiller($data['filler']); + } + if (\array_key_exists('recap', $data)) { + $object->setRecap($data['recap']); + } + if (\array_key_exists('synopsis', $data) && null !== $data['synopsis']) { + $object->setSynopsis($data['synopsis']); + } elseif (\array_key_exists('synopsis', $data) && null === $data['synopsis']) { + $object->setSynopsis(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getTitleJapanese()) { + $data['title_japanese'] = $object->getTitleJapanese(); + } + if (null !== $object->getTitleRomanji()) { + $data['title_romanji'] = $object->getTitleRomanji(); + } + if (null !== $object->getDuration()) { + $data['duration'] = $object->getDuration(); + } + if (null !== $object->getAired()) { + $data['aired'] = $object->getAired(); + } + if (null !== $object->getFiller()) { + $data['filler'] = $object->getFiller(); + } + if (null !== $object->getRecap()) { + $data['recap'] = $object->getRecap(); + } + if (null !== $object->getSynopsis()) { + $data['synopsis'] = $object->getSynopsis(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeEpisodesNormalizer.php b/src/Normalizer/AnimeEpisodesNormalizer.php new file mode 100644 index 0000000..c5760c5 --- /dev/null +++ b/src/Normalizer/AnimeEpisodesNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeEpisodesdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeEpisodesdataItemNormalizer.php b/src/Normalizer/AnimeEpisodesdataItemNormalizer.php new file mode 100644 index 0000000..bb73671 --- /dev/null +++ b/src/Normalizer/AnimeEpisodesdataItemNormalizer.php @@ -0,0 +1,135 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('title_japanese', $data) && null !== $data['title_japanese']) { + $object->setTitleJapanese($data['title_japanese']); + } elseif (\array_key_exists('title_japanese', $data) && null === $data['title_japanese']) { + $object->setTitleJapanese(null); + } + if (\array_key_exists('title_romanji', $data) && null !== $data['title_romanji']) { + $object->setTitleRomanji($data['title_romanji']); + } elseif (\array_key_exists('title_romanji', $data) && null === $data['title_romanji']) { + $object->setTitleRomanji(null); + } + if (\array_key_exists('duration', $data) && null !== $data['duration']) { + $object->setDuration($data['duration']); + } elseif (\array_key_exists('duration', $data) && null === $data['duration']) { + $object->setDuration(null); + } + if (\array_key_exists('aired', $data) && null !== $data['aired']) { + $object->setAired($data['aired']); + } elseif (\array_key_exists('aired', $data) && null === $data['aired']) { + $object->setAired(null); + } + if (\array_key_exists('filler', $data)) { + $object->setFiller($data['filler']); + } + if (\array_key_exists('recap', $data)) { + $object->setRecap($data['recap']); + } + if (\array_key_exists('forum_url', $data) && null !== $data['forum_url']) { + $object->setForumUrl($data['forum_url']); + } elseif (\array_key_exists('forum_url', $data) && null === $data['forum_url']) { + $object->setForumUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getTitleJapanese()) { + $data['title_japanese'] = $object->getTitleJapanese(); + } + if (null !== $object->getTitleRomanji()) { + $data['title_romanji'] = $object->getTitleRomanji(); + } + if (null !== $object->getDuration()) { + $data['duration'] = $object->getDuration(); + } + if (null !== $object->getAired()) { + $data['aired'] = $object->getAired(); + } + if (null !== $object->getFiller()) { + $data['filler'] = $object->getFiller(); + } + if (null !== $object->getRecap()) { + $data['recap'] = $object->getRecap(); + } + if (null !== $object->getForumUrl()) { + $data['forum_url'] = $object->getForumUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeFullExternalItemNormalizer.php b/src/Normalizer/AnimeFullExternalItemNormalizer.php new file mode 100644 index 0000000..59d6e65 --- /dev/null +++ b/src/Normalizer/AnimeFullExternalItemNormalizer.php @@ -0,0 +1,77 @@ +setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeFullNormalizer.php b/src/Normalizer/AnimeFullNormalizer.php new file mode 100644 index 0000000..2125f36 --- /dev/null +++ b/src/Normalizer/AnimeFullNormalizer.php @@ -0,0 +1,440 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\AnimeImages', 'json', $context)); + } + if (\array_key_exists('trailer', $data)) { + $object->setTrailer($this->denormalizer->denormalize($data['trailer'], 'Jikan\\JikanPHP\\Model\\TrailerBase', 'json', $context)); + } + if (\array_key_exists('approved', $data)) { + $object->setApproved($data['approved']); + } + if (\array_key_exists('titles', $data)) { + $values = []; + foreach ($data['titles'] as $value) { + $values[] = $value; + } + $object->setTitles($values); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('title_english', $data) && null !== $data['title_english']) { + $object->setTitleEnglish($data['title_english']); + } elseif (\array_key_exists('title_english', $data) && null === $data['title_english']) { + $object->setTitleEnglish(null); + } + if (\array_key_exists('title_japanese', $data) && null !== $data['title_japanese']) { + $object->setTitleJapanese($data['title_japanese']); + } elseif (\array_key_exists('title_japanese', $data) && null === $data['title_japanese']) { + $object->setTitleJapanese(null); + } + if (\array_key_exists('title_synonyms', $data)) { + $values_1 = []; + foreach ($data['title_synonyms'] as $value_1) { + $values_1[] = $value_1; + } + $object->setTitleSynonyms($values_1); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('source', $data) && null !== $data['source']) { + $object->setSource($data['source']); + } elseif (\array_key_exists('source', $data) && null === $data['source']) { + $object->setSource(null); + } + if (\array_key_exists('episodes', $data) && null !== $data['episodes']) { + $object->setEpisodes($data['episodes']); + } elseif (\array_key_exists('episodes', $data) && null === $data['episodes']) { + $object->setEpisodes(null); + } + if (\array_key_exists('status', $data) && null !== $data['status']) { + $object->setStatus($data['status']); + } elseif (\array_key_exists('status', $data) && null === $data['status']) { + $object->setStatus(null); + } + if (\array_key_exists('airing', $data)) { + $object->setAiring($data['airing']); + } + if (\array_key_exists('aired', $data)) { + $object->setAired($this->denormalizer->denormalize($data['aired'], 'Jikan\\JikanPHP\\Model\\Daterange', 'json', $context)); + } + if (\array_key_exists('duration', $data) && null !== $data['duration']) { + $object->setDuration($data['duration']); + } elseif (\array_key_exists('duration', $data) && null === $data['duration']) { + $object->setDuration(null); + } + if (\array_key_exists('rating', $data) && null !== $data['rating']) { + $object->setRating($data['rating']); + } elseif (\array_key_exists('rating', $data) && null === $data['rating']) { + $object->setRating(null); + } + if (\array_key_exists('score', $data) && null !== $data['score']) { + $object->setScore($data['score']); + } elseif (\array_key_exists('score', $data) && null === $data['score']) { + $object->setScore(null); + } + if (\array_key_exists('scored_by', $data) && null !== $data['scored_by']) { + $object->setScoredBy($data['scored_by']); + } elseif (\array_key_exists('scored_by', $data) && null === $data['scored_by']) { + $object->setScoredBy(null); + } + if (\array_key_exists('rank', $data) && null !== $data['rank']) { + $object->setRank($data['rank']); + } elseif (\array_key_exists('rank', $data) && null === $data['rank']) { + $object->setRank(null); + } + if (\array_key_exists('popularity', $data) && null !== $data['popularity']) { + $object->setPopularity($data['popularity']); + } elseif (\array_key_exists('popularity', $data) && null === $data['popularity']) { + $object->setPopularity(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $object->setMembers($data['members']); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('favorites', $data) && null !== $data['favorites']) { + $object->setFavorites($data['favorites']); + } elseif (\array_key_exists('favorites', $data) && null === $data['favorites']) { + $object->setFavorites(null); + } + if (\array_key_exists('synopsis', $data) && null !== $data['synopsis']) { + $object->setSynopsis($data['synopsis']); + } elseif (\array_key_exists('synopsis', $data) && null === $data['synopsis']) { + $object->setSynopsis(null); + } + if (\array_key_exists('background', $data) && null !== $data['background']) { + $object->setBackground($data['background']); + } elseif (\array_key_exists('background', $data) && null === $data['background']) { + $object->setBackground(null); + } + if (\array_key_exists('season', $data) && null !== $data['season']) { + $object->setSeason($data['season']); + } elseif (\array_key_exists('season', $data) && null === $data['season']) { + $object->setSeason(null); + } + if (\array_key_exists('year', $data) && null !== $data['year']) { + $object->setYear($data['year']); + } elseif (\array_key_exists('year', $data) && null === $data['year']) { + $object->setYear(null); + } + if (\array_key_exists('broadcast', $data)) { + $object->setBroadcast($this->denormalizer->denormalize($data['broadcast'], 'Jikan\\JikanPHP\\Model\\Broadcast', 'json', $context)); + } + if (\array_key_exists('producers', $data)) { + $values_2 = []; + foreach ($data['producers'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setProducers($values_2); + } + if (\array_key_exists('licensors', $data)) { + $values_3 = []; + foreach ($data['licensors'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setLicensors($values_3); + } + if (\array_key_exists('studios', $data)) { + $values_4 = []; + foreach ($data['studios'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setStudios($values_4); + } + if (\array_key_exists('genres', $data)) { + $values_5 = []; + foreach ($data['genres'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setGenres($values_5); + } + if (\array_key_exists('explicit_genres', $data)) { + $values_6 = []; + foreach ($data['explicit_genres'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setExplicitGenres($values_6); + } + if (\array_key_exists('themes', $data)) { + $values_7 = []; + foreach ($data['themes'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setThemes($values_7); + } + if (\array_key_exists('demographics', $data)) { + $values_8 = []; + foreach ($data['demographics'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setDemographics($values_8); + } + if (\array_key_exists('relations', $data)) { + $values_9 = []; + foreach ($data['relations'] as $value_9) { + $values_9[] = $this->denormalizer->denormalize($value_9, 'Jikan\\JikanPHP\\Model\\AnimeFullRelationsItem', 'json', $context); + } + $object->setRelations($values_9); + } + if (\array_key_exists('theme', $data)) { + $object->setTheme($this->denormalizer->denormalize($data['theme'], 'Jikan\\JikanPHP\\Model\\AnimeFullTheme', 'json', $context)); + } + if (\array_key_exists('external', $data)) { + $values_10 = []; + foreach ($data['external'] as $value_10) { + $values_10[] = $this->denormalizer->denormalize($value_10, 'Jikan\\JikanPHP\\Model\\AnimeFullExternalItem', 'json', $context); + } + $object->setExternal($values_10); + } + if (\array_key_exists('streaming', $data)) { + $values_11 = []; + foreach ($data['streaming'] as $value_11) { + $values_11[] = $this->denormalizer->denormalize($value_11, 'Jikan\\JikanPHP\\Model\\AnimeFullStreamingItem', 'json', $context); + } + $object->setStreaming($values_11); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getTrailer()) { + $data['trailer'] = $this->normalizer->normalize($object->getTrailer(), 'json', $context); + } + if (null !== $object->getApproved()) { + $data['approved'] = $object->getApproved(); + } + if (null !== $object->getTitles()) { + $values = []; + foreach ($object->getTitles() as $value) { + $values[] = $value; + } + $data['titles'] = $values; + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getTitleEnglish()) { + $data['title_english'] = $object->getTitleEnglish(); + } + if (null !== $object->getTitleJapanese()) { + $data['title_japanese'] = $object->getTitleJapanese(); + } + if (null !== $object->getTitleSynonyms()) { + $values_1 = []; + foreach ($object->getTitleSynonyms() as $value_1) { + $values_1[] = $value_1; + } + $data['title_synonyms'] = $values_1; + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getSource()) { + $data['source'] = $object->getSource(); + } + if (null !== $object->getEpisodes()) { + $data['episodes'] = $object->getEpisodes(); + } + if (null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if (null !== $object->getAiring()) { + $data['airing'] = $object->getAiring(); + } + if (null !== $object->getAired()) { + $data['aired'] = $this->normalizer->normalize($object->getAired(), 'json', $context); + } + if (null !== $object->getDuration()) { + $data['duration'] = $object->getDuration(); + } + if (null !== $object->getRating()) { + $data['rating'] = $object->getRating(); + } + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getScoredBy()) { + $data['scored_by'] = $object->getScoredBy(); + } + if (null !== $object->getRank()) { + $data['rank'] = $object->getRank(); + } + if (null !== $object->getPopularity()) { + $data['popularity'] = $object->getPopularity(); + } + if (null !== $object->getMembers()) { + $data['members'] = $object->getMembers(); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getSynopsis()) { + $data['synopsis'] = $object->getSynopsis(); + } + if (null !== $object->getBackground()) { + $data['background'] = $object->getBackground(); + } + if (null !== $object->getSeason()) { + $data['season'] = $object->getSeason(); + } + if (null !== $object->getYear()) { + $data['year'] = $object->getYear(); + } + if (null !== $object->getBroadcast()) { + $data['broadcast'] = $this->normalizer->normalize($object->getBroadcast(), 'json', $context); + } + if (null !== $object->getProducers()) { + $values_2 = []; + foreach ($object->getProducers() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['producers'] = $values_2; + } + if (null !== $object->getLicensors()) { + $values_3 = []; + foreach ($object->getLicensors() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['licensors'] = $values_3; + } + if (null !== $object->getStudios()) { + $values_4 = []; + foreach ($object->getStudios() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['studios'] = $values_4; + } + if (null !== $object->getGenres()) { + $values_5 = []; + foreach ($object->getGenres() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['genres'] = $values_5; + } + if (null !== $object->getExplicitGenres()) { + $values_6 = []; + foreach ($object->getExplicitGenres() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['explicit_genres'] = $values_6; + } + if (null !== $object->getThemes()) { + $values_7 = []; + foreach ($object->getThemes() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['themes'] = $values_7; + } + if (null !== $object->getDemographics()) { + $values_8 = []; + foreach ($object->getDemographics() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); + } + $data['demographics'] = $values_8; + } + if (null !== $object->getRelations()) { + $values_9 = []; + foreach ($object->getRelations() as $value_9) { + $values_9[] = $this->normalizer->normalize($value_9, 'json', $context); + } + $data['relations'] = $values_9; + } + if (null !== $object->getTheme()) { + $data['theme'] = $this->normalizer->normalize($object->getTheme(), 'json', $context); + } + if (null !== $object->getExternal()) { + $values_10 = []; + foreach ($object->getExternal() as $value_10) { + $values_10[] = $this->normalizer->normalize($value_10, 'json', $context); + } + $data['external'] = $values_10; + } + if (null !== $object->getStreaming()) { + $values_11 = []; + foreach ($object->getStreaming() as $value_11) { + $values_11[] = $this->normalizer->normalize($value_11, 'json', $context); + } + $data['streaming'] = $values_11; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeFullRelationsItemNormalizer.php b/src/Normalizer/AnimeFullRelationsItemNormalizer.php new file mode 100644 index 0000000..1dce6b8 --- /dev/null +++ b/src/Normalizer/AnimeFullRelationsItemNormalizer.php @@ -0,0 +1,85 @@ +setRelation($data['relation']); + } + if (\array_key_exists('entry', $data)) { + $values = []; + foreach ($data['entry'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setEntry($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRelation()) { + $data['relation'] = $object->getRelation(); + } + if (null !== $object->getEntry()) { + $values = []; + foreach ($object->getEntry() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['entry'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeFullStreamingItemNormalizer.php b/src/Normalizer/AnimeFullStreamingItemNormalizer.php new file mode 100644 index 0000000..4a987d6 --- /dev/null +++ b/src/Normalizer/AnimeFullStreamingItemNormalizer.php @@ -0,0 +1,77 @@ +setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeFullThemeNormalizer.php b/src/Normalizer/AnimeFullThemeNormalizer.php new file mode 100644 index 0000000..b13cb11 --- /dev/null +++ b/src/Normalizer/AnimeFullThemeNormalizer.php @@ -0,0 +1,93 @@ +setOpenings($values); + } + if (\array_key_exists('endings', $data)) { + $values_1 = []; + foreach ($data['endings'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEndings($values_1); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getOpenings()) { + $values = []; + foreach ($object->getOpenings() as $value) { + $values[] = $value; + } + $data['openings'] = $values; + } + if (null !== $object->getEndings()) { + $values_1 = []; + foreach ($object->getEndings() as $value_1) { + $values_1[] = $value_1; + } + $data['endings'] = $values_1; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeIdEpisodesEpisodeGetResponse200Normalizer.php b/src/Normalizer/AnimeIdEpisodesEpisodeGetResponse200Normalizer.php new file mode 100644 index 0000000..c753529 --- /dev/null +++ b/src/Normalizer/AnimeIdEpisodesEpisodeGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\AnimeEpisode', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeIdFullGetResponse200Normalizer.php b/src/Normalizer/AnimeIdFullGetResponse200Normalizer.php new file mode 100644 index 0000000..d3979a0 --- /dev/null +++ b/src/Normalizer/AnimeIdFullGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\AnimeFull', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeIdGetResponse200Normalizer.php b/src/Normalizer/AnimeIdGetResponse200Normalizer.php new file mode 100644 index 0000000..4a64bc2 --- /dev/null +++ b/src/Normalizer/AnimeIdGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Anime', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeIdRelationsGetResponse200Normalizer.php b/src/Normalizer/AnimeIdRelationsGetResponse200Normalizer.php new file mode 100644 index 0000000..8e76422 --- /dev/null +++ b/src/Normalizer/AnimeIdRelationsGetResponse200Normalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Relation', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeImagesJpgNormalizer.php b/src/Normalizer/AnimeImagesJpgNormalizer.php new file mode 100644 index 0000000..0619ae0 --- /dev/null +++ b/src/Normalizer/AnimeImagesJpgNormalizer.php @@ -0,0 +1,89 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('small_image_url', $data) && null !== $data['small_image_url']) { + $object->setSmallImageUrl($data['small_image_url']); + } elseif (\array_key_exists('small_image_url', $data) && null === $data['small_image_url']) { + $object->setSmallImageUrl(null); + } + if (\array_key_exists('large_image_url', $data) && null !== $data['large_image_url']) { + $object->setLargeImageUrl($data['large_image_url']); + } elseif (\array_key_exists('large_image_url', $data) && null === $data['large_image_url']) { + $object->setLargeImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getSmallImageUrl()) { + $data['small_image_url'] = $object->getSmallImageUrl(); + } + if (null !== $object->getLargeImageUrl()) { + $data['large_image_url'] = $object->getLargeImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeImagesNormalizer.php b/src/Normalizer/AnimeImagesNormalizer.php new file mode 100644 index 0000000..1245a06 --- /dev/null +++ b/src/Normalizer/AnimeImagesNormalizer.php @@ -0,0 +1,77 @@ +setJpg($this->denormalizer->denormalize($data['jpg'], 'Jikan\\JikanPHP\\Model\\AnimeImagesJpg', 'json', $context)); + } + if (\array_key_exists('webp', $data)) { + $object->setWebp($this->denormalizer->denormalize($data['webp'], 'Jikan\\JikanPHP\\Model\\AnimeImagesWebp', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getJpg()) { + $data['jpg'] = $this->normalizer->normalize($object->getJpg(), 'json', $context); + } + if (null !== $object->getWebp()) { + $data['webp'] = $this->normalizer->normalize($object->getWebp(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeImagesWebpNormalizer.php b/src/Normalizer/AnimeImagesWebpNormalizer.php new file mode 100644 index 0000000..cdf9fbe --- /dev/null +++ b/src/Normalizer/AnimeImagesWebpNormalizer.php @@ -0,0 +1,89 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('small_image_url', $data) && null !== $data['small_image_url']) { + $object->setSmallImageUrl($data['small_image_url']); + } elseif (\array_key_exists('small_image_url', $data) && null === $data['small_image_url']) { + $object->setSmallImageUrl(null); + } + if (\array_key_exists('large_image_url', $data) && null !== $data['large_image_url']) { + $object->setLargeImageUrl($data['large_image_url']); + } elseif (\array_key_exists('large_image_url', $data) && null === $data['large_image_url']) { + $object->setLargeImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getSmallImageUrl()) { + $data['small_image_url'] = $object->getSmallImageUrl(); + } + if (null !== $object->getLargeImageUrl()) { + $data['large_image_url'] = $object->getLargeImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeMetaNormalizer.php b/src/Normalizer/AnimeMetaNormalizer.php new file mode 100644 index 0000000..136c7e0 --- /dev/null +++ b/src/Normalizer/AnimeMetaNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\AnimeImages', 'json', $context)); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeNewsNormalizer.php b/src/Normalizer/AnimeNewsNormalizer.php new file mode 100644 index 0000000..e163ca1 --- /dev/null +++ b/src/Normalizer/AnimeNewsNormalizer.php @@ -0,0 +1,85 @@ +setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + if (\array_key_exists('data', $data)) { + $values = []; + foreach ($data['data'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\NewsDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeNormalizer.php b/src/Normalizer/AnimeNormalizer.php new file mode 100644 index 0000000..96d5b8c --- /dev/null +++ b/src/Normalizer/AnimeNormalizer.php @@ -0,0 +1,392 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\AnimeImages', 'json', $context)); + } + if (\array_key_exists('trailer', $data)) { + $object->setTrailer($this->denormalizer->denormalize($data['trailer'], 'Jikan\\JikanPHP\\Model\\TrailerBase', 'json', $context)); + } + if (\array_key_exists('approved', $data)) { + $object->setApproved($data['approved']); + } + if (\array_key_exists('titles', $data)) { + $values = []; + foreach ($data['titles'] as $value) { + $values[] = $value; + } + $object->setTitles($values); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('title_english', $data) && null !== $data['title_english']) { + $object->setTitleEnglish($data['title_english']); + } elseif (\array_key_exists('title_english', $data) && null === $data['title_english']) { + $object->setTitleEnglish(null); + } + if (\array_key_exists('title_japanese', $data) && null !== $data['title_japanese']) { + $object->setTitleJapanese($data['title_japanese']); + } elseif (\array_key_exists('title_japanese', $data) && null === $data['title_japanese']) { + $object->setTitleJapanese(null); + } + if (\array_key_exists('title_synonyms', $data)) { + $values_1 = []; + foreach ($data['title_synonyms'] as $value_1) { + $values_1[] = $value_1; + } + $object->setTitleSynonyms($values_1); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('source', $data) && null !== $data['source']) { + $object->setSource($data['source']); + } elseif (\array_key_exists('source', $data) && null === $data['source']) { + $object->setSource(null); + } + if (\array_key_exists('episodes', $data) && null !== $data['episodes']) { + $object->setEpisodes($data['episodes']); + } elseif (\array_key_exists('episodes', $data) && null === $data['episodes']) { + $object->setEpisodes(null); + } + if (\array_key_exists('status', $data) && null !== $data['status']) { + $object->setStatus($data['status']); + } elseif (\array_key_exists('status', $data) && null === $data['status']) { + $object->setStatus(null); + } + if (\array_key_exists('airing', $data)) { + $object->setAiring($data['airing']); + } + if (\array_key_exists('aired', $data)) { + $object->setAired($this->denormalizer->denormalize($data['aired'], 'Jikan\\JikanPHP\\Model\\Daterange', 'json', $context)); + } + if (\array_key_exists('duration', $data) && null !== $data['duration']) { + $object->setDuration($data['duration']); + } elseif (\array_key_exists('duration', $data) && null === $data['duration']) { + $object->setDuration(null); + } + if (\array_key_exists('rating', $data) && null !== $data['rating']) { + $object->setRating($data['rating']); + } elseif (\array_key_exists('rating', $data) && null === $data['rating']) { + $object->setRating(null); + } + if (\array_key_exists('score', $data) && null !== $data['score']) { + $object->setScore($data['score']); + } elseif (\array_key_exists('score', $data) && null === $data['score']) { + $object->setScore(null); + } + if (\array_key_exists('scored_by', $data) && null !== $data['scored_by']) { + $object->setScoredBy($data['scored_by']); + } elseif (\array_key_exists('scored_by', $data) && null === $data['scored_by']) { + $object->setScoredBy(null); + } + if (\array_key_exists('rank', $data) && null !== $data['rank']) { + $object->setRank($data['rank']); + } elseif (\array_key_exists('rank', $data) && null === $data['rank']) { + $object->setRank(null); + } + if (\array_key_exists('popularity', $data) && null !== $data['popularity']) { + $object->setPopularity($data['popularity']); + } elseif (\array_key_exists('popularity', $data) && null === $data['popularity']) { + $object->setPopularity(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $object->setMembers($data['members']); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('favorites', $data) && null !== $data['favorites']) { + $object->setFavorites($data['favorites']); + } elseif (\array_key_exists('favorites', $data) && null === $data['favorites']) { + $object->setFavorites(null); + } + if (\array_key_exists('synopsis', $data) && null !== $data['synopsis']) { + $object->setSynopsis($data['synopsis']); + } elseif (\array_key_exists('synopsis', $data) && null === $data['synopsis']) { + $object->setSynopsis(null); + } + if (\array_key_exists('background', $data) && null !== $data['background']) { + $object->setBackground($data['background']); + } elseif (\array_key_exists('background', $data) && null === $data['background']) { + $object->setBackground(null); + } + if (\array_key_exists('season', $data) && null !== $data['season']) { + $object->setSeason($data['season']); + } elseif (\array_key_exists('season', $data) && null === $data['season']) { + $object->setSeason(null); + } + if (\array_key_exists('year', $data) && null !== $data['year']) { + $object->setYear($data['year']); + } elseif (\array_key_exists('year', $data) && null === $data['year']) { + $object->setYear(null); + } + if (\array_key_exists('broadcast', $data)) { + $object->setBroadcast($this->denormalizer->denormalize($data['broadcast'], 'Jikan\\JikanPHP\\Model\\Broadcast', 'json', $context)); + } + if (\array_key_exists('producers', $data)) { + $values_2 = []; + foreach ($data['producers'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setProducers($values_2); + } + if (\array_key_exists('licensors', $data)) { + $values_3 = []; + foreach ($data['licensors'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setLicensors($values_3); + } + if (\array_key_exists('studios', $data)) { + $values_4 = []; + foreach ($data['studios'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setStudios($values_4); + } + if (\array_key_exists('genres', $data)) { + $values_5 = []; + foreach ($data['genres'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setGenres($values_5); + } + if (\array_key_exists('explicit_genres', $data)) { + $values_6 = []; + foreach ($data['explicit_genres'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setExplicitGenres($values_6); + } + if (\array_key_exists('themes', $data)) { + $values_7 = []; + foreach ($data['themes'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setThemes($values_7); + } + if (\array_key_exists('demographics', $data)) { + $values_8 = []; + foreach ($data['demographics'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setDemographics($values_8); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getTrailer()) { + $data['trailer'] = $this->normalizer->normalize($object->getTrailer(), 'json', $context); + } + if (null !== $object->getApproved()) { + $data['approved'] = $object->getApproved(); + } + if (null !== $object->getTitles()) { + $values = []; + foreach ($object->getTitles() as $value) { + $values[] = $value; + } + $data['titles'] = $values; + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getTitleEnglish()) { + $data['title_english'] = $object->getTitleEnglish(); + } + if (null !== $object->getTitleJapanese()) { + $data['title_japanese'] = $object->getTitleJapanese(); + } + if (null !== $object->getTitleSynonyms()) { + $values_1 = []; + foreach ($object->getTitleSynonyms() as $value_1) { + $values_1[] = $value_1; + } + $data['title_synonyms'] = $values_1; + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getSource()) { + $data['source'] = $object->getSource(); + } + if (null !== $object->getEpisodes()) { + $data['episodes'] = $object->getEpisodes(); + } + if (null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if (null !== $object->getAiring()) { + $data['airing'] = $object->getAiring(); + } + if (null !== $object->getAired()) { + $data['aired'] = $this->normalizer->normalize($object->getAired(), 'json', $context); + } + if (null !== $object->getDuration()) { + $data['duration'] = $object->getDuration(); + } + if (null !== $object->getRating()) { + $data['rating'] = $object->getRating(); + } + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getScoredBy()) { + $data['scored_by'] = $object->getScoredBy(); + } + if (null !== $object->getRank()) { + $data['rank'] = $object->getRank(); + } + if (null !== $object->getPopularity()) { + $data['popularity'] = $object->getPopularity(); + } + if (null !== $object->getMembers()) { + $data['members'] = $object->getMembers(); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getSynopsis()) { + $data['synopsis'] = $object->getSynopsis(); + } + if (null !== $object->getBackground()) { + $data['background'] = $object->getBackground(); + } + if (null !== $object->getSeason()) { + $data['season'] = $object->getSeason(); + } + if (null !== $object->getYear()) { + $data['year'] = $object->getYear(); + } + if (null !== $object->getBroadcast()) { + $data['broadcast'] = $this->normalizer->normalize($object->getBroadcast(), 'json', $context); + } + if (null !== $object->getProducers()) { + $values_2 = []; + foreach ($object->getProducers() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['producers'] = $values_2; + } + if (null !== $object->getLicensors()) { + $values_3 = []; + foreach ($object->getLicensors() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['licensors'] = $values_3; + } + if (null !== $object->getStudios()) { + $values_4 = []; + foreach ($object->getStudios() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['studios'] = $values_4; + } + if (null !== $object->getGenres()) { + $values_5 = []; + foreach ($object->getGenres() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['genres'] = $values_5; + } + if (null !== $object->getExplicitGenres()) { + $values_6 = []; + foreach ($object->getExplicitGenres() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['explicit_genres'] = $values_6; + } + if (null !== $object->getThemes()) { + $values_7 = []; + foreach ($object->getThemes() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['themes'] = $values_7; + } + if (null !== $object->getDemographics()) { + $values_8 = []; + foreach ($object->getDemographics() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); + } + $data['demographics'] = $values_8; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeRelationsDataItemNormalizer.php b/src/Normalizer/AnimeRelationsDataItemNormalizer.php new file mode 100644 index 0000000..8963443 --- /dev/null +++ b/src/Normalizer/AnimeRelationsDataItemNormalizer.php @@ -0,0 +1,85 @@ +setRelation($data['relation']); + } + if (\array_key_exists('entry', $data)) { + $values = []; + foreach ($data['entry'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setEntry($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRelation()) { + $data['relation'] = $object->getRelation(); + } + if (null !== $object->getEntry()) { + $values = []; + foreach ($object->getEntry() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['entry'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeRelationsNormalizer.php b/src/Normalizer/AnimeRelationsNormalizer.php new file mode 100644 index 0000000..c6cec4b --- /dev/null +++ b/src/Normalizer/AnimeRelationsNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeRelationsDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeReviewNormalizer.php b/src/Normalizer/AnimeReviewNormalizer.php new file mode 100644 index 0000000..4f0b880 --- /dev/null +++ b/src/Normalizer/AnimeReviewNormalizer.php @@ -0,0 +1,113 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + } + if (\array_key_exists('votes', $data)) { + $object->setVotes($data['votes']); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + if (\array_key_exists('review', $data)) { + $object->setReview($data['review']); + } + if (\array_key_exists('episodes_watched', $data)) { + $object->setEpisodesWatched($data['episodes_watched']); + } + if (\array_key_exists('scores', $data)) { + $object->setScores($this->denormalizer->denormalize($data['scores'], 'Jikan\\JikanPHP\\Model\\AnimeReviewScores', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getVotes()) { + $data['votes'] = $object->getVotes(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + if (null !== $object->getReview()) { + $data['review'] = $object->getReview(); + } + if (null !== $object->getEpisodesWatched()) { + $data['episodes_watched'] = $object->getEpisodesWatched(); + } + if (null !== $object->getScores()) { + $data['scores'] = $this->normalizer->normalize($object->getScores(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeReviewScoresNormalizer.php b/src/Normalizer/AnimeReviewScoresNormalizer.php new file mode 100644 index 0000000..3156eef --- /dev/null +++ b/src/Normalizer/AnimeReviewScoresNormalizer.php @@ -0,0 +1,101 @@ +setOverall($data['overall']); + } + if (\array_key_exists('story', $data)) { + $object->setStory($data['story']); + } + if (\array_key_exists('animation', $data)) { + $object->setAnimation($data['animation']); + } + if (\array_key_exists('sound', $data)) { + $object->setSound($data['sound']); + } + if (\array_key_exists('character', $data)) { + $object->setCharacter($data['character']); + } + if (\array_key_exists('enjoyment', $data)) { + $object->setEnjoyment($data['enjoyment']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getOverall()) { + $data['overall'] = $object->getOverall(); + } + if (null !== $object->getStory()) { + $data['story'] = $object->getStory(); + } + if (null !== $object->getAnimation()) { + $data['animation'] = $object->getAnimation(); + } + if (null !== $object->getSound()) { + $data['sound'] = $object->getSound(); + } + if (null !== $object->getCharacter()) { + $data['character'] = $object->getCharacter(); + } + if (null !== $object->getEnjoyment()) { + $data['enjoyment'] = $object->getEnjoyment(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeReviewsNormalizer.php b/src/Normalizer/AnimeReviewsNormalizer.php new file mode 100644 index 0000000..dae1fa8 --- /dev/null +++ b/src/Normalizer/AnimeReviewsNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeReviewsdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeReviewsdataItemNormalizer.php b/src/Normalizer/AnimeReviewsdataItemNormalizer.php new file mode 100644 index 0000000..06d56db --- /dev/null +++ b/src/Normalizer/AnimeReviewsdataItemNormalizer.php @@ -0,0 +1,119 @@ +setUser($this->denormalizer->denormalize($data['user'], 'Jikan\\JikanPHP\\Model\\UserMeta', 'json', $context)); + } + if (\array_key_exists('mal_id', $data)) { + $object->setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + } + if (\array_key_exists('votes', $data)) { + $object->setVotes($data['votes']); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + if (\array_key_exists('review', $data)) { + $object->setReview($data['review']); + } + if (\array_key_exists('episodes_watched', $data)) { + $object->setEpisodesWatched($data['episodes_watched']); + } + if (\array_key_exists('scores', $data)) { + $object->setScores($this->denormalizer->denormalize($data['scores'], 'Jikan\\JikanPHP\\Model\\AnimeReviewScores', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUser()) { + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + } + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getVotes()) { + $data['votes'] = $object->getVotes(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + if (null !== $object->getReview()) { + $data['review'] = $object->getReview(); + } + if (null !== $object->getEpisodesWatched()) { + $data['episodes_watched'] = $object->getEpisodesWatched(); + } + if (null !== $object->getScores()) { + $data['scores'] = $this->normalizer->normalize($object->getScores(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeSearchNormalizer.php b/src/Normalizer/AnimeSearchNormalizer.php new file mode 100644 index 0000000..a6b2e28 --- /dev/null +++ b/src/Normalizer/AnimeSearchNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Anime', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPlusPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeStaffDataItemNormalizer.php b/src/Normalizer/AnimeStaffDataItemNormalizer.php new file mode 100644 index 0000000..f8b9501 --- /dev/null +++ b/src/Normalizer/AnimeStaffDataItemNormalizer.php @@ -0,0 +1,85 @@ +setPerson($this->denormalizer->denormalize($data['person'], 'Jikan\\JikanPHP\\Model\\AnimeStaffDataItemPerson', 'json', $context)); + } + if (\array_key_exists('positions', $data)) { + $values = []; + foreach ($data['positions'] as $value) { + $values[] = $value; + } + $object->setPositions($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPerson()) { + $data['person'] = $this->normalizer->normalize($object->getPerson(), 'json', $context); + } + if (null !== $object->getPositions()) { + $values = []; + foreach ($object->getPositions() as $value) { + $values[] = $value; + } + $data['positions'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeStaffDataItemPersonNormalizer.php b/src/Normalizer/AnimeStaffDataItemPersonNormalizer.php new file mode 100644 index 0000000..de231f6 --- /dev/null +++ b/src/Normalizer/AnimeStaffDataItemPersonNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\PeopleImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeStaffNormalizer.php b/src/Normalizer/AnimeStaffNormalizer.php new file mode 100644 index 0000000..fc2bfb8 --- /dev/null +++ b/src/Normalizer/AnimeStaffNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeStaffDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeStatisticsDataNormalizer.php b/src/Normalizer/AnimeStatisticsDataNormalizer.php new file mode 100644 index 0000000..5820ed3 --- /dev/null +++ b/src/Normalizer/AnimeStatisticsDataNormalizer.php @@ -0,0 +1,115 @@ +setWatching($data['watching']); + } + if (\array_key_exists('completed', $data)) { + $object->setCompleted($data['completed']); + } + if (\array_key_exists('on_hold', $data)) { + $object->setOnHold($data['on_hold']); + } + if (\array_key_exists('dropped', $data)) { + $object->setDropped($data['dropped']); + } + if (\array_key_exists('plan_to_watch', $data)) { + $object->setPlanToWatch($data['plan_to_watch']); + } + if (\array_key_exists('total', $data)) { + $object->setTotal($data['total']); + } + if (\array_key_exists('scores', $data)) { + $values = []; + foreach ($data['scores'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeStatisticsDataScoresItem', 'json', $context); + } + $object->setScores($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getWatching()) { + $data['watching'] = $object->getWatching(); + } + if (null !== $object->getCompleted()) { + $data['completed'] = $object->getCompleted(); + } + if (null !== $object->getOnHold()) { + $data['on_hold'] = $object->getOnHold(); + } + if (null !== $object->getDropped()) { + $data['dropped'] = $object->getDropped(); + } + if (null !== $object->getPlanToWatch()) { + $data['plan_to_watch'] = $object->getPlanToWatch(); + } + if (null !== $object->getTotal()) { + $data['total'] = $object->getTotal(); + } + if (null !== $object->getScores()) { + $values = []; + foreach ($object->getScores() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['scores'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeStatisticsDataScoresItemNormalizer.php b/src/Normalizer/AnimeStatisticsDataScoresItemNormalizer.php new file mode 100644 index 0000000..8bd0d36 --- /dev/null +++ b/src/Normalizer/AnimeStatisticsDataScoresItemNormalizer.php @@ -0,0 +1,86 @@ +setScore($data['score']); + } + if (\array_key_exists('votes', $data)) { + $object->setVotes($data['votes']); + } + if (\array_key_exists('percentage', $data)) { + $object->setPercentage($data['percentage']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getVotes()) { + $data['votes'] = $object->getVotes(); + } + if (null !== $object->getPercentage()) { + $data['percentage'] = $object->getPercentage(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeStatisticsNormalizer.php b/src/Normalizer/AnimeStatisticsNormalizer.php new file mode 100644 index 0000000..b630274 --- /dev/null +++ b/src/Normalizer/AnimeStatisticsNormalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\AnimeStatisticsData', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeThemesDataNormalizer.php b/src/Normalizer/AnimeThemesDataNormalizer.php new file mode 100644 index 0000000..647d282 --- /dev/null +++ b/src/Normalizer/AnimeThemesDataNormalizer.php @@ -0,0 +1,93 @@ +setOpenings($values); + } + if (\array_key_exists('endings', $data)) { + $values_1 = []; + foreach ($data['endings'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEndings($values_1); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getOpenings()) { + $values = []; + foreach ($object->getOpenings() as $value) { + $values[] = $value; + } + $data['openings'] = $values; + } + if (null !== $object->getEndings()) { + $values_1 = []; + foreach ($object->getEndings() as $value_1) { + $values_1[] = $value_1; + } + $data['endings'] = $values_1; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeThemesNormalizer.php b/src/Normalizer/AnimeThemesNormalizer.php new file mode 100644 index 0000000..785b60a --- /dev/null +++ b/src/Normalizer/AnimeThemesNormalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\AnimeThemesData', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeUserupdatesNormalizer.php b/src/Normalizer/AnimeUserupdatesNormalizer.php new file mode 100644 index 0000000..807916f --- /dev/null +++ b/src/Normalizer/AnimeUserupdatesNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeUserupdatesdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeUserupdatesdataItemNormalizer.php b/src/Normalizer/AnimeUserupdatesdataItemNormalizer.php new file mode 100644 index 0000000..98877fb --- /dev/null +++ b/src/Normalizer/AnimeUserupdatesdataItemNormalizer.php @@ -0,0 +1,107 @@ +setUser($this->denormalizer->denormalize($data['user'], 'Jikan\\JikanPHP\\Model\\UserMeta', 'json', $context)); + } + if (\array_key_exists('score', $data) && null !== $data['score']) { + $object->setScore($data['score']); + } elseif (\array_key_exists('score', $data) && null === $data['score']) { + $object->setScore(null); + } + if (\array_key_exists('status', $data)) { + $object->setStatus($data['status']); + } + if (\array_key_exists('episodes_seen', $data) && null !== $data['episodes_seen']) { + $object->setEpisodesSeen($data['episodes_seen']); + } elseif (\array_key_exists('episodes_seen', $data) && null === $data['episodes_seen']) { + $object->setEpisodesSeen(null); + } + if (\array_key_exists('episodes_total', $data) && null !== $data['episodes_total']) { + $object->setEpisodesTotal($data['episodes_total']); + } elseif (\array_key_exists('episodes_total', $data) && null === $data['episodes_total']) { + $object->setEpisodesTotal(null); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUser()) { + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + } + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if (null !== $object->getEpisodesSeen()) { + $data['episodes_seen'] = $object->getEpisodesSeen(); + } + if (null !== $object->getEpisodesTotal()) { + $data['episodes_total'] = $object->getEpisodesTotal(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeVideosDataEpisodesItemNormalizer.php b/src/Normalizer/AnimeVideosDataEpisodesItemNormalizer.php new file mode 100644 index 0000000..0da7b0d --- /dev/null +++ b/src/Normalizer/AnimeVideosDataEpisodesItemNormalizer.php @@ -0,0 +1,95 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('episode', $data)) { + $object->setEpisode($data['episode']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CommonImages', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getEpisode()) { + $data['episode'] = $object->getEpisode(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeVideosDataMusicVideosItemMetaNormalizer.php b/src/Normalizer/AnimeVideosDataMusicVideosItemMetaNormalizer.php new file mode 100644 index 0000000..dae0c7e --- /dev/null +++ b/src/Normalizer/AnimeVideosDataMusicVideosItemMetaNormalizer.php @@ -0,0 +1,81 @@ +setTitle($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('author', $data) && null !== $data['author']) { + $object->setAuthor($data['author']); + } elseif (\array_key_exists('author', $data) && null === $data['author']) { + $object->setAuthor(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getAuthor()) { + $data['author'] = $object->getAuthor(); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeVideosDataMusicVideosItemNormalizer.php b/src/Normalizer/AnimeVideosDataMusicVideosItemNormalizer.php new file mode 100644 index 0000000..5d421dd --- /dev/null +++ b/src/Normalizer/AnimeVideosDataMusicVideosItemNormalizer.php @@ -0,0 +1,83 @@ +setTitle($data['title']); + } + if (\array_key_exists('video', $data)) { + $object->setVideo($this->denormalizer->denormalize($data['video'], 'Jikan\\JikanPHP\\Model\\Trailer', 'json', $context)); + } + if (\array_key_exists('meta', $data)) { + $object->setMeta($this->denormalizer->denormalize($data['meta'], 'Jikan\\JikanPHP\\Model\\AnimeVideosDataMusicVideosItemMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getVideo()) { + $data['video'] = $this->normalizer->normalize($object->getVideo(), 'json', $context); + } + if (null !== $object->getMeta()) { + $data['meta'] = $this->normalizer->normalize($object->getMeta(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeVideosDataNormalizer.php b/src/Normalizer/AnimeVideosDataNormalizer.php new file mode 100644 index 0000000..dab6eda --- /dev/null +++ b/src/Normalizer/AnimeVideosDataNormalizer.php @@ -0,0 +1,107 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeVideosDataPromoItem', 'json', $context); + } + $object->setPromo($values); + } + if (\array_key_exists('episodes', $data)) { + $values_1 = []; + foreach ($data['episodes'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\AnimeVideosDataEpisodesItem', 'json', $context); + } + $object->setEpisodes($values_1); + } + if (\array_key_exists('music_videos', $data)) { + $values_2 = []; + foreach ($data['music_videos'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\AnimeVideosDataMusicVideosItem', 'json', $context); + } + $object->setMusicVideos($values_2); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPromo()) { + $values = []; + foreach ($object->getPromo() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['promo'] = $values; + } + if (null !== $object->getEpisodes()) { + $values_1 = []; + foreach ($object->getEpisodes() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['episodes'] = $values_1; + } + if (null !== $object->getMusicVideos()) { + $values_2 = []; + foreach ($object->getMusicVideos() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['music_videos'] = $values_2; + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeVideosDataPromoItemNormalizer.php b/src/Normalizer/AnimeVideosDataPromoItemNormalizer.php new file mode 100644 index 0000000..7d93b21 --- /dev/null +++ b/src/Normalizer/AnimeVideosDataPromoItemNormalizer.php @@ -0,0 +1,77 @@ +setTitle($data['title']); + } + if (\array_key_exists('trailer', $data)) { + $object->setTrailer($this->denormalizer->denormalize($data['trailer'], 'Jikan\\JikanPHP\\Model\\Trailer', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getTrailer()) { + $data['trailer'] = $this->normalizer->normalize($object->getTrailer(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeVideosEpisodesNormalizer.php b/src/Normalizer/AnimeVideosEpisodesNormalizer.php new file mode 100644 index 0000000..950fdd8 --- /dev/null +++ b/src/Normalizer/AnimeVideosEpisodesNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\AnimeVideosEpisodesdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeVideosEpisodesdataItemNormalizer.php b/src/Normalizer/AnimeVideosEpisodesdataItemNormalizer.php new file mode 100644 index 0000000..cac0b06 --- /dev/null +++ b/src/Normalizer/AnimeVideosEpisodesdataItemNormalizer.php @@ -0,0 +1,95 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('episode', $data)) { + $object->setEpisode($data['episode']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CommonImages', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getEpisode()) { + $data['episode'] = $object->getEpisode(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/AnimeVideosNormalizer.php b/src/Normalizer/AnimeVideosNormalizer.php new file mode 100644 index 0000000..c287af9 --- /dev/null +++ b/src/Normalizer/AnimeVideosNormalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\AnimeVideosData', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/BroadcastNormalizer.php b/src/Normalizer/BroadcastNormalizer.php new file mode 100644 index 0000000..61f964b --- /dev/null +++ b/src/Normalizer/BroadcastNormalizer.php @@ -0,0 +1,97 @@ +setDay($data['day']); + } elseif (\array_key_exists('day', $data) && null === $data['day']) { + $object->setDay(null); + } + if (\array_key_exists('time', $data) && null !== $data['time']) { + $object->setTime($data['time']); + } elseif (\array_key_exists('time', $data) && null === $data['time']) { + $object->setTime(null); + } + if (\array_key_exists('timezone', $data) && null !== $data['timezone']) { + $object->setTimezone($data['timezone']); + } elseif (\array_key_exists('timezone', $data) && null === $data['timezone']) { + $object->setTimezone(null); + } + if (\array_key_exists('string', $data) && null !== $data['string']) { + $object->setString($data['string']); + } elseif (\array_key_exists('string', $data) && null === $data['string']) { + $object->setString(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDay()) { + $data['day'] = $object->getDay(); + } + if (null !== $object->getTime()) { + $data['time'] = $object->getTime(); + } + if (null !== $object->getTimezone()) { + $data['timezone'] = $object->getTimezone(); + } + if (null !== $object->getString()) { + $data['string'] = $object->getString(); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterAnimeDataItemNormalizer.php b/src/Normalizer/CharacterAnimeDataItemNormalizer.php new file mode 100644 index 0000000..7ec1d48 --- /dev/null +++ b/src/Normalizer/CharacterAnimeDataItemNormalizer.php @@ -0,0 +1,77 @@ +setRole($data['role']); + } + if (\array_key_exists('anime', $data)) { + $object->setAnime($this->denormalizer->denormalize($data['anime'], 'Jikan\\JikanPHP\\Model\\AnimeMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRole()) { + $data['role'] = $object->getRole(); + } + if (null !== $object->getAnime()) { + $data['anime'] = $this->normalizer->normalize($object->getAnime(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterAnimeNormalizer.php b/src/Normalizer/CharacterAnimeNormalizer.php new file mode 100644 index 0000000..7572487 --- /dev/null +++ b/src/Normalizer/CharacterAnimeNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\CharacterAnimeDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterFullAnimeItemNormalizer.php b/src/Normalizer/CharacterFullAnimeItemNormalizer.php new file mode 100644 index 0000000..f1da66a --- /dev/null +++ b/src/Normalizer/CharacterFullAnimeItemNormalizer.php @@ -0,0 +1,77 @@ +setRole($data['role']); + } + if (\array_key_exists('anime', $data)) { + $object->setAnime($this->denormalizer->denormalize($data['anime'], 'Jikan\\JikanPHP\\Model\\AnimeMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRole()) { + $data['role'] = $object->getRole(); + } + if (null !== $object->getAnime()) { + $data['anime'] = $this->normalizer->normalize($object->getAnime(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterFullMangaItemNormalizer.php b/src/Normalizer/CharacterFullMangaItemNormalizer.php new file mode 100644 index 0000000..262e4b2 --- /dev/null +++ b/src/Normalizer/CharacterFullMangaItemNormalizer.php @@ -0,0 +1,77 @@ +setRole($data['role']); + } + if (\array_key_exists('manga', $data)) { + $object->setManga($this->denormalizer->denormalize($data['manga'], 'Jikan\\JikanPHP\\Model\\MangaMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRole()) { + $data['role'] = $object->getRole(); + } + if (null !== $object->getManga()) { + $data['manga'] = $this->normalizer->normalize($object->getManga(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterFullNormalizer.php b/src/Normalizer/CharacterFullNormalizer.php new file mode 100644 index 0000000..bb35746 --- /dev/null +++ b/src/Normalizer/CharacterFullNormalizer.php @@ -0,0 +1,167 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CharacterImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('name_kanji', $data) && null !== $data['name_kanji']) { + $object->setNameKanji($data['name_kanji']); + } elseif (\array_key_exists('name_kanji', $data) && null === $data['name_kanji']) { + $object->setNameKanji(null); + } + if (\array_key_exists('nicknames', $data)) { + $values = []; + foreach ($data['nicknames'] as $value) { + $values[] = $value; + } + $object->setNicknames($values); + } + if (\array_key_exists('favorites', $data)) { + $object->setFavorites($data['favorites']); + } + if (\array_key_exists('about', $data) && null !== $data['about']) { + $object->setAbout($data['about']); + } elseif (\array_key_exists('about', $data) && null === $data['about']) { + $object->setAbout(null); + } + if (\array_key_exists('anime', $data)) { + $values_1 = []; + foreach ($data['anime'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\CharacterFullAnimeItem', 'json', $context); + } + $object->setAnime($values_1); + } + if (\array_key_exists('manga', $data)) { + $values_2 = []; + foreach ($data['manga'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\CharacterFullMangaItem', 'json', $context); + } + $object->setManga($values_2); + } + if (\array_key_exists('voices', $data)) { + $values_3 = []; + foreach ($data['voices'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, 'Jikan\\JikanPHP\\Model\\CharacterFullVoicesItem', 'json', $context); + } + $object->setVoices($values_3); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getNameKanji()) { + $data['name_kanji'] = $object->getNameKanji(); + } + if (null !== $object->getNicknames()) { + $values = []; + foreach ($object->getNicknames() as $value) { + $values[] = $value; + } + $data['nicknames'] = $values; + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + if (null !== $object->getAnime()) { + $values_1 = []; + foreach ($object->getAnime() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['anime'] = $values_1; + } + if (null !== $object->getManga()) { + $values_2 = []; + foreach ($object->getManga() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['manga'] = $values_2; + } + if (null !== $object->getVoices()) { + $values_3 = []; + foreach ($object->getVoices() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['voices'] = $values_3; + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterFullVoicesItemNormalizer.php b/src/Normalizer/CharacterFullVoicesItemNormalizer.php new file mode 100644 index 0000000..50de938 --- /dev/null +++ b/src/Normalizer/CharacterFullVoicesItemNormalizer.php @@ -0,0 +1,77 @@ +setLanguage($data['language']); + } + if (\array_key_exists('person', $data)) { + $object->setPerson($this->denormalizer->denormalize($data['person'], 'Jikan\\JikanPHP\\Model\\PersonMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getLanguage()) { + $data['language'] = $object->getLanguage(); + } + if (null !== $object->getPerson()) { + $data['person'] = $this->normalizer->normalize($object->getPerson(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterImagesJpgNormalizer.php b/src/Normalizer/CharacterImagesJpgNormalizer.php new file mode 100644 index 0000000..8bec1b4 --- /dev/null +++ b/src/Normalizer/CharacterImagesJpgNormalizer.php @@ -0,0 +1,81 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('small_image_url', $data) && null !== $data['small_image_url']) { + $object->setSmallImageUrl($data['small_image_url']); + } elseif (\array_key_exists('small_image_url', $data) && null === $data['small_image_url']) { + $object->setSmallImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getSmallImageUrl()) { + $data['small_image_url'] = $object->getSmallImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterImagesNormalizer.php b/src/Normalizer/CharacterImagesNormalizer.php new file mode 100644 index 0000000..80a2fac --- /dev/null +++ b/src/Normalizer/CharacterImagesNormalizer.php @@ -0,0 +1,77 @@ +setJpg($this->denormalizer->denormalize($data['jpg'], 'Jikan\\JikanPHP\\Model\\CharacterImagesJpg', 'json', $context)); + } + if (\array_key_exists('webp', $data)) { + $object->setWebp($this->denormalizer->denormalize($data['webp'], 'Jikan\\JikanPHP\\Model\\CharacterImagesWebp', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getJpg()) { + $data['jpg'] = $this->normalizer->normalize($object->getJpg(), 'json', $context); + } + if (null !== $object->getWebp()) { + $data['webp'] = $this->normalizer->normalize($object->getWebp(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterImagesWebpNormalizer.php b/src/Normalizer/CharacterImagesWebpNormalizer.php new file mode 100644 index 0000000..20a32bd --- /dev/null +++ b/src/Normalizer/CharacterImagesWebpNormalizer.php @@ -0,0 +1,81 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('small_image_url', $data) && null !== $data['small_image_url']) { + $object->setSmallImageUrl($data['small_image_url']); + } elseif (\array_key_exists('small_image_url', $data) && null === $data['small_image_url']) { + $object->setSmallImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getSmallImageUrl()) { + $data['small_image_url'] = $object->getSmallImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterMangaDataItemNormalizer.php b/src/Normalizer/CharacterMangaDataItemNormalizer.php new file mode 100644 index 0000000..13d5549 --- /dev/null +++ b/src/Normalizer/CharacterMangaDataItemNormalizer.php @@ -0,0 +1,77 @@ +setRole($data['role']); + } + if (\array_key_exists('manga', $data)) { + $object->setManga($this->denormalizer->denormalize($data['manga'], 'Jikan\\JikanPHP\\Model\\MangaMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRole()) { + $data['role'] = $object->getRole(); + } + if (null !== $object->getManga()) { + $data['manga'] = $this->normalizer->normalize($object->getManga(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterMangaNormalizer.php b/src/Normalizer/CharacterMangaNormalizer.php new file mode 100644 index 0000000..05826cf --- /dev/null +++ b/src/Normalizer/CharacterMangaNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\CharacterMangaDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterMetaNormalizer.php b/src/Normalizer/CharacterMetaNormalizer.php new file mode 100644 index 0000000..364b9ed --- /dev/null +++ b/src/Normalizer/CharacterMetaNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CharacterImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterNormalizer.php b/src/Normalizer/CharacterNormalizer.php new file mode 100644 index 0000000..51f1529 --- /dev/null +++ b/src/Normalizer/CharacterNormalizer.php @@ -0,0 +1,125 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CharacterImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('name_kanji', $data) && null !== $data['name_kanji']) { + $object->setNameKanji($data['name_kanji']); + } elseif (\array_key_exists('name_kanji', $data) && null === $data['name_kanji']) { + $object->setNameKanji(null); + } + if (\array_key_exists('nicknames', $data)) { + $values = []; + foreach ($data['nicknames'] as $value) { + $values[] = $value; + } + $object->setNicknames($values); + } + if (\array_key_exists('favorites', $data)) { + $object->setFavorites($data['favorites']); + } + if (\array_key_exists('about', $data) && null !== $data['about']) { + $object->setAbout($data['about']); + } elseif (\array_key_exists('about', $data) && null === $data['about']) { + $object->setAbout(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getNameKanji()) { + $data['name_kanji'] = $object->getNameKanji(); + } + if (null !== $object->getNicknames()) { + $values = []; + foreach ($object->getNicknames() as $value) { + $values[] = $value; + } + $data['nicknames'] = $values; + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterPicturesDataItemNormalizer.php b/src/Normalizer/CharacterPicturesDataItemNormalizer.php new file mode 100644 index 0000000..a8ecabd --- /dev/null +++ b/src/Normalizer/CharacterPicturesDataItemNormalizer.php @@ -0,0 +1,81 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('large_image_url', $data) && null !== $data['large_image_url']) { + $object->setLargeImageUrl($data['large_image_url']); + } elseif (\array_key_exists('large_image_url', $data) && null === $data['large_image_url']) { + $object->setLargeImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getLargeImageUrl()) { + $data['large_image_url'] = $object->getLargeImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterPicturesNormalizer.php b/src/Normalizer/CharacterPicturesNormalizer.php new file mode 100644 index 0000000..7c681c1 --- /dev/null +++ b/src/Normalizer/CharacterPicturesNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\CharacterPicturesDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterVoiceActorsDataItemNormalizer.php b/src/Normalizer/CharacterVoiceActorsDataItemNormalizer.php new file mode 100644 index 0000000..1a41fd4 --- /dev/null +++ b/src/Normalizer/CharacterVoiceActorsDataItemNormalizer.php @@ -0,0 +1,77 @@ +setLanguage($data['language']); + } + if (\array_key_exists('person', $data)) { + $object->setPerson($this->denormalizer->denormalize($data['person'], 'Jikan\\JikanPHP\\Model\\PersonMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getLanguage()) { + $data['language'] = $object->getLanguage(); + } + if (null !== $object->getPerson()) { + $data['person'] = $this->normalizer->normalize($object->getPerson(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharacterVoiceActorsNormalizer.php b/src/Normalizer/CharacterVoiceActorsNormalizer.php new file mode 100644 index 0000000..39b3d49 --- /dev/null +++ b/src/Normalizer/CharacterVoiceActorsNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\CharacterVoiceActorsDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/CharactersIdFullGetResponse200Normalizer.php b/src/Normalizer/CharactersIdFullGetResponse200Normalizer.php new file mode 100644 index 0000000..ab3ce09 --- /dev/null +++ b/src/Normalizer/CharactersIdFullGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\CharacterFull', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharactersIdGetResponse200Normalizer.php b/src/Normalizer/CharactersIdGetResponse200Normalizer.php new file mode 100644 index 0000000..112c578 --- /dev/null +++ b/src/Normalizer/CharactersIdGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Character', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CharactersSearchNormalizer.php b/src/Normalizer/CharactersSearchNormalizer.php new file mode 100644 index 0000000..7c65ed5 --- /dev/null +++ b/src/Normalizer/CharactersSearchNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Character', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPlusPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/ClubMemberNormalizer.php b/src/Normalizer/ClubMemberNormalizer.php new file mode 100644 index 0000000..763afcc --- /dev/null +++ b/src/Normalizer/ClubMemberNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UserImages', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/ClubNormalizer.php b/src/Normalizer/ClubNormalizer.php new file mode 100644 index 0000000..a2d9dd0 --- /dev/null +++ b/src/Normalizer/ClubNormalizer.php @@ -0,0 +1,113 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CommonImages', 'json', $context)); + } + if (\array_key_exists('members', $data)) { + $object->setMembers($data['members']); + } + if (\array_key_exists('category', $data)) { + $object->setCategory($data['category']); + } + if (\array_key_exists('created', $data)) { + $object->setCreated($data['created']); + } + if (\array_key_exists('access', $data)) { + $object->setAccess($data['access']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getMembers()) { + $data['members'] = $object->getMembers(); + } + if (null !== $object->getCategory()) { + $data['category'] = $object->getCategory(); + } + if (null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + if (null !== $object->getAccess()) { + $data['access'] = $object->getAccess(); + } + + return $data; + } +} diff --git a/src/Normalizer/ClubRelationsDataNormalizer.php b/src/Normalizer/ClubRelationsDataNormalizer.php new file mode 100644 index 0000000..349fadc --- /dev/null +++ b/src/Normalizer/ClubRelationsDataNormalizer.php @@ -0,0 +1,107 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setAnime($values); + } + if (\array_key_exists('manga', $data)) { + $values_1 = []; + foreach ($data['manga'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setManga($values_1); + } + if (\array_key_exists('characters', $data)) { + $values_2 = []; + foreach ($data['characters'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setCharacters($values_2); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getAnime()) { + $values = []; + foreach ($object->getAnime() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['anime'] = $values; + } + if (null !== $object->getManga()) { + $values_1 = []; + foreach ($object->getManga() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['manga'] = $values_1; + } + if (null !== $object->getCharacters()) { + $values_2 = []; + foreach ($object->getCharacters() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['characters'] = $values_2; + } + + return $data; + } +} diff --git a/src/Normalizer/ClubRelationsNormalizer.php b/src/Normalizer/ClubRelationsNormalizer.php new file mode 100644 index 0000000..a20db35 --- /dev/null +++ b/src/Normalizer/ClubRelationsNormalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\ClubRelationsData', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/ClubStaffDataItemNormalizer.php b/src/Normalizer/ClubStaffDataItemNormalizer.php new file mode 100644 index 0000000..f9f5407 --- /dev/null +++ b/src/Normalizer/ClubStaffDataItemNormalizer.php @@ -0,0 +1,77 @@ +setUrl($data['url']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + + return $data; + } +} diff --git a/src/Normalizer/ClubStaffNormalizer.php b/src/Normalizer/ClubStaffNormalizer.php new file mode 100644 index 0000000..e87e6a3 --- /dev/null +++ b/src/Normalizer/ClubStaffNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\ClubStaffDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/ClubsIdGetResponse200Normalizer.php b/src/Normalizer/ClubsIdGetResponse200Normalizer.php new file mode 100644 index 0000000..0478309 --- /dev/null +++ b/src/Normalizer/ClubsIdGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Club', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/ClubsIdMembersGetResponse200Normalizer.php b/src/Normalizer/ClubsIdMembersGetResponse200Normalizer.php new file mode 100644 index 0000000..236b505 --- /dev/null +++ b/src/Normalizer/ClubsIdMembersGetResponse200Normalizer.php @@ -0,0 +1,85 @@ +setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + if (\array_key_exists('data', $data)) { + $values = []; + foreach ($data['data'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UserImages', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/ClubsSearchNormalizer.php b/src/Normalizer/ClubsSearchNormalizer.php new file mode 100644 index 0000000..9c3381a --- /dev/null +++ b/src/Normalizer/ClubsSearchNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Club', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/CommonImagesJpgNormalizer.php b/src/Normalizer/CommonImagesJpgNormalizer.php new file mode 100644 index 0000000..329c848 --- /dev/null +++ b/src/Normalizer/CommonImagesJpgNormalizer.php @@ -0,0 +1,73 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/CommonImagesNormalizer.php b/src/Normalizer/CommonImagesNormalizer.php new file mode 100644 index 0000000..e4f333f --- /dev/null +++ b/src/Normalizer/CommonImagesNormalizer.php @@ -0,0 +1,71 @@ +setJpg($this->denormalizer->denormalize($data['jpg'], 'Jikan\\JikanPHP\\Model\\CommonImagesJpg', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getJpg()) { + $data['jpg'] = $this->normalizer->normalize($object->getJpg(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/DaterangeNormalizer.php b/src/Normalizer/DaterangeNormalizer.php new file mode 100644 index 0000000..72b5a1e --- /dev/null +++ b/src/Normalizer/DaterangeNormalizer.php @@ -0,0 +1,87 @@ +setFrom($data['from']); + } elseif (\array_key_exists('from', $data) && null === $data['from']) { + $object->setFrom(null); + } + if (\array_key_exists('to', $data) && null !== $data['to']) { + $object->setTo($data['to']); + } elseif (\array_key_exists('to', $data) && null === $data['to']) { + $object->setTo(null); + } + if (\array_key_exists('prop', $data)) { + $object->setProp($this->denormalizer->denormalize($data['prop'], 'Jikan\\JikanPHP\\Model\\DaterangeProp', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getFrom()) { + $data['from'] = $object->getFrom(); + } + if (null !== $object->getTo()) { + $data['to'] = $object->getTo(); + } + if (null !== $object->getProp()) { + $data['prop'] = $this->normalizer->normalize($object->getProp(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/DaterangePropFromNormalizer.php b/src/Normalizer/DaterangePropFromNormalizer.php new file mode 100644 index 0000000..b465277 --- /dev/null +++ b/src/Normalizer/DaterangePropFromNormalizer.php @@ -0,0 +1,89 @@ +setDay($data['day']); + } elseif (\array_key_exists('day', $data) && null === $data['day']) { + $object->setDay(null); + } + if (\array_key_exists('month', $data) && null !== $data['month']) { + $object->setMonth($data['month']); + } elseif (\array_key_exists('month', $data) && null === $data['month']) { + $object->setMonth(null); + } + if (\array_key_exists('year', $data) && null !== $data['year']) { + $object->setYear($data['year']); + } elseif (\array_key_exists('year', $data) && null === $data['year']) { + $object->setYear(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDay()) { + $data['day'] = $object->getDay(); + } + if (null !== $object->getMonth()) { + $data['month'] = $object->getMonth(); + } + if (null !== $object->getYear()) { + $data['year'] = $object->getYear(); + } + + return $data; + } +} diff --git a/src/Normalizer/DaterangePropNormalizer.php b/src/Normalizer/DaterangePropNormalizer.php new file mode 100644 index 0000000..1a0eee8 --- /dev/null +++ b/src/Normalizer/DaterangePropNormalizer.php @@ -0,0 +1,85 @@ +setFrom($this->denormalizer->denormalize($data['from'], 'Jikan\\JikanPHP\\Model\\DaterangePropFrom', 'json', $context)); + } + if (\array_key_exists('to', $data)) { + $object->setTo($this->denormalizer->denormalize($data['to'], 'Jikan\\JikanPHP\\Model\\DaterangePropTo', 'json', $context)); + } + if (\array_key_exists('string', $data) && null !== $data['string']) { + $object->setString($data['string']); + } elseif (\array_key_exists('string', $data) && null === $data['string']) { + $object->setString(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getFrom()) { + $data['from'] = $this->normalizer->normalize($object->getFrom(), 'json', $context); + } + if (null !== $object->getTo()) { + $data['to'] = $this->normalizer->normalize($object->getTo(), 'json', $context); + } + if (null !== $object->getString()) { + $data['string'] = $object->getString(); + } + + return $data; + } +} diff --git a/src/Normalizer/DaterangePropToNormalizer.php b/src/Normalizer/DaterangePropToNormalizer.php new file mode 100644 index 0000000..fe78a64 --- /dev/null +++ b/src/Normalizer/DaterangePropToNormalizer.php @@ -0,0 +1,89 @@ +setDay($data['day']); + } elseif (\array_key_exists('day', $data) && null === $data['day']) { + $object->setDay(null); + } + if (\array_key_exists('month', $data) && null !== $data['month']) { + $object->setMonth($data['month']); + } elseif (\array_key_exists('month', $data) && null === $data['month']) { + $object->setMonth(null); + } + if (\array_key_exists('year', $data) && null !== $data['year']) { + $object->setYear($data['year']); + } elseif (\array_key_exists('year', $data) && null === $data['year']) { + $object->setYear(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDay()) { + $data['day'] = $object->getDay(); + } + if (null !== $object->getMonth()) { + $data['month'] = $object->getMonth(); + } + if (null !== $object->getYear()) { + $data['year'] = $object->getYear(); + } + + return $data; + } +} diff --git a/src/Normalizer/EntryMetaNormalizer.php b/src/Normalizer/EntryMetaNormalizer.php new file mode 100644 index 0000000..454e01b --- /dev/null +++ b/src/Normalizer/EntryMetaNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('image_url', $data)) { + $object->setImageUrl($data['image_url']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + + return $data; + } +} diff --git a/src/Normalizer/EntryRecommendationsDataItemNormalizer.php b/src/Normalizer/EntryRecommendationsDataItemNormalizer.php new file mode 100644 index 0000000..729dd20 --- /dev/null +++ b/src/Normalizer/EntryRecommendationsDataItemNormalizer.php @@ -0,0 +1,71 @@ +setEntry($data['entry']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getEntry()) { + $data['entry'] = $object->getEntry(); + } + + return $data; + } +} diff --git a/src/Normalizer/EntryRecommendationsNormalizer.php b/src/Normalizer/EntryRecommendationsNormalizer.php new file mode 100644 index 0000000..643bdf5 --- /dev/null +++ b/src/Normalizer/EntryRecommendationsNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\EntryRecommendationsDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/ExternalLinksDataItemNormalizer.php b/src/Normalizer/ExternalLinksDataItemNormalizer.php new file mode 100644 index 0000000..2bdd3c3 --- /dev/null +++ b/src/Normalizer/ExternalLinksDataItemNormalizer.php @@ -0,0 +1,77 @@ +setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/ExternalLinksNormalizer.php b/src/Normalizer/ExternalLinksNormalizer.php new file mode 100644 index 0000000..35f8cb3 --- /dev/null +++ b/src/Normalizer/ExternalLinksNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\ExternalLinksDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/ForumDataItemLastCommentNormalizer.php b/src/Normalizer/ForumDataItemLastCommentNormalizer.php new file mode 100644 index 0000000..faa43bf --- /dev/null +++ b/src/Normalizer/ForumDataItemLastCommentNormalizer.php @@ -0,0 +1,91 @@ +setUrl($data['url']); + } + if (\array_key_exists('author_username', $data)) { + $object->setAuthorUsername($data['author_username']); + } + if (\array_key_exists('author_url', $data)) { + $object->setAuthorUrl($data['author_url']); + } + if (\array_key_exists('date', $data) && null !== $data['date']) { + $object->setDate($data['date']); + } elseif (\array_key_exists('date', $data) && null === $data['date']) { + $object->setDate(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getAuthorUsername()) { + $data['author_username'] = $object->getAuthorUsername(); + } + if (null !== $object->getAuthorUrl()) { + $data['author_url'] = $object->getAuthorUrl(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + + return $data; + } +} diff --git a/src/Normalizer/ForumDataItemNormalizer.php b/src/Normalizer/ForumDataItemNormalizer.php new file mode 100644 index 0000000..eab2cb7 --- /dev/null +++ b/src/Normalizer/ForumDataItemNormalizer.php @@ -0,0 +1,113 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + if (\array_key_exists('author_username', $data)) { + $object->setAuthorUsername($data['author_username']); + } + if (\array_key_exists('author_url', $data)) { + $object->setAuthorUrl($data['author_url']); + } + if (\array_key_exists('comments', $data)) { + $object->setComments($data['comments']); + } + if (\array_key_exists('last_comment', $data)) { + $object->setLastComment($this->denormalizer->denormalize($data['last_comment'], 'Jikan\\JikanPHP\\Model\\ForumDataItemLastComment', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + if (null !== $object->getAuthorUsername()) { + $data['author_username'] = $object->getAuthorUsername(); + } + if (null !== $object->getAuthorUrl()) { + $data['author_url'] = $object->getAuthorUrl(); + } + if (null !== $object->getComments()) { + $data['comments'] = $object->getComments(); + } + if (null !== $object->getLastComment()) { + $data['last_comment'] = $this->normalizer->normalize($object->getLastComment(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/ForumNormalizer.php b/src/Normalizer/ForumNormalizer.php new file mode 100644 index 0000000..dce95ed --- /dev/null +++ b/src/Normalizer/ForumNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\ForumDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/GenreNormalizer.php b/src/Normalizer/GenreNormalizer.php new file mode 100644 index 0000000..fbc44c7 --- /dev/null +++ b/src/Normalizer/GenreNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getCount()) { + $data['count'] = $object->getCount(); + } + + return $data; + } +} diff --git a/src/Normalizer/GenresNormalizer.php b/src/Normalizer/GenresNormalizer.php new file mode 100644 index 0000000..3c4c3a9 --- /dev/null +++ b/src/Normalizer/GenresNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Genre', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/HistoryNormalizer.php b/src/Normalizer/HistoryNormalizer.php new file mode 100644 index 0000000..4ecd48a --- /dev/null +++ b/src/Normalizer/HistoryNormalizer.php @@ -0,0 +1,83 @@ +setEntry($this->denormalizer->denormalize($data['entry'], 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context)); + } + if (\array_key_exists('increment', $data)) { + $object->setIncrement($data['increment']); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getEntry()) { + $data['entry'] = $this->normalizer->normalize($object->getEntry(), 'json', $context); + } + if (null !== $object->getIncrement()) { + $data['increment'] = $object->getIncrement(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + + return $data; + } +} diff --git a/src/Normalizer/JaneObjectNormalizer.php b/src/Normalizer/JaneObjectNormalizer.php new file mode 100644 index 0000000..65536b7 --- /dev/null +++ b/src/Normalizer/JaneObjectNormalizer.php @@ -0,0 +1,74 @@ + 'Jikan\\JikanPHP\\Normalizer\\AnimeEpisodesNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeEpisodesdataItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeEpisodesdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeNews' => 'Jikan\\JikanPHP\\Normalizer\\AnimeNewsNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeVideosEpisodes' => 'Jikan\\JikanPHP\\Normalizer\\AnimeVideosEpisodesNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeVideosEpisodesdataItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeVideosEpisodesdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterPictures' => 'Jikan\\JikanPHP\\Normalizer\\CharacterPicturesNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterPicturesDataItem' => 'Jikan\\JikanPHP\\Normalizer\\CharacterPicturesDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\ClubMember' => 'Jikan\\JikanPHP\\Normalizer\\ClubMemberNormalizer', 'Jikan\\JikanPHP\\Model\\MangaNews' => 'Jikan\\JikanPHP\\Normalizer\\MangaNewsNormalizer', 'Jikan\\JikanPHP\\Model\\MangaPictures' => 'Jikan\\JikanPHP\\Normalizer\\MangaPicturesNormalizer', 'Jikan\\JikanPHP\\Model\\PersonPictures' => 'Jikan\\JikanPHP\\Normalizer\\PersonPicturesNormalizer', 'Jikan\\JikanPHP\\Model\\Random' => 'Jikan\\JikanPHP\\Normalizer\\RandomNormalizer', 'Jikan\\JikanPHP\\Model\\Schedules' => 'Jikan\\JikanPHP\\Normalizer\\SchedulesNormalizer', 'Jikan\\JikanPHP\\Model\\UsersSearch' => 'Jikan\\JikanPHP\\Normalizer\\UsersSearchNormalizer', 'Jikan\\JikanPHP\\Model\\UsersSearchdataItem' => 'Jikan\\JikanPHP\\Normalizer\\UsersSearchdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\Seasons' => 'Jikan\\JikanPHP\\Normalizer\\SeasonsNormalizer', 'Jikan\\JikanPHP\\Model\\SeasonsDataItem' => 'Jikan\\JikanPHP\\Normalizer\\SeasonsDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\ReviewsCollection' => 'Jikan\\JikanPHP\\Normalizer\\ReviewsCollectionNormalizer', 'Jikan\\JikanPHP\\Model\\UserFriends' => 'Jikan\\JikanPHP\\Normalizer\\UserFriendsNormalizer', 'Jikan\\JikanPHP\\Model\\UserFriendsdataItem' => 'Jikan\\JikanPHP\\Normalizer\\UserFriendsdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\UserClubs' => 'Jikan\\JikanPHP\\Normalizer\\UserClubsNormalizer', 'Jikan\\JikanPHP\\Model\\UserClubsdataItem' => 'Jikan\\JikanPHP\\Normalizer\\UserClubsdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\WatchEpisodes' => 'Jikan\\JikanPHP\\Normalizer\\WatchEpisodesNormalizer', 'Jikan\\JikanPHP\\Model\\WatchEpisodesdataItem' => 'Jikan\\JikanPHP\\Normalizer\\WatchEpisodesdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\WatchEpisodesdataItemEpisodesItem' => 'Jikan\\JikanPHP\\Normalizer\\WatchEpisodesdataItemEpisodesItemNormalizer', 'Jikan\\JikanPHP\\Model\\WatchPromos' => 'Jikan\\JikanPHP\\Normalizer\\WatchPromosNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeCharacters' => 'Jikan\\JikanPHP\\Normalizer\\AnimeCharactersNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeCharactersDataItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeCharactersDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeCharactersDataItemCharacter' => 'Jikan\\JikanPHP\\Normalizer\\AnimeCharactersDataItemCharacterNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeCharactersDataItemVoiceActorsItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeCharactersDataItemVoiceActorsItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeCharactersDataItemVoiceActorsItemPerson' => 'Jikan\\JikanPHP\\Normalizer\\AnimeCharactersDataItemVoiceActorsItemPersonNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeSearch' => 'Jikan\\JikanPHP\\Normalizer\\AnimeSearchNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeEpisode' => 'Jikan\\JikanPHP\\Normalizer\\AnimeEpisodeNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeFull' => 'Jikan\\JikanPHP\\Normalizer\\AnimeFullNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeFullRelationsItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeFullRelationsItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeFullTheme' => 'Jikan\\JikanPHP\\Normalizer\\AnimeFullThemeNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeFullExternalItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeFullExternalItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeFullStreamingItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeFullStreamingItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeRelations' => 'Jikan\\JikanPHP\\Normalizer\\AnimeRelationsNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeRelationsDataItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeRelationsDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\Anime' => 'Jikan\\JikanPHP\\Normalizer\\AnimeNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeStaff' => 'Jikan\\JikanPHP\\Normalizer\\AnimeStaffNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeStaffDataItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeStaffDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeStaffDataItemPerson' => 'Jikan\\JikanPHP\\Normalizer\\AnimeStaffDataItemPersonNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeStatistics' => 'Jikan\\JikanPHP\\Normalizer\\AnimeStatisticsNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeStatisticsData' => 'Jikan\\JikanPHP\\Normalizer\\AnimeStatisticsDataNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeStatisticsDataScoresItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeStatisticsDataScoresItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeThemes' => 'Jikan\\JikanPHP\\Normalizer\\AnimeThemesNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeThemesData' => 'Jikan\\JikanPHP\\Normalizer\\AnimeThemesDataNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeVideos' => 'Jikan\\JikanPHP\\Normalizer\\AnimeVideosNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeVideosData' => 'Jikan\\JikanPHP\\Normalizer\\AnimeVideosDataNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeVideosDataPromoItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeVideosDataPromoItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeVideosDataEpisodesItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeVideosDataEpisodesItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeVideosDataMusicVideosItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeVideosDataMusicVideosItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeVideosDataMusicVideosItemMeta' => 'Jikan\\JikanPHP\\Normalizer\\AnimeVideosDataMusicVideosItemMetaNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterAnime' => 'Jikan\\JikanPHP\\Normalizer\\CharacterAnimeNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterAnimeDataItem' => 'Jikan\\JikanPHP\\Normalizer\\CharacterAnimeDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\CharactersSearch' => 'Jikan\\JikanPHP\\Normalizer\\CharactersSearchNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterFull' => 'Jikan\\JikanPHP\\Normalizer\\CharacterFullNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterFullAnimeItem' => 'Jikan\\JikanPHP\\Normalizer\\CharacterFullAnimeItemNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterFullMangaItem' => 'Jikan\\JikanPHP\\Normalizer\\CharacterFullMangaItemNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterFullVoicesItem' => 'Jikan\\JikanPHP\\Normalizer\\CharacterFullVoicesItemNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterManga' => 'Jikan\\JikanPHP\\Normalizer\\CharacterMangaNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterMangaDataItem' => 'Jikan\\JikanPHP\\Normalizer\\CharacterMangaDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\Character' => 'Jikan\\JikanPHP\\Normalizer\\CharacterNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterVoiceActors' => 'Jikan\\JikanPHP\\Normalizer\\CharacterVoiceActorsNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterVoiceActorsDataItem' => 'Jikan\\JikanPHP\\Normalizer\\CharacterVoiceActorsDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\ClubsSearch' => 'Jikan\\JikanPHP\\Normalizer\\ClubsSearchNormalizer', 'Jikan\\JikanPHP\\Model\\ClubRelations' => 'Jikan\\JikanPHP\\Normalizer\\ClubRelationsNormalizer', 'Jikan\\JikanPHP\\Model\\ClubRelationsData' => 'Jikan\\JikanPHP\\Normalizer\\ClubRelationsDataNormalizer', 'Jikan\\JikanPHP\\Model\\Club' => 'Jikan\\JikanPHP\\Normalizer\\ClubNormalizer', 'Jikan\\JikanPHP\\Model\\ClubStaff' => 'Jikan\\JikanPHP\\Normalizer\\ClubStaffNormalizer', 'Jikan\\JikanPHP\\Model\\ClubStaffDataItem' => 'Jikan\\JikanPHP\\Normalizer\\ClubStaffDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\Trailer' => 'Jikan\\JikanPHP\\Normalizer\\TrailerNormalizer', 'Jikan\\JikanPHP\\Model\\TrailerBase' => 'Jikan\\JikanPHP\\Normalizer\\TrailerBaseNormalizer', 'Jikan\\JikanPHP\\Model\\TrailerImages' => 'Jikan\\JikanPHP\\Normalizer\\TrailerImagesNormalizer', 'Jikan\\JikanPHP\\Model\\TrailerImagesImages' => 'Jikan\\JikanPHP\\Normalizer\\TrailerImagesImagesNormalizer', 'Jikan\\JikanPHP\\Model\\Daterange' => 'Jikan\\JikanPHP\\Normalizer\\DaterangeNormalizer', 'Jikan\\JikanPHP\\Model\\DaterangeProp' => 'Jikan\\JikanPHP\\Normalizer\\DaterangePropNormalizer', 'Jikan\\JikanPHP\\Model\\DaterangePropFrom' => 'Jikan\\JikanPHP\\Normalizer\\DaterangePropFromNormalizer', 'Jikan\\JikanPHP\\Model\\DaterangePropTo' => 'Jikan\\JikanPHP\\Normalizer\\DaterangePropToNormalizer', 'Jikan\\JikanPHP\\Model\\Broadcast' => 'Jikan\\JikanPHP\\Normalizer\\BroadcastNormalizer', 'Jikan\\JikanPHP\\Model\\MalUrl' => 'Jikan\\JikanPHP\\Normalizer\\MalUrlNormalizer', 'Jikan\\JikanPHP\\Model\\MalUrl2' => 'Jikan\\JikanPHP\\Normalizer\\MalUrl2Normalizer', 'Jikan\\JikanPHP\\Model\\EntryMeta' => 'Jikan\\JikanPHP\\Normalizer\\EntryMetaNormalizer', 'Jikan\\JikanPHP\\Model\\Relation' => 'Jikan\\JikanPHP\\Normalizer\\RelationNormalizer', 'Jikan\\JikanPHP\\Model\\Pagination' => 'Jikan\\JikanPHP\\Normalizer\\PaginationNormalizer', 'Jikan\\JikanPHP\\Model\\PaginationPagination' => 'Jikan\\JikanPHP\\Normalizer\\PaginationPaginationNormalizer', 'Jikan\\JikanPHP\\Model\\PaginationPlus' => 'Jikan\\JikanPHP\\Normalizer\\PaginationPlusNormalizer', 'Jikan\\JikanPHP\\Model\\PaginationPlusPagination' => 'Jikan\\JikanPHP\\Normalizer\\PaginationPlusPaginationNormalizer', 'Jikan\\JikanPHP\\Model\\PaginationPlusPaginationItems' => 'Jikan\\JikanPHP\\Normalizer\\PaginationPlusPaginationItemsNormalizer', 'Jikan\\JikanPHP\\Model\\UserMeta' => 'Jikan\\JikanPHP\\Normalizer\\UserMetaNormalizer', 'Jikan\\JikanPHP\\Model\\UserById' => 'Jikan\\JikanPHP\\Normalizer\\UserByIdNormalizer', 'Jikan\\JikanPHP\\Model\\UserImages' => 'Jikan\\JikanPHP\\Normalizer\\UserImagesNormalizer', 'Jikan\\JikanPHP\\Model\\UserImagesJpg' => 'Jikan\\JikanPHP\\Normalizer\\UserImagesJpgNormalizer', 'Jikan\\JikanPHP\\Model\\UserImagesWebp' => 'Jikan\\JikanPHP\\Normalizer\\UserImagesWebpNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeMeta' => 'Jikan\\JikanPHP\\Normalizer\\AnimeMetaNormalizer', 'Jikan\\JikanPHP\\Model\\MangaMeta' => 'Jikan\\JikanPHP\\Normalizer\\MangaMetaNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterMeta' => 'Jikan\\JikanPHP\\Normalizer\\CharacterMetaNormalizer', 'Jikan\\JikanPHP\\Model\\PersonMeta' => 'Jikan\\JikanPHP\\Normalizer\\PersonMetaNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeImages' => 'Jikan\\JikanPHP\\Normalizer\\AnimeImagesNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeImagesJpg' => 'Jikan\\JikanPHP\\Normalizer\\AnimeImagesJpgNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeImagesWebp' => 'Jikan\\JikanPHP\\Normalizer\\AnimeImagesWebpNormalizer', 'Jikan\\JikanPHP\\Model\\MangaImages' => 'Jikan\\JikanPHP\\Normalizer\\MangaImagesNormalizer', 'Jikan\\JikanPHP\\Model\\MangaImagesJpg' => 'Jikan\\JikanPHP\\Normalizer\\MangaImagesJpgNormalizer', 'Jikan\\JikanPHP\\Model\\MangaImagesWebp' => 'Jikan\\JikanPHP\\Normalizer\\MangaImagesWebpNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterImages' => 'Jikan\\JikanPHP\\Normalizer\\CharacterImagesNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterImagesJpg' => 'Jikan\\JikanPHP\\Normalizer\\CharacterImagesJpgNormalizer', 'Jikan\\JikanPHP\\Model\\CharacterImagesWebp' => 'Jikan\\JikanPHP\\Normalizer\\CharacterImagesWebpNormalizer', 'Jikan\\JikanPHP\\Model\\PeopleImages' => 'Jikan\\JikanPHP\\Normalizer\\PeopleImagesNormalizer', 'Jikan\\JikanPHP\\Model\\PeopleImagesJpg' => 'Jikan\\JikanPHP\\Normalizer\\PeopleImagesJpgNormalizer', 'Jikan\\JikanPHP\\Model\\CommonImages' => 'Jikan\\JikanPHP\\Normalizer\\CommonImagesNormalizer', 'Jikan\\JikanPHP\\Model\\CommonImagesJpg' => 'Jikan\\JikanPHP\\Normalizer\\CommonImagesJpgNormalizer', 'Jikan\\JikanPHP\\Model\\ExternalLinks' => 'Jikan\\JikanPHP\\Normalizer\\ExternalLinksNormalizer', 'Jikan\\JikanPHP\\Model\\ExternalLinksDataItem' => 'Jikan\\JikanPHP\\Normalizer\\ExternalLinksDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\Forum' => 'Jikan\\JikanPHP\\Normalizer\\ForumNormalizer', 'Jikan\\JikanPHP\\Model\\ForumDataItem' => 'Jikan\\JikanPHP\\Normalizer\\ForumDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\ForumDataItemLastComment' => 'Jikan\\JikanPHP\\Normalizer\\ForumDataItemLastCommentNormalizer', 'Jikan\\JikanPHP\\Model\\Genres' => 'Jikan\\JikanPHP\\Normalizer\\GenresNormalizer', 'Jikan\\JikanPHP\\Model\\Genre' => 'Jikan\\JikanPHP\\Normalizer\\GenreNormalizer', 'Jikan\\JikanPHP\\Model\\Magazines' => 'Jikan\\JikanPHP\\Normalizer\\MagazinesNormalizer', 'Jikan\\JikanPHP\\Model\\Magazine' => 'Jikan\\JikanPHP\\Normalizer\\MagazineNormalizer', 'Jikan\\JikanPHP\\Model\\MangaCharacters' => 'Jikan\\JikanPHP\\Normalizer\\MangaCharactersNormalizer', 'Jikan\\JikanPHP\\Model\\MangaCharactersDataItem' => 'Jikan\\JikanPHP\\Normalizer\\MangaCharactersDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\MangaSearch' => 'Jikan\\JikanPHP\\Normalizer\\MangaSearchNormalizer', 'Jikan\\JikanPHP\\Model\\MangaFull' => 'Jikan\\JikanPHP\\Normalizer\\MangaFullNormalizer', 'Jikan\\JikanPHP\\Model\\MangaFullRelationsItem' => 'Jikan\\JikanPHP\\Normalizer\\MangaFullRelationsItemNormalizer', 'Jikan\\JikanPHP\\Model\\MangaFullExternalItem' => 'Jikan\\JikanPHP\\Normalizer\\MangaFullExternalItemNormalizer', 'Jikan\\JikanPHP\\Model\\Manga' => 'Jikan\\JikanPHP\\Normalizer\\MangaNormalizer', 'Jikan\\JikanPHP\\Model\\MangaStatistics' => 'Jikan\\JikanPHP\\Normalizer\\MangaStatisticsNormalizer', 'Jikan\\JikanPHP\\Model\\MangaStatisticsData' => 'Jikan\\JikanPHP\\Normalizer\\MangaStatisticsDataNormalizer', 'Jikan\\JikanPHP\\Model\\MangaStatisticsDataScoresItem' => 'Jikan\\JikanPHP\\Normalizer\\MangaStatisticsDataScoresItemNormalizer', 'Jikan\\JikanPHP\\Model\\Moreinfo' => 'Jikan\\JikanPHP\\Normalizer\\MoreinfoNormalizer', 'Jikan\\JikanPHP\\Model\\MoreinfoData' => 'Jikan\\JikanPHP\\Normalizer\\MoreinfoDataNormalizer', 'Jikan\\JikanPHP\\Model\\News' => 'Jikan\\JikanPHP\\Normalizer\\NewsNormalizer', 'Jikan\\JikanPHP\\Model\\NewsDataItem' => 'Jikan\\JikanPHP\\Normalizer\\NewsDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\PersonAnime' => 'Jikan\\JikanPHP\\Normalizer\\PersonAnimeNormalizer', 'Jikan\\JikanPHP\\Model\\PersonAnimeDataItem' => 'Jikan\\JikanPHP\\Normalizer\\PersonAnimeDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\PeopleSearch' => 'Jikan\\JikanPHP\\Normalizer\\PeopleSearchNormalizer', 'Jikan\\JikanPHP\\Model\\PeopleSearchdataItem' => 'Jikan\\JikanPHP\\Normalizer\\PeopleSearchdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\PersonFull' => 'Jikan\\JikanPHP\\Normalizer\\PersonFullNormalizer', 'Jikan\\JikanPHP\\Model\\PersonFullAnimeItem' => 'Jikan\\JikanPHP\\Normalizer\\PersonFullAnimeItemNormalizer', 'Jikan\\JikanPHP\\Model\\PersonFullMangaItem' => 'Jikan\\JikanPHP\\Normalizer\\PersonFullMangaItemNormalizer', 'Jikan\\JikanPHP\\Model\\PersonFullVoicesItem' => 'Jikan\\JikanPHP\\Normalizer\\PersonFullVoicesItemNormalizer', 'Jikan\\JikanPHP\\Model\\PersonManga' => 'Jikan\\JikanPHP\\Normalizer\\PersonMangaNormalizer', 'Jikan\\JikanPHP\\Model\\PersonMangaDataItem' => 'Jikan\\JikanPHP\\Normalizer\\PersonMangaDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\Person' => 'Jikan\\JikanPHP\\Normalizer\\PersonNormalizer', 'Jikan\\JikanPHP\\Model\\PersonVoiceActingRoles' => 'Jikan\\JikanPHP\\Normalizer\\PersonVoiceActingRolesNormalizer', 'Jikan\\JikanPHP\\Model\\PersonVoiceActingRolesDataItem' => 'Jikan\\JikanPHP\\Normalizer\\PersonVoiceActingRolesDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\Pictures' => 'Jikan\\JikanPHP\\Normalizer\\PicturesNormalizer', 'Jikan\\JikanPHP\\Model\\PicturesDataItem' => 'Jikan\\JikanPHP\\Normalizer\\PicturesDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\PicturesVariants' => 'Jikan\\JikanPHP\\Normalizer\\PicturesVariantsNormalizer', 'Jikan\\JikanPHP\\Model\\PicturesVariantsDataItem' => 'Jikan\\JikanPHP\\Normalizer\\PicturesVariantsDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\Producers' => 'Jikan\\JikanPHP\\Normalizer\\ProducersNormalizer', 'Jikan\\JikanPHP\\Model\\ProducerFull' => 'Jikan\\JikanPHP\\Normalizer\\ProducerFullNormalizer', 'Jikan\\JikanPHP\\Model\\ProducerFullExternalItem' => 'Jikan\\JikanPHP\\Normalizer\\ProducerFullExternalItemNormalizer', 'Jikan\\JikanPHP\\Model\\Producer' => 'Jikan\\JikanPHP\\Normalizer\\ProducerNormalizer', 'Jikan\\JikanPHP\\Model\\UserAbout' => 'Jikan\\JikanPHP\\Normalizer\\UserAboutNormalizer', 'Jikan\\JikanPHP\\Model\\UserAboutDataItem' => 'Jikan\\JikanPHP\\Normalizer\\UserAboutDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\UserFavorites' => 'Jikan\\JikanPHP\\Normalizer\\UserFavoritesNormalizer', 'Jikan\\JikanPHP\\Model\\UserFavoritesAnimeItem' => 'Jikan\\JikanPHP\\Normalizer\\UserFavoritesAnimeItemNormalizer', 'Jikan\\JikanPHP\\Model\\UserFavoritesMangaItem' => 'Jikan\\JikanPHP\\Normalizer\\UserFavoritesMangaItemNormalizer', 'Jikan\\JikanPHP\\Model\\UserFavoritesCharactersItem' => 'Jikan\\JikanPHP\\Normalizer\\UserFavoritesCharactersItemNormalizer', 'Jikan\\JikanPHP\\Model\\UserProfileFull' => 'Jikan\\JikanPHP\\Normalizer\\UserProfileFullNormalizer', 'Jikan\\JikanPHP\\Model\\UserProfileFullStatistics' => 'Jikan\\JikanPHP\\Normalizer\\UserProfileFullStatisticsNormalizer', 'Jikan\\JikanPHP\\Model\\UserProfileFullStatisticsAnime' => 'Jikan\\JikanPHP\\Normalizer\\UserProfileFullStatisticsAnimeNormalizer', 'Jikan\\JikanPHP\\Model\\UserProfileFullStatisticsManga' => 'Jikan\\JikanPHP\\Normalizer\\UserProfileFullStatisticsMangaNormalizer', 'Jikan\\JikanPHP\\Model\\UserProfileFullExternalItem' => 'Jikan\\JikanPHP\\Normalizer\\UserProfileFullExternalItemNormalizer', 'Jikan\\JikanPHP\\Model\\UserHistory' => 'Jikan\\JikanPHP\\Normalizer\\UserHistoryNormalizer', 'Jikan\\JikanPHP\\Model\\History' => 'Jikan\\JikanPHP\\Normalizer\\HistoryNormalizer', 'Jikan\\JikanPHP\\Model\\UserUpdates' => 'Jikan\\JikanPHP\\Normalizer\\UserUpdatesNormalizer', 'Jikan\\JikanPHP\\Model\\UserUpdatesData' => 'Jikan\\JikanPHP\\Normalizer\\UserUpdatesDataNormalizer', 'Jikan\\JikanPHP\\Model\\UserUpdatesDataAnimeItem' => 'Jikan\\JikanPHP\\Normalizer\\UserUpdatesDataAnimeItemNormalizer', 'Jikan\\JikanPHP\\Model\\UserUpdatesDataMangaItem' => 'Jikan\\JikanPHP\\Normalizer\\UserUpdatesDataMangaItemNormalizer', 'Jikan\\JikanPHP\\Model\\UserProfile' => 'Jikan\\JikanPHP\\Normalizer\\UserProfileNormalizer', 'Jikan\\JikanPHP\\Model\\UsersTemp' => 'Jikan\\JikanPHP\\Normalizer\\UsersTempNormalizer', 'Jikan\\JikanPHP\\Model\\UsersTempDataItem' => 'Jikan\\JikanPHP\\Normalizer\\UsersTempDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\UsersTempDataItemImages' => 'Jikan\\JikanPHP\\Normalizer\\UsersTempDataItemImagesNormalizer', 'Jikan\\JikanPHP\\Model\\UsersTempDataItemImagesJpg' => 'Jikan\\JikanPHP\\Normalizer\\UsersTempDataItemImagesJpgNormalizer', 'Jikan\\JikanPHP\\Model\\UsersTempDataItemImagesWebp' => 'Jikan\\JikanPHP\\Normalizer\\UsersTempDataItemImagesWebpNormalizer', 'Jikan\\JikanPHP\\Model\\UsersTempDataItemAnimeStats' => 'Jikan\\JikanPHP\\Normalizer\\UsersTempDataItemAnimeStatsNormalizer', 'Jikan\\JikanPHP\\Model\\UsersTempDataItemMangaStats' => 'Jikan\\JikanPHP\\Normalizer\\UsersTempDataItemMangaStatsNormalizer', 'Jikan\\JikanPHP\\Model\\UsersTempDataItemFavorites' => 'Jikan\\JikanPHP\\Normalizer\\UsersTempDataItemFavoritesNormalizer', 'Jikan\\JikanPHP\\Model\\UserStatistics' => 'Jikan\\JikanPHP\\Normalizer\\UserStatisticsNormalizer', 'Jikan\\JikanPHP\\Model\\UserStatisticsData' => 'Jikan\\JikanPHP\\Normalizer\\UserStatisticsDataNormalizer', 'Jikan\\JikanPHP\\Model\\UserStatisticsDataAnime' => 'Jikan\\JikanPHP\\Normalizer\\UserStatisticsDataAnimeNormalizer', 'Jikan\\JikanPHP\\Model\\UserStatisticsDataManga' => 'Jikan\\JikanPHP\\Normalizer\\UserStatisticsDataMangaNormalizer', 'Jikan\\JikanPHP\\Model\\Recommendations' => 'Jikan\\JikanPHP\\Normalizer\\RecommendationsNormalizer', 'Jikan\\JikanPHP\\Model\\RecommendationsdataItem' => 'Jikan\\JikanPHP\\Normalizer\\RecommendationsdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\EntryRecommendations' => 'Jikan\\JikanPHP\\Normalizer\\EntryRecommendationsNormalizer', 'Jikan\\JikanPHP\\Model\\EntryRecommendationsDataItem' => 'Jikan\\JikanPHP\\Normalizer\\EntryRecommendationsDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\MangaReview' => 'Jikan\\JikanPHP\\Normalizer\\MangaReviewNormalizer', 'Jikan\\JikanPHP\\Model\\MangaReviewScores' => 'Jikan\\JikanPHP\\Normalizer\\MangaReviewScoresNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeReview' => 'Jikan\\JikanPHP\\Normalizer\\AnimeReviewNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeReviewScores' => 'Jikan\\JikanPHP\\Normalizer\\AnimeReviewScoresNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeReviews' => 'Jikan\\JikanPHP\\Normalizer\\AnimeReviewsNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeReviewsdataItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeReviewsdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\MangaReviews' => 'Jikan\\JikanPHP\\Normalizer\\MangaReviewsNormalizer', 'Jikan\\JikanPHP\\Model\\MangaReviewsdataItem' => 'Jikan\\JikanPHP\\Normalizer\\MangaReviewsdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\StreamingLinks' => 'Jikan\\JikanPHP\\Normalizer\\StreamingLinksNormalizer', 'Jikan\\JikanPHP\\Model\\StreamingLinksDataItem' => 'Jikan\\JikanPHP\\Normalizer\\StreamingLinksDataItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeUserupdates' => 'Jikan\\JikanPHP\\Normalizer\\AnimeUserupdatesNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeUserupdatesdataItem' => 'Jikan\\JikanPHP\\Normalizer\\AnimeUserupdatesdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\MangaUserupdates' => 'Jikan\\JikanPHP\\Normalizer\\MangaUserupdatesNormalizer', 'Jikan\\JikanPHP\\Model\\MangaUserupdatesdataItem' => 'Jikan\\JikanPHP\\Normalizer\\MangaUserupdatesdataItemNormalizer', 'Jikan\\JikanPHP\\Model\\AnimeIdFullGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\AnimeIdFullGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\AnimeIdGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\AnimeIdGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\AnimeIdEpisodesEpisodeGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\AnimeIdEpisodesEpisodeGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\AnimeIdRelationsGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\AnimeIdRelationsGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\CharactersIdFullGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\CharactersIdFullGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\CharactersIdGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\CharactersIdGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\ClubsIdGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\ClubsIdGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\ClubsIdMembersGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\ClubsIdMembersGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\MangaIdFullGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\MangaIdFullGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\MangaIdGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\MangaIdGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\MangaIdRelationsGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\MangaIdRelationsGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\PeopleIdFullGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\PeopleIdFullGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\PeopleIdGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\PeopleIdGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\ProducersIdGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\ProducersIdGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\ProducersIdFullGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\ProducersIdFullGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\RandomAnimeGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\RandomAnimeGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\RandomMangaGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\RandomMangaGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\RandomCharactersGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\RandomCharactersGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\RandomPeopleGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\RandomPeopleGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\RandomUsersGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\RandomUsersGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\UsersUserbyidIdGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\UsersUserbyidIdGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\TopReviewsGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\TopReviewsGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\TopReviewsGetResponse200Data' => 'Jikan\\JikanPHP\\Normalizer\\TopReviewsGetResponse200DataNormalizer', 'Jikan\\JikanPHP\\Model\\UsersUsernameFullGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\UsersUsernameFullGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\UsersUsernameGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\UsersUsernameGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\UsersUsernameFavoritesGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\UsersUsernameFavoritesGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\UsersUsernameReviewsGetResponse200' => 'Jikan\\JikanPHP\\Normalizer\\UsersUsernameReviewsGetResponse200Normalizer', 'Jikan\\JikanPHP\\Model\\UsersUsernameReviewsGetResponse200Data' => 'Jikan\\JikanPHP\\Normalizer\\UsersUsernameReviewsGetResponse200DataNormalizer', '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => '\\Jikan\\JikanPHP\\Runtime\\Normalizer\\ReferenceNormalizer']; + protected $normalizersCache = []; + + public function supportsDenormalization($data, $type, $format = null): bool + { + return array_key_exists($type, $this->normalizers); + } + + public function supportsNormalization($data, $format = null): bool + { + return is_object($data) && array_key_exists(get_class($data), $this->normalizers); + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $normalizerClass = $this->normalizers[get_class($object)]; + $normalizer = $this->getNormalizer($normalizerClass); + + return $normalizer->normalize($object, $format, $context); + } + + /** + * @param mixed $data + * @param mixed $class + * @param null|mixed $format + * + * @return mixed + */ + public function denormalize($data, $class, $format = null, array $context = []) + { + $denormalizerClass = $this->normalizers[$class]; + $denormalizer = $this->getNormalizer($denormalizerClass); + + return $denormalizer->denormalize($data, $class, $format, $context); + } + + private function getNormalizer(string $normalizerClass) + { + return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); + } + + private function initNormalizer(string $normalizerClass) + { + $normalizer = new $normalizerClass(); + $normalizer->setNormalizer($this->normalizer); + $normalizer->setDenormalizer($this->denormalizer); + $this->normalizersCache[$normalizerClass] = $normalizer; + + return $normalizer; + } +} diff --git a/src/Normalizer/MagazineNormalizer.php b/src/Normalizer/MagazineNormalizer.php new file mode 100644 index 0000000..b595fe9 --- /dev/null +++ b/src/Normalizer/MagazineNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getCount()) { + $data['count'] = $object->getCount(); + } + + return $data; + } +} diff --git a/src/Normalizer/MagazinesNormalizer.php b/src/Normalizer/MagazinesNormalizer.php new file mode 100644 index 0000000..93306da --- /dev/null +++ b/src/Normalizer/MagazinesNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Magazine', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MalUrl2Normalizer.php b/src/Normalizer/MalUrl2Normalizer.php new file mode 100644 index 0000000..a4af411 --- /dev/null +++ b/src/Normalizer/MalUrl2Normalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/MalUrlNormalizer.php b/src/Normalizer/MalUrlNormalizer.php new file mode 100644 index 0000000..4c7a9bf --- /dev/null +++ b/src/Normalizer/MalUrlNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaCharactersDataItemNormalizer.php b/src/Normalizer/MangaCharactersDataItemNormalizer.php new file mode 100644 index 0000000..af2abfa --- /dev/null +++ b/src/Normalizer/MangaCharactersDataItemNormalizer.php @@ -0,0 +1,77 @@ +setCharacter($this->denormalizer->denormalize($data['character'], 'Jikan\\JikanPHP\\Model\\CharacterMeta', 'json', $context)); + } + if (\array_key_exists('role', $data)) { + $object->setRole($data['role']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getCharacter()) { + $data['character'] = $this->normalizer->normalize($object->getCharacter(), 'json', $context); + } + if (null !== $object->getRole()) { + $data['role'] = $object->getRole(); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaCharactersNormalizer.php b/src/Normalizer/MangaCharactersNormalizer.php new file mode 100644 index 0000000..e13b405 --- /dev/null +++ b/src/Normalizer/MangaCharactersNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MangaCharactersDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/MangaFullExternalItemNormalizer.php b/src/Normalizer/MangaFullExternalItemNormalizer.php new file mode 100644 index 0000000..c2cc66c --- /dev/null +++ b/src/Normalizer/MangaFullExternalItemNormalizer.php @@ -0,0 +1,77 @@ +setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaFullNormalizer.php b/src/Normalizer/MangaFullNormalizer.php new file mode 100644 index 0000000..24db1ef --- /dev/null +++ b/src/Normalizer/MangaFullNormalizer.php @@ -0,0 +1,360 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\MangaImages', 'json', $context)); + } + if (\array_key_exists('approved', $data)) { + $object->setApproved($data['approved']); + } + if (\array_key_exists('titles', $data)) { + $values = []; + foreach ($data['titles'] as $value) { + $values[] = $value; + } + $object->setTitles($values); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('title_english', $data) && null !== $data['title_english']) { + $object->setTitleEnglish($data['title_english']); + } elseif (\array_key_exists('title_english', $data) && null === $data['title_english']) { + $object->setTitleEnglish(null); + } + if (\array_key_exists('title_japanese', $data) && null !== $data['title_japanese']) { + $object->setTitleJapanese($data['title_japanese']); + } elseif (\array_key_exists('title_japanese', $data) && null === $data['title_japanese']) { + $object->setTitleJapanese(null); + } + if (\array_key_exists('title_synonyms', $data)) { + $values_1 = []; + foreach ($data['title_synonyms'] as $value_1) { + $values_1[] = $value_1; + } + $object->setTitleSynonyms($values_1); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('chapters', $data) && null !== $data['chapters']) { + $object->setChapters($data['chapters']); + } elseif (\array_key_exists('chapters', $data) && null === $data['chapters']) { + $object->setChapters(null); + } + if (\array_key_exists('volumes', $data) && null !== $data['volumes']) { + $object->setVolumes($data['volumes']); + } elseif (\array_key_exists('volumes', $data) && null === $data['volumes']) { + $object->setVolumes(null); + } + if (\array_key_exists('status', $data)) { + $object->setStatus($data['status']); + } + if (\array_key_exists('publishing', $data)) { + $object->setPublishing($data['publishing']); + } + if (\array_key_exists('published', $data)) { + $object->setPublished($this->denormalizer->denormalize($data['published'], 'Jikan\\JikanPHP\\Model\\Daterange', 'json', $context)); + } + if (\array_key_exists('score', $data) && null !== $data['score']) { + $object->setScore($data['score']); + } elseif (\array_key_exists('score', $data) && null === $data['score']) { + $object->setScore(null); + } + if (\array_key_exists('scored_by', $data) && null !== $data['scored_by']) { + $object->setScoredBy($data['scored_by']); + } elseif (\array_key_exists('scored_by', $data) && null === $data['scored_by']) { + $object->setScoredBy(null); + } + if (\array_key_exists('rank', $data) && null !== $data['rank']) { + $object->setRank($data['rank']); + } elseif (\array_key_exists('rank', $data) && null === $data['rank']) { + $object->setRank(null); + } + if (\array_key_exists('popularity', $data) && null !== $data['popularity']) { + $object->setPopularity($data['popularity']); + } elseif (\array_key_exists('popularity', $data) && null === $data['popularity']) { + $object->setPopularity(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $object->setMembers($data['members']); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('favorites', $data) && null !== $data['favorites']) { + $object->setFavorites($data['favorites']); + } elseif (\array_key_exists('favorites', $data) && null === $data['favorites']) { + $object->setFavorites(null); + } + if (\array_key_exists('synopsis', $data) && null !== $data['synopsis']) { + $object->setSynopsis($data['synopsis']); + } elseif (\array_key_exists('synopsis', $data) && null === $data['synopsis']) { + $object->setSynopsis(null); + } + if (\array_key_exists('background', $data) && null !== $data['background']) { + $object->setBackground($data['background']); + } elseif (\array_key_exists('background', $data) && null === $data['background']) { + $object->setBackground(null); + } + if (\array_key_exists('authors', $data)) { + $values_2 = []; + foreach ($data['authors'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setAuthors($values_2); + } + if (\array_key_exists('serializations', $data)) { + $values_3 = []; + foreach ($data['serializations'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setSerializations($values_3); + } + if (\array_key_exists('genres', $data)) { + $values_4 = []; + foreach ($data['genres'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setGenres($values_4); + } + if (\array_key_exists('explicit_genres', $data)) { + $values_5 = []; + foreach ($data['explicit_genres'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setExplicitGenres($values_5); + } + if (\array_key_exists('themes', $data)) { + $values_6 = []; + foreach ($data['themes'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setThemes($values_6); + } + if (\array_key_exists('demographics', $data)) { + $values_7 = []; + foreach ($data['demographics'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setDemographics($values_7); + } + if (\array_key_exists('relations', $data)) { + $values_8 = []; + foreach ($data['relations'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, 'Jikan\\JikanPHP\\Model\\MangaFullRelationsItem', 'json', $context); + } + $object->setRelations($values_8); + } + if (\array_key_exists('external', $data)) { + $values_9 = []; + foreach ($data['external'] as $value_9) { + $values_9[] = $this->denormalizer->denormalize($value_9, 'Jikan\\JikanPHP\\Model\\MangaFullExternalItem', 'json', $context); + } + $object->setExternal($values_9); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getApproved()) { + $data['approved'] = $object->getApproved(); + } + if (null !== $object->getTitles()) { + $values = []; + foreach ($object->getTitles() as $value) { + $values[] = $value; + } + $data['titles'] = $values; + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getTitleEnglish()) { + $data['title_english'] = $object->getTitleEnglish(); + } + if (null !== $object->getTitleJapanese()) { + $data['title_japanese'] = $object->getTitleJapanese(); + } + if (null !== $object->getTitleSynonyms()) { + $values_1 = []; + foreach ($object->getTitleSynonyms() as $value_1) { + $values_1[] = $value_1; + } + $data['title_synonyms'] = $values_1; + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getChapters()) { + $data['chapters'] = $object->getChapters(); + } + if (null !== $object->getVolumes()) { + $data['volumes'] = $object->getVolumes(); + } + if (null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if (null !== $object->getPublishing()) { + $data['publishing'] = $object->getPublishing(); + } + if (null !== $object->getPublished()) { + $data['published'] = $this->normalizer->normalize($object->getPublished(), 'json', $context); + } + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getScoredBy()) { + $data['scored_by'] = $object->getScoredBy(); + } + if (null !== $object->getRank()) { + $data['rank'] = $object->getRank(); + } + if (null !== $object->getPopularity()) { + $data['popularity'] = $object->getPopularity(); + } + if (null !== $object->getMembers()) { + $data['members'] = $object->getMembers(); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getSynopsis()) { + $data['synopsis'] = $object->getSynopsis(); + } + if (null !== $object->getBackground()) { + $data['background'] = $object->getBackground(); + } + if (null !== $object->getAuthors()) { + $values_2 = []; + foreach ($object->getAuthors() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['authors'] = $values_2; + } + if (null !== $object->getSerializations()) { + $values_3 = []; + foreach ($object->getSerializations() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['serializations'] = $values_3; + } + if (null !== $object->getGenres()) { + $values_4 = []; + foreach ($object->getGenres() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['genres'] = $values_4; + } + if (null !== $object->getExplicitGenres()) { + $values_5 = []; + foreach ($object->getExplicitGenres() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['explicit_genres'] = $values_5; + } + if (null !== $object->getThemes()) { + $values_6 = []; + foreach ($object->getThemes() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['themes'] = $values_6; + } + if (null !== $object->getDemographics()) { + $values_7 = []; + foreach ($object->getDemographics() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['demographics'] = $values_7; + } + if (null !== $object->getRelations()) { + $values_8 = []; + foreach ($object->getRelations() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); + } + $data['relations'] = $values_8; + } + if (null !== $object->getExternal()) { + $values_9 = []; + foreach ($object->getExternal() as $value_9) { + $values_9[] = $this->normalizer->normalize($value_9, 'json', $context); + } + $data['external'] = $values_9; + } + + return $data; + } +} diff --git a/src/Normalizer/MangaFullRelationsItemNormalizer.php b/src/Normalizer/MangaFullRelationsItemNormalizer.php new file mode 100644 index 0000000..9a26bf6 --- /dev/null +++ b/src/Normalizer/MangaFullRelationsItemNormalizer.php @@ -0,0 +1,85 @@ +setRelation($data['relation']); + } + if (\array_key_exists('entry', $data)) { + $values = []; + foreach ($data['entry'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setEntry($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRelation()) { + $data['relation'] = $object->getRelation(); + } + if (null !== $object->getEntry()) { + $values = []; + foreach ($object->getEntry() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['entry'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/MangaIdFullGetResponse200Normalizer.php b/src/Normalizer/MangaIdFullGetResponse200Normalizer.php new file mode 100644 index 0000000..e2f67dc --- /dev/null +++ b/src/Normalizer/MangaIdFullGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\MangaFull', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaIdGetResponse200Normalizer.php b/src/Normalizer/MangaIdGetResponse200Normalizer.php new file mode 100644 index 0000000..6e6a7e9 --- /dev/null +++ b/src/Normalizer/MangaIdGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Manga', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaIdRelationsGetResponse200Normalizer.php b/src/Normalizer/MangaIdRelationsGetResponse200Normalizer.php new file mode 100644 index 0000000..a2765d1 --- /dev/null +++ b/src/Normalizer/MangaIdRelationsGetResponse200Normalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Relation', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/MangaImagesJpgNormalizer.php b/src/Normalizer/MangaImagesJpgNormalizer.php new file mode 100644 index 0000000..93585a5 --- /dev/null +++ b/src/Normalizer/MangaImagesJpgNormalizer.php @@ -0,0 +1,89 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('small_image_url', $data) && null !== $data['small_image_url']) { + $object->setSmallImageUrl($data['small_image_url']); + } elseif (\array_key_exists('small_image_url', $data) && null === $data['small_image_url']) { + $object->setSmallImageUrl(null); + } + if (\array_key_exists('large_image_url', $data) && null !== $data['large_image_url']) { + $object->setLargeImageUrl($data['large_image_url']); + } elseif (\array_key_exists('large_image_url', $data) && null === $data['large_image_url']) { + $object->setLargeImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getSmallImageUrl()) { + $data['small_image_url'] = $object->getSmallImageUrl(); + } + if (null !== $object->getLargeImageUrl()) { + $data['large_image_url'] = $object->getLargeImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaImagesNormalizer.php b/src/Normalizer/MangaImagesNormalizer.php new file mode 100644 index 0000000..64d2bd0 --- /dev/null +++ b/src/Normalizer/MangaImagesNormalizer.php @@ -0,0 +1,77 @@ +setJpg($this->denormalizer->denormalize($data['jpg'], 'Jikan\\JikanPHP\\Model\\MangaImagesJpg', 'json', $context)); + } + if (\array_key_exists('webp', $data)) { + $object->setWebp($this->denormalizer->denormalize($data['webp'], 'Jikan\\JikanPHP\\Model\\MangaImagesWebp', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getJpg()) { + $data['jpg'] = $this->normalizer->normalize($object->getJpg(), 'json', $context); + } + if (null !== $object->getWebp()) { + $data['webp'] = $this->normalizer->normalize($object->getWebp(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaImagesWebpNormalizer.php b/src/Normalizer/MangaImagesWebpNormalizer.php new file mode 100644 index 0000000..d58972b --- /dev/null +++ b/src/Normalizer/MangaImagesWebpNormalizer.php @@ -0,0 +1,89 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('small_image_url', $data) && null !== $data['small_image_url']) { + $object->setSmallImageUrl($data['small_image_url']); + } elseif (\array_key_exists('small_image_url', $data) && null === $data['small_image_url']) { + $object->setSmallImageUrl(null); + } + if (\array_key_exists('large_image_url', $data) && null !== $data['large_image_url']) { + $object->setLargeImageUrl($data['large_image_url']); + } elseif (\array_key_exists('large_image_url', $data) && null === $data['large_image_url']) { + $object->setLargeImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getSmallImageUrl()) { + $data['small_image_url'] = $object->getSmallImageUrl(); + } + if (null !== $object->getLargeImageUrl()) { + $data['large_image_url'] = $object->getLargeImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaMetaNormalizer.php b/src/Normalizer/MangaMetaNormalizer.php new file mode 100644 index 0000000..984adfd --- /dev/null +++ b/src/Normalizer/MangaMetaNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\MangaImages', 'json', $context)); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaNewsNormalizer.php b/src/Normalizer/MangaNewsNormalizer.php new file mode 100644 index 0000000..87d6e8e --- /dev/null +++ b/src/Normalizer/MangaNewsNormalizer.php @@ -0,0 +1,85 @@ +setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + if (\array_key_exists('data', $data)) { + $values = []; + foreach ($data['data'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\NewsDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/MangaNormalizer.php b/src/Normalizer/MangaNormalizer.php new file mode 100644 index 0000000..a68fda5 --- /dev/null +++ b/src/Normalizer/MangaNormalizer.php @@ -0,0 +1,318 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\MangaImages', 'json', $context)); + } + if (\array_key_exists('approved', $data)) { + $object->setApproved($data['approved']); + } + if (\array_key_exists('titles', $data)) { + $values = []; + foreach ($data['titles'] as $value) { + $values[] = $value; + } + $object->setTitles($values); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('title_english', $data) && null !== $data['title_english']) { + $object->setTitleEnglish($data['title_english']); + } elseif (\array_key_exists('title_english', $data) && null === $data['title_english']) { + $object->setTitleEnglish(null); + } + if (\array_key_exists('title_japanese', $data) && null !== $data['title_japanese']) { + $object->setTitleJapanese($data['title_japanese']); + } elseif (\array_key_exists('title_japanese', $data) && null === $data['title_japanese']) { + $object->setTitleJapanese(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('chapters', $data) && null !== $data['chapters']) { + $object->setChapters($data['chapters']); + } elseif (\array_key_exists('chapters', $data) && null === $data['chapters']) { + $object->setChapters(null); + } + if (\array_key_exists('volumes', $data) && null !== $data['volumes']) { + $object->setVolumes($data['volumes']); + } elseif (\array_key_exists('volumes', $data) && null === $data['volumes']) { + $object->setVolumes(null); + } + if (\array_key_exists('status', $data)) { + $object->setStatus($data['status']); + } + if (\array_key_exists('publishing', $data)) { + $object->setPublishing($data['publishing']); + } + if (\array_key_exists('published', $data)) { + $object->setPublished($this->denormalizer->denormalize($data['published'], 'Jikan\\JikanPHP\\Model\\Daterange', 'json', $context)); + } + if (\array_key_exists('score', $data) && null !== $data['score']) { + $object->setScore($data['score']); + } elseif (\array_key_exists('score', $data) && null === $data['score']) { + $object->setScore(null); + } + if (\array_key_exists('scored_by', $data) && null !== $data['scored_by']) { + $object->setScoredBy($data['scored_by']); + } elseif (\array_key_exists('scored_by', $data) && null === $data['scored_by']) { + $object->setScoredBy(null); + } + if (\array_key_exists('rank', $data) && null !== $data['rank']) { + $object->setRank($data['rank']); + } elseif (\array_key_exists('rank', $data) && null === $data['rank']) { + $object->setRank(null); + } + if (\array_key_exists('popularity', $data) && null !== $data['popularity']) { + $object->setPopularity($data['popularity']); + } elseif (\array_key_exists('popularity', $data) && null === $data['popularity']) { + $object->setPopularity(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $object->setMembers($data['members']); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('favorites', $data) && null !== $data['favorites']) { + $object->setFavorites($data['favorites']); + } elseif (\array_key_exists('favorites', $data) && null === $data['favorites']) { + $object->setFavorites(null); + } + if (\array_key_exists('synopsis', $data) && null !== $data['synopsis']) { + $object->setSynopsis($data['synopsis']); + } elseif (\array_key_exists('synopsis', $data) && null === $data['synopsis']) { + $object->setSynopsis(null); + } + if (\array_key_exists('background', $data) && null !== $data['background']) { + $object->setBackground($data['background']); + } elseif (\array_key_exists('background', $data) && null === $data['background']) { + $object->setBackground(null); + } + if (\array_key_exists('authors', $data)) { + $values_1 = []; + foreach ($data['authors'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setAuthors($values_1); + } + if (\array_key_exists('serializations', $data)) { + $values_2 = []; + foreach ($data['serializations'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setSerializations($values_2); + } + if (\array_key_exists('genres', $data)) { + $values_3 = []; + foreach ($data['genres'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setGenres($values_3); + } + if (\array_key_exists('explicit_genres', $data)) { + $values_4 = []; + foreach ($data['explicit_genres'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setExplicitGenres($values_4); + } + if (\array_key_exists('themes', $data)) { + $values_5 = []; + foreach ($data['themes'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setThemes($values_5); + } + if (\array_key_exists('demographics', $data)) { + $values_6 = []; + foreach ($data['demographics'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setDemographics($values_6); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getApproved()) { + $data['approved'] = $object->getApproved(); + } + if (null !== $object->getTitles()) { + $values = []; + foreach ($object->getTitles() as $value) { + $values[] = $value; + } + $data['titles'] = $values; + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getTitleEnglish()) { + $data['title_english'] = $object->getTitleEnglish(); + } + if (null !== $object->getTitleJapanese()) { + $data['title_japanese'] = $object->getTitleJapanese(); + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getChapters()) { + $data['chapters'] = $object->getChapters(); + } + if (null !== $object->getVolumes()) { + $data['volumes'] = $object->getVolumes(); + } + if (null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if (null !== $object->getPublishing()) { + $data['publishing'] = $object->getPublishing(); + } + if (null !== $object->getPublished()) { + $data['published'] = $this->normalizer->normalize($object->getPublished(), 'json', $context); + } + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getScoredBy()) { + $data['scored_by'] = $object->getScoredBy(); + } + if (null !== $object->getRank()) { + $data['rank'] = $object->getRank(); + } + if (null !== $object->getPopularity()) { + $data['popularity'] = $object->getPopularity(); + } + if (null !== $object->getMembers()) { + $data['members'] = $object->getMembers(); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getSynopsis()) { + $data['synopsis'] = $object->getSynopsis(); + } + if (null !== $object->getBackground()) { + $data['background'] = $object->getBackground(); + } + if (null !== $object->getAuthors()) { + $values_1 = []; + foreach ($object->getAuthors() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['authors'] = $values_1; + } + if (null !== $object->getSerializations()) { + $values_2 = []; + foreach ($object->getSerializations() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['serializations'] = $values_2; + } + if (null !== $object->getGenres()) { + $values_3 = []; + foreach ($object->getGenres() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['genres'] = $values_3; + } + if (null !== $object->getExplicitGenres()) { + $values_4 = []; + foreach ($object->getExplicitGenres() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['explicit_genres'] = $values_4; + } + if (null !== $object->getThemes()) { + $values_5 = []; + foreach ($object->getThemes() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['themes'] = $values_5; + } + if (null !== $object->getDemographics()) { + $values_6 = []; + foreach ($object->getDemographics() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['demographics'] = $values_6; + } + + return $data; + } +} diff --git a/src/Normalizer/MangaPicturesNormalizer.php b/src/Normalizer/MangaPicturesNormalizer.php new file mode 100644 index 0000000..f1f39df --- /dev/null +++ b/src/Normalizer/MangaPicturesNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MangaImages', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/MangaReviewNormalizer.php b/src/Normalizer/MangaReviewNormalizer.php new file mode 100644 index 0000000..47e2495 --- /dev/null +++ b/src/Normalizer/MangaReviewNormalizer.php @@ -0,0 +1,113 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + } + if (\array_key_exists('votes', $data)) { + $object->setVotes($data['votes']); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + if (\array_key_exists('chapters_read', $data)) { + $object->setChaptersRead($data['chapters_read']); + } + if (\array_key_exists('review', $data)) { + $object->setReview($data['review']); + } + if (\array_key_exists('scores', $data)) { + $object->setScores($this->denormalizer->denormalize($data['scores'], 'Jikan\\JikanPHP\\Model\\MangaReviewScores', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getVotes()) { + $data['votes'] = $object->getVotes(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + if (null !== $object->getChaptersRead()) { + $data['chapters_read'] = $object->getChaptersRead(); + } + if (null !== $object->getReview()) { + $data['review'] = $object->getReview(); + } + if (null !== $object->getScores()) { + $data['scores'] = $this->normalizer->normalize($object->getScores(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaReviewScoresNormalizer.php b/src/Normalizer/MangaReviewScoresNormalizer.php new file mode 100644 index 0000000..1cbb1bd --- /dev/null +++ b/src/Normalizer/MangaReviewScoresNormalizer.php @@ -0,0 +1,95 @@ +setOverall($data['overall']); + } + if (\array_key_exists('story', $data)) { + $object->setStory($data['story']); + } + if (\array_key_exists('art', $data)) { + $object->setArt($data['art']); + } + if (\array_key_exists('character', $data)) { + $object->setCharacter($data['character']); + } + if (\array_key_exists('enjoyment', $data)) { + $object->setEnjoyment($data['enjoyment']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getOverall()) { + $data['overall'] = $object->getOverall(); + } + if (null !== $object->getStory()) { + $data['story'] = $object->getStory(); + } + if (null !== $object->getArt()) { + $data['art'] = $object->getArt(); + } + if (null !== $object->getCharacter()) { + $data['character'] = $object->getCharacter(); + } + if (null !== $object->getEnjoyment()) { + $data['enjoyment'] = $object->getEnjoyment(); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaReviewsNormalizer.php b/src/Normalizer/MangaReviewsNormalizer.php new file mode 100644 index 0000000..2abd23c --- /dev/null +++ b/src/Normalizer/MangaReviewsNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MangaReviewsdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaReviewsdataItemNormalizer.php b/src/Normalizer/MangaReviewsdataItemNormalizer.php new file mode 100644 index 0000000..de7ef9e --- /dev/null +++ b/src/Normalizer/MangaReviewsdataItemNormalizer.php @@ -0,0 +1,119 @@ +setUser($this->denormalizer->denormalize($data['user'], 'Jikan\\JikanPHP\\Model\\UserMeta', 'json', $context)); + } + if (\array_key_exists('mal_id', $data)) { + $object->setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + } + if (\array_key_exists('votes', $data)) { + $object->setVotes($data['votes']); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + if (\array_key_exists('chapters_read', $data)) { + $object->setChaptersRead($data['chapters_read']); + } + if (\array_key_exists('review', $data)) { + $object->setReview($data['review']); + } + if (\array_key_exists('scores', $data)) { + $object->setScores($this->denormalizer->denormalize($data['scores'], 'Jikan\\JikanPHP\\Model\\MangaReviewScores', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUser()) { + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + } + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getVotes()) { + $data['votes'] = $object->getVotes(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + if (null !== $object->getChaptersRead()) { + $data['chapters_read'] = $object->getChaptersRead(); + } + if (null !== $object->getReview()) { + $data['review'] = $object->getReview(); + } + if (null !== $object->getScores()) { + $data['scores'] = $this->normalizer->normalize($object->getScores(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaSearchNormalizer.php b/src/Normalizer/MangaSearchNormalizer.php new file mode 100644 index 0000000..be2db40 --- /dev/null +++ b/src/Normalizer/MangaSearchNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Manga', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPlusPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaStatisticsDataNormalizer.php b/src/Normalizer/MangaStatisticsDataNormalizer.php new file mode 100644 index 0000000..0550a59 --- /dev/null +++ b/src/Normalizer/MangaStatisticsDataNormalizer.php @@ -0,0 +1,115 @@ +setReading($data['reading']); + } + if (\array_key_exists('completed', $data)) { + $object->setCompleted($data['completed']); + } + if (\array_key_exists('on_hold', $data)) { + $object->setOnHold($data['on_hold']); + } + if (\array_key_exists('dropped', $data)) { + $object->setDropped($data['dropped']); + } + if (\array_key_exists('plan_to_read', $data)) { + $object->setPlanToRead($data['plan_to_read']); + } + if (\array_key_exists('total', $data)) { + $object->setTotal($data['total']); + } + if (\array_key_exists('scores', $data)) { + $values = []; + foreach ($data['scores'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MangaStatisticsDataScoresItem', 'json', $context); + } + $object->setScores($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getReading()) { + $data['reading'] = $object->getReading(); + } + if (null !== $object->getCompleted()) { + $data['completed'] = $object->getCompleted(); + } + if (null !== $object->getOnHold()) { + $data['on_hold'] = $object->getOnHold(); + } + if (null !== $object->getDropped()) { + $data['dropped'] = $object->getDropped(); + } + if (null !== $object->getPlanToRead()) { + $data['plan_to_read'] = $object->getPlanToRead(); + } + if (null !== $object->getTotal()) { + $data['total'] = $object->getTotal(); + } + if (null !== $object->getScores()) { + $values = []; + foreach ($object->getScores() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['scores'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/MangaStatisticsDataScoresItemNormalizer.php b/src/Normalizer/MangaStatisticsDataScoresItemNormalizer.php new file mode 100644 index 0000000..6d52344 --- /dev/null +++ b/src/Normalizer/MangaStatisticsDataScoresItemNormalizer.php @@ -0,0 +1,86 @@ +setScore($data['score']); + } + if (\array_key_exists('votes', $data)) { + $object->setVotes($data['votes']); + } + if (\array_key_exists('percentage', $data)) { + $object->setPercentage($data['percentage']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getVotes()) { + $data['votes'] = $object->getVotes(); + } + if (null !== $object->getPercentage()) { + $data['percentage'] = $object->getPercentage(); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaStatisticsNormalizer.php b/src/Normalizer/MangaStatisticsNormalizer.php new file mode 100644 index 0000000..4405709 --- /dev/null +++ b/src/Normalizer/MangaStatisticsNormalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\MangaStatisticsData', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaUserupdatesNormalizer.php b/src/Normalizer/MangaUserupdatesNormalizer.php new file mode 100644 index 0000000..497b609 --- /dev/null +++ b/src/Normalizer/MangaUserupdatesNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MangaUserupdatesdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/MangaUserupdatesdataItemNormalizer.php b/src/Normalizer/MangaUserupdatesdataItemNormalizer.php new file mode 100644 index 0000000..a4ae2b7 --- /dev/null +++ b/src/Normalizer/MangaUserupdatesdataItemNormalizer.php @@ -0,0 +1,115 @@ +setUser($this->denormalizer->denormalize($data['user'], 'Jikan\\JikanPHP\\Model\\UserMeta', 'json', $context)); + } + if (\array_key_exists('score', $data) && null !== $data['score']) { + $object->setScore($data['score']); + } elseif (\array_key_exists('score', $data) && null === $data['score']) { + $object->setScore(null); + } + if (\array_key_exists('status', $data)) { + $object->setStatus($data['status']); + } + if (\array_key_exists('volumes_read', $data)) { + $object->setVolumesRead($data['volumes_read']); + } + if (\array_key_exists('volumes_total', $data)) { + $object->setVolumesTotal($data['volumes_total']); + } + if (\array_key_exists('chapters_read', $data)) { + $object->setChaptersRead($data['chapters_read']); + } + if (\array_key_exists('chapters_total', $data)) { + $object->setChaptersTotal($data['chapters_total']); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUser()) { + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + } + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if (null !== $object->getVolumesRead()) { + $data['volumes_read'] = $object->getVolumesRead(); + } + if (null !== $object->getVolumesTotal()) { + $data['volumes_total'] = $object->getVolumesTotal(); + } + if (null !== $object->getChaptersRead()) { + $data['chapters_read'] = $object->getChaptersRead(); + } + if (null !== $object->getChaptersTotal()) { + $data['chapters_total'] = $object->getChaptersTotal(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + + return $data; + } +} diff --git a/src/Normalizer/MoreinfoDataNormalizer.php b/src/Normalizer/MoreinfoDataNormalizer.php new file mode 100644 index 0000000..872baa4 --- /dev/null +++ b/src/Normalizer/MoreinfoDataNormalizer.php @@ -0,0 +1,73 @@ +setMoreinfo($data['moreinfo']); + } elseif (\array_key_exists('moreinfo', $data) && null === $data['moreinfo']) { + $object->setMoreinfo(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMoreinfo()) { + $data['moreinfo'] = $object->getMoreinfo(); + } + + return $data; + } +} diff --git a/src/Normalizer/MoreinfoNormalizer.php b/src/Normalizer/MoreinfoNormalizer.php new file mode 100644 index 0000000..12a6282 --- /dev/null +++ b/src/Normalizer/MoreinfoNormalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\MoreinfoData', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/NewsDataItemNormalizer.php b/src/Normalizer/NewsDataItemNormalizer.php new file mode 100644 index 0000000..87e70c0 --- /dev/null +++ b/src/Normalizer/NewsDataItemNormalizer.php @@ -0,0 +1,125 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + if (\array_key_exists('author_username', $data)) { + $object->setAuthorUsername($data['author_username']); + } + if (\array_key_exists('author_url', $data)) { + $object->setAuthorUrl($data['author_url']); + } + if (\array_key_exists('forum_url', $data)) { + $object->setForumUrl($data['forum_url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CommonImages', 'json', $context)); + } + if (\array_key_exists('comments', $data)) { + $object->setComments($data['comments']); + } + if (\array_key_exists('excerpt', $data)) { + $object->setExcerpt($data['excerpt']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + if (null !== $object->getAuthorUsername()) { + $data['author_username'] = $object->getAuthorUsername(); + } + if (null !== $object->getAuthorUrl()) { + $data['author_url'] = $object->getAuthorUrl(); + } + if (null !== $object->getForumUrl()) { + $data['forum_url'] = $object->getForumUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getComments()) { + $data['comments'] = $object->getComments(); + } + if (null !== $object->getExcerpt()) { + $data['excerpt'] = $object->getExcerpt(); + } + + return $data; + } +} diff --git a/src/Normalizer/NewsNormalizer.php b/src/Normalizer/NewsNormalizer.php new file mode 100644 index 0000000..41878f4 --- /dev/null +++ b/src/Normalizer/NewsNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\NewsDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/PaginationNormalizer.php b/src/Normalizer/PaginationNormalizer.php new file mode 100644 index 0000000..1e2e9da --- /dev/null +++ b/src/Normalizer/PaginationNormalizer.php @@ -0,0 +1,71 @@ +setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PaginationPaginationNormalizer.php b/src/Normalizer/PaginationPaginationNormalizer.php new file mode 100644 index 0000000..77a65a5 --- /dev/null +++ b/src/Normalizer/PaginationPaginationNormalizer.php @@ -0,0 +1,77 @@ +setLastVisiblePage($data['last_visible_page']); + } + if (\array_key_exists('has_next_page', $data)) { + $object->setHasNextPage($data['has_next_page']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getLastVisiblePage()) { + $data['last_visible_page'] = $object->getLastVisiblePage(); + } + if (null !== $object->getHasNextPage()) { + $data['has_next_page'] = $object->getHasNextPage(); + } + + return $data; + } +} diff --git a/src/Normalizer/PaginationPlusNormalizer.php b/src/Normalizer/PaginationPlusNormalizer.php new file mode 100644 index 0000000..5eea5de --- /dev/null +++ b/src/Normalizer/PaginationPlusNormalizer.php @@ -0,0 +1,71 @@ +setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPlusPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PaginationPlusPaginationItemsNormalizer.php b/src/Normalizer/PaginationPlusPaginationItemsNormalizer.php new file mode 100644 index 0000000..61787bb --- /dev/null +++ b/src/Normalizer/PaginationPlusPaginationItemsNormalizer.php @@ -0,0 +1,83 @@ +setCount($data['count']); + } + if (\array_key_exists('total', $data)) { + $object->setTotal($data['total']); + } + if (\array_key_exists('per_page', $data)) { + $object->setPerPage($data['per_page']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getCount()) { + $data['count'] = $object->getCount(); + } + if (null !== $object->getTotal()) { + $data['total'] = $object->getTotal(); + } + if (null !== $object->getPerPage()) { + $data['per_page'] = $object->getPerPage(); + } + + return $data; + } +} diff --git a/src/Normalizer/PaginationPlusPaginationNormalizer.php b/src/Normalizer/PaginationPlusPaginationNormalizer.php new file mode 100644 index 0000000..c0bc957 --- /dev/null +++ b/src/Normalizer/PaginationPlusPaginationNormalizer.php @@ -0,0 +1,83 @@ +setLastVisiblePage($data['last_visible_page']); + } + if (\array_key_exists('has_next_page', $data)) { + $object->setHasNextPage($data['has_next_page']); + } + if (\array_key_exists('items', $data)) { + $object->setItems($this->denormalizer->denormalize($data['items'], 'Jikan\\JikanPHP\\Model\\PaginationPlusPaginationItems', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getLastVisiblePage()) { + $data['last_visible_page'] = $object->getLastVisiblePage(); + } + if (null !== $object->getHasNextPage()) { + $data['has_next_page'] = $object->getHasNextPage(); + } + if (null !== $object->getItems()) { + $data['items'] = $this->normalizer->normalize($object->getItems(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PeopleIdFullGetResponse200Normalizer.php b/src/Normalizer/PeopleIdFullGetResponse200Normalizer.php new file mode 100644 index 0000000..bc99281 --- /dev/null +++ b/src/Normalizer/PeopleIdFullGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\PersonFull', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PeopleIdGetResponse200Normalizer.php b/src/Normalizer/PeopleIdGetResponse200Normalizer.php new file mode 100644 index 0000000..a14b9fc --- /dev/null +++ b/src/Normalizer/PeopleIdGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Person', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PeopleImagesJpgNormalizer.php b/src/Normalizer/PeopleImagesJpgNormalizer.php new file mode 100644 index 0000000..25f069f --- /dev/null +++ b/src/Normalizer/PeopleImagesJpgNormalizer.php @@ -0,0 +1,73 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/PeopleImagesNormalizer.php b/src/Normalizer/PeopleImagesNormalizer.php new file mode 100644 index 0000000..3016690 --- /dev/null +++ b/src/Normalizer/PeopleImagesNormalizer.php @@ -0,0 +1,71 @@ +setJpg($this->denormalizer->denormalize($data['jpg'], 'Jikan\\JikanPHP\\Model\\PeopleImagesJpg', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getJpg()) { + $data['jpg'] = $this->normalizer->normalize($object->getJpg(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PeopleSearchNormalizer.php b/src/Normalizer/PeopleSearchNormalizer.php new file mode 100644 index 0000000..1a6f156 --- /dev/null +++ b/src/Normalizer/PeopleSearchNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\PeopleSearchdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPlusPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PeopleSearchdataItemNormalizer.php b/src/Normalizer/PeopleSearchdataItemNormalizer.php new file mode 100644 index 0000000..1b295c1 --- /dev/null +++ b/src/Normalizer/PeopleSearchdataItemNormalizer.php @@ -0,0 +1,149 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('website_url', $data) && null !== $data['website_url']) { + $object->setWebsiteUrl($data['website_url']); + } elseif (\array_key_exists('website_url', $data) && null === $data['website_url']) { + $object->setWebsiteUrl(null); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\PeopleImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('given_name', $data) && null !== $data['given_name']) { + $object->setGivenName($data['given_name']); + } elseif (\array_key_exists('given_name', $data) && null === $data['given_name']) { + $object->setGivenName(null); + } + if (\array_key_exists('family_name', $data) && null !== $data['family_name']) { + $object->setFamilyName($data['family_name']); + } elseif (\array_key_exists('family_name', $data) && null === $data['family_name']) { + $object->setFamilyName(null); + } + if (\array_key_exists('alternate_names', $data)) { + $values = []; + foreach ($data['alternate_names'] as $value) { + $values[] = $value; + } + $object->setAlternateNames($values); + } + if (\array_key_exists('birthday', $data) && null !== $data['birthday']) { + $object->setBirthday($data['birthday']); + } elseif (\array_key_exists('birthday', $data) && null === $data['birthday']) { + $object->setBirthday(null); + } + if (\array_key_exists('favorites', $data)) { + $object->setFavorites($data['favorites']); + } + if (\array_key_exists('about', $data) && null !== $data['about']) { + $object->setAbout($data['about']); + } elseif (\array_key_exists('about', $data) && null === $data['about']) { + $object->setAbout(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getWebsiteUrl()) { + $data['website_url'] = $object->getWebsiteUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getGivenName()) { + $data['given_name'] = $object->getGivenName(); + } + if (null !== $object->getFamilyName()) { + $data['family_name'] = $object->getFamilyName(); + } + if (null !== $object->getAlternateNames()) { + $values = []; + foreach ($object->getAlternateNames() as $value) { + $values[] = $value; + } + $data['alternate_names'] = $values; + } + if (null !== $object->getBirthday()) { + $data['birthday'] = $object->getBirthday(); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonAnimeDataItemNormalizer.php b/src/Normalizer/PersonAnimeDataItemNormalizer.php new file mode 100644 index 0000000..f65f868 --- /dev/null +++ b/src/Normalizer/PersonAnimeDataItemNormalizer.php @@ -0,0 +1,77 @@ +setPosition($data['position']); + } + if (\array_key_exists('anime', $data)) { + $object->setAnime($this->denormalizer->denormalize($data['anime'], 'Jikan\\JikanPHP\\Model\\AnimeMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPosition()) { + $data['position'] = $object->getPosition(); + } + if (null !== $object->getAnime()) { + $data['anime'] = $this->normalizer->normalize($object->getAnime(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonAnimeNormalizer.php b/src/Normalizer/PersonAnimeNormalizer.php new file mode 100644 index 0000000..a03de33 --- /dev/null +++ b/src/Normalizer/PersonAnimeNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\PersonAnimeDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/PersonFullAnimeItemNormalizer.php b/src/Normalizer/PersonFullAnimeItemNormalizer.php new file mode 100644 index 0000000..dac1973 --- /dev/null +++ b/src/Normalizer/PersonFullAnimeItemNormalizer.php @@ -0,0 +1,77 @@ +setPosition($data['position']); + } + if (\array_key_exists('anime', $data)) { + $object->setAnime($this->denormalizer->denormalize($data['anime'], 'Jikan\\JikanPHP\\Model\\AnimeMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPosition()) { + $data['position'] = $object->getPosition(); + } + if (null !== $object->getAnime()) { + $data['anime'] = $this->normalizer->normalize($object->getAnime(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonFullMangaItemNormalizer.php b/src/Normalizer/PersonFullMangaItemNormalizer.php new file mode 100644 index 0000000..66353e4 --- /dev/null +++ b/src/Normalizer/PersonFullMangaItemNormalizer.php @@ -0,0 +1,77 @@ +setPosition($data['position']); + } + if (\array_key_exists('manga', $data)) { + $object->setManga($this->denormalizer->denormalize($data['manga'], 'Jikan\\JikanPHP\\Model\\MangaMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPosition()) { + $data['position'] = $object->getPosition(); + } + if (null !== $object->getManga()) { + $data['manga'] = $this->normalizer->normalize($object->getManga(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonFullNormalizer.php b/src/Normalizer/PersonFullNormalizer.php new file mode 100644 index 0000000..67149d1 --- /dev/null +++ b/src/Normalizer/PersonFullNormalizer.php @@ -0,0 +1,191 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('website_url', $data) && null !== $data['website_url']) { + $object->setWebsiteUrl($data['website_url']); + } elseif (\array_key_exists('website_url', $data) && null === $data['website_url']) { + $object->setWebsiteUrl(null); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\PeopleImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('given_name', $data) && null !== $data['given_name']) { + $object->setGivenName($data['given_name']); + } elseif (\array_key_exists('given_name', $data) && null === $data['given_name']) { + $object->setGivenName(null); + } + if (\array_key_exists('family_name', $data) && null !== $data['family_name']) { + $object->setFamilyName($data['family_name']); + } elseif (\array_key_exists('family_name', $data) && null === $data['family_name']) { + $object->setFamilyName(null); + } + if (\array_key_exists('alternate_names', $data)) { + $values = []; + foreach ($data['alternate_names'] as $value) { + $values[] = $value; + } + $object->setAlternateNames($values); + } + if (\array_key_exists('birthday', $data) && null !== $data['birthday']) { + $object->setBirthday($data['birthday']); + } elseif (\array_key_exists('birthday', $data) && null === $data['birthday']) { + $object->setBirthday(null); + } + if (\array_key_exists('favorites', $data)) { + $object->setFavorites($data['favorites']); + } + if (\array_key_exists('about', $data) && null !== $data['about']) { + $object->setAbout($data['about']); + } elseif (\array_key_exists('about', $data) && null === $data['about']) { + $object->setAbout(null); + } + if (\array_key_exists('anime', $data)) { + $values_1 = []; + foreach ($data['anime'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\PersonFullAnimeItem', 'json', $context); + } + $object->setAnime($values_1); + } + if (\array_key_exists('manga', $data)) { + $values_2 = []; + foreach ($data['manga'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\PersonFullMangaItem', 'json', $context); + } + $object->setManga($values_2); + } + if (\array_key_exists('voices', $data)) { + $values_3 = []; + foreach ($data['voices'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, 'Jikan\\JikanPHP\\Model\\PersonFullVoicesItem', 'json', $context); + } + $object->setVoices($values_3); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getWebsiteUrl()) { + $data['website_url'] = $object->getWebsiteUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getGivenName()) { + $data['given_name'] = $object->getGivenName(); + } + if (null !== $object->getFamilyName()) { + $data['family_name'] = $object->getFamilyName(); + } + if (null !== $object->getAlternateNames()) { + $values = []; + foreach ($object->getAlternateNames() as $value) { + $values[] = $value; + } + $data['alternate_names'] = $values; + } + if (null !== $object->getBirthday()) { + $data['birthday'] = $object->getBirthday(); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + if (null !== $object->getAnime()) { + $values_1 = []; + foreach ($object->getAnime() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['anime'] = $values_1; + } + if (null !== $object->getManga()) { + $values_2 = []; + foreach ($object->getManga() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['manga'] = $values_2; + } + if (null !== $object->getVoices()) { + $values_3 = []; + foreach ($object->getVoices() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['voices'] = $values_3; + } + + return $data; + } +} diff --git a/src/Normalizer/PersonFullVoicesItemNormalizer.php b/src/Normalizer/PersonFullVoicesItemNormalizer.php new file mode 100644 index 0000000..629eab7 --- /dev/null +++ b/src/Normalizer/PersonFullVoicesItemNormalizer.php @@ -0,0 +1,83 @@ +setRole($data['role']); + } + if (\array_key_exists('anime', $data)) { + $object->setAnime($this->denormalizer->denormalize($data['anime'], 'Jikan\\JikanPHP\\Model\\AnimeMeta', 'json', $context)); + } + if (\array_key_exists('character', $data)) { + $object->setCharacter($this->denormalizer->denormalize($data['character'], 'Jikan\\JikanPHP\\Model\\CharacterMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRole()) { + $data['role'] = $object->getRole(); + } + if (null !== $object->getAnime()) { + $data['anime'] = $this->normalizer->normalize($object->getAnime(), 'json', $context); + } + if (null !== $object->getCharacter()) { + $data['character'] = $this->normalizer->normalize($object->getCharacter(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonMangaDataItemNormalizer.php b/src/Normalizer/PersonMangaDataItemNormalizer.php new file mode 100644 index 0000000..e99d583 --- /dev/null +++ b/src/Normalizer/PersonMangaDataItemNormalizer.php @@ -0,0 +1,77 @@ +setPosition($data['position']); + } + if (\array_key_exists('manga', $data)) { + $object->setManga($this->denormalizer->denormalize($data['manga'], 'Jikan\\JikanPHP\\Model\\MangaMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPosition()) { + $data['position'] = $object->getPosition(); + } + if (null !== $object->getManga()) { + $data['manga'] = $this->normalizer->normalize($object->getManga(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonMangaNormalizer.php b/src/Normalizer/PersonMangaNormalizer.php new file mode 100644 index 0000000..81d12c9 --- /dev/null +++ b/src/Normalizer/PersonMangaNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\PersonMangaDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/PersonMetaNormalizer.php b/src/Normalizer/PersonMetaNormalizer.php new file mode 100644 index 0000000..aa683d5 --- /dev/null +++ b/src/Normalizer/PersonMetaNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\PeopleImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonNormalizer.php b/src/Normalizer/PersonNormalizer.php new file mode 100644 index 0000000..0735f38 --- /dev/null +++ b/src/Normalizer/PersonNormalizer.php @@ -0,0 +1,149 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('website_url', $data) && null !== $data['website_url']) { + $object->setWebsiteUrl($data['website_url']); + } elseif (\array_key_exists('website_url', $data) && null === $data['website_url']) { + $object->setWebsiteUrl(null); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\PeopleImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('given_name', $data) && null !== $data['given_name']) { + $object->setGivenName($data['given_name']); + } elseif (\array_key_exists('given_name', $data) && null === $data['given_name']) { + $object->setGivenName(null); + } + if (\array_key_exists('family_name', $data) && null !== $data['family_name']) { + $object->setFamilyName($data['family_name']); + } elseif (\array_key_exists('family_name', $data) && null === $data['family_name']) { + $object->setFamilyName(null); + } + if (\array_key_exists('alternate_names', $data)) { + $values = []; + foreach ($data['alternate_names'] as $value) { + $values[] = $value; + } + $object->setAlternateNames($values); + } + if (\array_key_exists('birthday', $data) && null !== $data['birthday']) { + $object->setBirthday($data['birthday']); + } elseif (\array_key_exists('birthday', $data) && null === $data['birthday']) { + $object->setBirthday(null); + } + if (\array_key_exists('favorites', $data)) { + $object->setFavorites($data['favorites']); + } + if (\array_key_exists('about', $data) && null !== $data['about']) { + $object->setAbout($data['about']); + } elseif (\array_key_exists('about', $data) && null === $data['about']) { + $object->setAbout(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getWebsiteUrl()) { + $data['website_url'] = $object->getWebsiteUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getGivenName()) { + $data['given_name'] = $object->getGivenName(); + } + if (null !== $object->getFamilyName()) { + $data['family_name'] = $object->getFamilyName(); + } + if (null !== $object->getAlternateNames()) { + $values = []; + foreach ($object->getAlternateNames() as $value) { + $values[] = $value; + } + $data['alternate_names'] = $values; + } + if (null !== $object->getBirthday()) { + $data['birthday'] = $object->getBirthday(); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonPicturesNormalizer.php b/src/Normalizer/PersonPicturesNormalizer.php new file mode 100644 index 0000000..51f1b8c --- /dev/null +++ b/src/Normalizer/PersonPicturesNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\PeopleImages', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/PersonVoiceActingRolesDataItemNormalizer.php b/src/Normalizer/PersonVoiceActingRolesDataItemNormalizer.php new file mode 100644 index 0000000..80621dc --- /dev/null +++ b/src/Normalizer/PersonVoiceActingRolesDataItemNormalizer.php @@ -0,0 +1,83 @@ +setRole($data['role']); + } + if (\array_key_exists('anime', $data)) { + $object->setAnime($this->denormalizer->denormalize($data['anime'], 'Jikan\\JikanPHP\\Model\\AnimeMeta', 'json', $context)); + } + if (\array_key_exists('character', $data)) { + $object->setCharacter($this->denormalizer->denormalize($data['character'], 'Jikan\\JikanPHP\\Model\\CharacterMeta', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRole()) { + $data['role'] = $object->getRole(); + } + if (null !== $object->getAnime()) { + $data['anime'] = $this->normalizer->normalize($object->getAnime(), 'json', $context); + } + if (null !== $object->getCharacter()) { + $data['character'] = $this->normalizer->normalize($object->getCharacter(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PersonVoiceActingRolesNormalizer.php b/src/Normalizer/PersonVoiceActingRolesNormalizer.php new file mode 100644 index 0000000..329e5d4 --- /dev/null +++ b/src/Normalizer/PersonVoiceActingRolesNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\PersonVoiceActingRolesDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/PicturesDataItemNormalizer.php b/src/Normalizer/PicturesDataItemNormalizer.php new file mode 100644 index 0000000..74cb31a --- /dev/null +++ b/src/Normalizer/PicturesDataItemNormalizer.php @@ -0,0 +1,71 @@ +setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\AnimeImages', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PicturesNormalizer.php b/src/Normalizer/PicturesNormalizer.php new file mode 100644 index 0000000..950944b --- /dev/null +++ b/src/Normalizer/PicturesNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\PicturesDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/PicturesVariantsDataItemNormalizer.php b/src/Normalizer/PicturesVariantsDataItemNormalizer.php new file mode 100644 index 0000000..caa1c7f --- /dev/null +++ b/src/Normalizer/PicturesVariantsDataItemNormalizer.php @@ -0,0 +1,71 @@ +setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CommonImages', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/PicturesVariantsNormalizer.php b/src/Normalizer/PicturesVariantsNormalizer.php new file mode 100644 index 0000000..5b4ae29 --- /dev/null +++ b/src/Normalizer/PicturesVariantsNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\PicturesVariantsDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/ProducerFullExternalItemNormalizer.php b/src/Normalizer/ProducerFullExternalItemNormalizer.php new file mode 100644 index 0000000..5505d8a --- /dev/null +++ b/src/Normalizer/ProducerFullExternalItemNormalizer.php @@ -0,0 +1,77 @@ +setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/ProducerFullNormalizer.php b/src/Normalizer/ProducerFullNormalizer.php new file mode 100644 index 0000000..356ce91 --- /dev/null +++ b/src/Normalizer/ProducerFullNormalizer.php @@ -0,0 +1,139 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('titles', $data)) { + $values = []; + foreach ($data['titles'] as $value) { + $values[] = $value; + } + $object->setTitles($values); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CommonImages', 'json', $context)); + } + if (\array_key_exists('favorites', $data)) { + $object->setFavorites($data['favorites']); + } + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + } + if (\array_key_exists('established', $data) && null !== $data['established']) { + $object->setEstablished($data['established']); + } elseif (\array_key_exists('established', $data) && null === $data['established']) { + $object->setEstablished(null); + } + if (\array_key_exists('about', $data) && null !== $data['about']) { + $object->setAbout($data['about']); + } elseif (\array_key_exists('about', $data) && null === $data['about']) { + $object->setAbout(null); + } + if (\array_key_exists('external', $data)) { + $values_1 = []; + foreach ($data['external'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\ProducerFullExternalItem', 'json', $context); + } + $object->setExternal($values_1); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getTitles()) { + $values = []; + foreach ($object->getTitles() as $value) { + $values[] = $value; + } + $data['titles'] = $values; + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getCount()) { + $data['count'] = $object->getCount(); + } + if (null !== $object->getEstablished()) { + $data['established'] = $object->getEstablished(); + } + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + if (null !== $object->getExternal()) { + $values_1 = []; + foreach ($object->getExternal() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['external'] = $values_1; + } + + return $data; + } +} diff --git a/src/Normalizer/ProducerNormalizer.php b/src/Normalizer/ProducerNormalizer.php new file mode 100644 index 0000000..0c0519f --- /dev/null +++ b/src/Normalizer/ProducerNormalizer.php @@ -0,0 +1,125 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('titles', $data)) { + $values = []; + foreach ($data['titles'] as $value) { + $values[] = $value; + } + $object->setTitles($values); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CommonImages', 'json', $context)); + } + if (\array_key_exists('favorites', $data)) { + $object->setFavorites($data['favorites']); + } + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + } + if (\array_key_exists('established', $data) && null !== $data['established']) { + $object->setEstablished($data['established']); + } elseif (\array_key_exists('established', $data) && null === $data['established']) { + $object->setEstablished(null); + } + if (\array_key_exists('about', $data) && null !== $data['about']) { + $object->setAbout($data['about']); + } elseif (\array_key_exists('about', $data) && null === $data['about']) { + $object->setAbout(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getTitles()) { + $values = []; + foreach ($object->getTitles() as $value) { + $values[] = $value; + } + $data['titles'] = $values; + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $object->getFavorites(); + } + if (null !== $object->getCount()) { + $data['count'] = $object->getCount(); + } + if (null !== $object->getEstablished()) { + $data['established'] = $object->getEstablished(); + } + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + + return $data; + } +} diff --git a/src/Normalizer/ProducersIdFullGetResponse200Normalizer.php b/src/Normalizer/ProducersIdFullGetResponse200Normalizer.php new file mode 100644 index 0000000..85a6f91 --- /dev/null +++ b/src/Normalizer/ProducersIdFullGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\ProducerFull', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/ProducersIdGetResponse200Normalizer.php b/src/Normalizer/ProducersIdGetResponse200Normalizer.php new file mode 100644 index 0000000..559f39e --- /dev/null +++ b/src/Normalizer/ProducersIdGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Producer', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/ProducersNormalizer.php b/src/Normalizer/ProducersNormalizer.php new file mode 100644 index 0000000..2006f89 --- /dev/null +++ b/src/Normalizer/ProducersNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Producer', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/RandomAnimeGetResponse200Normalizer.php b/src/Normalizer/RandomAnimeGetResponse200Normalizer.php new file mode 100644 index 0000000..c4b7db6 --- /dev/null +++ b/src/Normalizer/RandomAnimeGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Anime', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/RandomCharactersGetResponse200Normalizer.php b/src/Normalizer/RandomCharactersGetResponse200Normalizer.php new file mode 100644 index 0000000..74ae0aa --- /dev/null +++ b/src/Normalizer/RandomCharactersGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Character', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/RandomMangaGetResponse200Normalizer.php b/src/Normalizer/RandomMangaGetResponse200Normalizer.php new file mode 100644 index 0000000..dbd4d20 --- /dev/null +++ b/src/Normalizer/RandomMangaGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Manga', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/RandomNormalizer.php b/src/Normalizer/RandomNormalizer.php new file mode 100644 index 0000000..0a97e03 --- /dev/null +++ b/src/Normalizer/RandomNormalizer.php @@ -0,0 +1,79 @@ +setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $value; + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/RandomPeopleGetResponse200Normalizer.php b/src/Normalizer/RandomPeopleGetResponse200Normalizer.php new file mode 100644 index 0000000..c9c9ac4 --- /dev/null +++ b/src/Normalizer/RandomPeopleGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\Person', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/RandomUsersGetResponse200Normalizer.php b/src/Normalizer/RandomUsersGetResponse200Normalizer.php new file mode 100644 index 0000000..4ec209a --- /dev/null +++ b/src/Normalizer/RandomUsersGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\UserProfile', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/RecommendationsNormalizer.php b/src/Normalizer/RecommendationsNormalizer.php new file mode 100644 index 0000000..dbea27e --- /dev/null +++ b/src/Normalizer/RecommendationsNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\RecommendationsdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/RecommendationsdataItemNormalizer.php b/src/Normalizer/RecommendationsdataItemNormalizer.php new file mode 100644 index 0000000..1b743ec --- /dev/null +++ b/src/Normalizer/RecommendationsdataItemNormalizer.php @@ -0,0 +1,97 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('entry', $data)) { + $values = []; + foreach ($data['entry'] as $value) { + $values[] = $value; + } + $object->setEntry($values); + } + if (\array_key_exists('content', $data)) { + $object->setContent($data['content']); + } + if (\array_key_exists('user', $data)) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'Jikan\\JikanPHP\\Model\\UserById', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getEntry()) { + $values = []; + foreach ($object->getEntry() as $value) { + $values[] = $value; + } + $data['entry'] = $values; + } + if (null !== $object->getContent()) { + $data['content'] = $object->getContent(); + } + if (null !== $object->getUser()) { + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/RelationNormalizer.php b/src/Normalizer/RelationNormalizer.php new file mode 100644 index 0000000..5693039 --- /dev/null +++ b/src/Normalizer/RelationNormalizer.php @@ -0,0 +1,85 @@ +setRelation($data['relation']); + } + if (\array_key_exists('entry', $data)) { + $values = []; + foreach ($data['entry'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\MalUrl', 'json', $context); + } + $object->setEntry($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getRelation()) { + $data['relation'] = $object->getRelation(); + } + if (null !== $object->getEntry()) { + $values = []; + foreach ($object->getEntry() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['entry'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/ReviewsCollectionNormalizer.php b/src/Normalizer/ReviewsCollectionNormalizer.php new file mode 100644 index 0000000..7d2ce2f --- /dev/null +++ b/src/Normalizer/ReviewsCollectionNormalizer.php @@ -0,0 +1,79 @@ +setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $value; + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/SchedulesNormalizer.php b/src/Normalizer/SchedulesNormalizer.php new file mode 100644 index 0000000..8e14f37 --- /dev/null +++ b/src/Normalizer/SchedulesNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\Anime', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPlusPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/SeasonsDataItemNormalizer.php b/src/Normalizer/SeasonsDataItemNormalizer.php new file mode 100644 index 0000000..bfd7387 --- /dev/null +++ b/src/Normalizer/SeasonsDataItemNormalizer.php @@ -0,0 +1,85 @@ +setYear($data['year']); + } + if (\array_key_exists('seasons', $data)) { + $values = []; + foreach ($data['seasons'] as $value) { + $values[] = $value; + } + $object->setSeasons($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getYear()) { + $data['year'] = $object->getYear(); + } + if (null !== $object->getSeasons()) { + $values = []; + foreach ($object->getSeasons() as $value) { + $values[] = $value; + } + $data['seasons'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/SeasonsNormalizer.php b/src/Normalizer/SeasonsNormalizer.php new file mode 100644 index 0000000..de45785 --- /dev/null +++ b/src/Normalizer/SeasonsNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\SeasonsDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/StreamingLinksDataItemNormalizer.php b/src/Normalizer/StreamingLinksDataItemNormalizer.php new file mode 100644 index 0000000..fc82af5 --- /dev/null +++ b/src/Normalizer/StreamingLinksDataItemNormalizer.php @@ -0,0 +1,77 @@ +setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/StreamingLinksNormalizer.php b/src/Normalizer/StreamingLinksNormalizer.php new file mode 100644 index 0000000..d9c33c4 --- /dev/null +++ b/src/Normalizer/StreamingLinksNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\StreamingLinksDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/TopReviewsGetResponse200DataNormalizer.php b/src/Normalizer/TopReviewsGetResponse200DataNormalizer.php new file mode 100644 index 0000000..b82eccb --- /dev/null +++ b/src/Normalizer/TopReviewsGetResponse200DataNormalizer.php @@ -0,0 +1,85 @@ +setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $value; + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/TopReviewsGetResponse200Normalizer.php b/src/Normalizer/TopReviewsGetResponse200Normalizer.php new file mode 100644 index 0000000..3131067 --- /dev/null +++ b/src/Normalizer/TopReviewsGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\TopReviewsGetResponse200Data', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/TrailerBaseNormalizer.php b/src/Normalizer/TrailerBaseNormalizer.php new file mode 100644 index 0000000..97ba429 --- /dev/null +++ b/src/Normalizer/TrailerBaseNormalizer.php @@ -0,0 +1,89 @@ +setYoutubeId($data['youtube_id']); + } elseif (\array_key_exists('youtube_id', $data) && null === $data['youtube_id']) { + $object->setYoutubeId(null); + } + if (\array_key_exists('url', $data) && null !== $data['url']) { + $object->setUrl($data['url']); + } elseif (\array_key_exists('url', $data) && null === $data['url']) { + $object->setUrl(null); + } + if (\array_key_exists('embed_url', $data) && null !== $data['embed_url']) { + $object->setEmbedUrl($data['embed_url']); + } elseif (\array_key_exists('embed_url', $data) && null === $data['embed_url']) { + $object->setEmbedUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getYoutubeId()) { + $data['youtube_id'] = $object->getYoutubeId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getEmbedUrl()) { + $data['embed_url'] = $object->getEmbedUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/TrailerImagesImagesNormalizer.php b/src/Normalizer/TrailerImagesImagesNormalizer.php new file mode 100644 index 0000000..1893621 --- /dev/null +++ b/src/Normalizer/TrailerImagesImagesNormalizer.php @@ -0,0 +1,105 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('small_image_url', $data) && null !== $data['small_image_url']) { + $object->setSmallImageUrl($data['small_image_url']); + } elseif (\array_key_exists('small_image_url', $data) && null === $data['small_image_url']) { + $object->setSmallImageUrl(null); + } + if (\array_key_exists('medium_image_url', $data) && null !== $data['medium_image_url']) { + $object->setMediumImageUrl($data['medium_image_url']); + } elseif (\array_key_exists('medium_image_url', $data) && null === $data['medium_image_url']) { + $object->setMediumImageUrl(null); + } + if (\array_key_exists('large_image_url', $data) && null !== $data['large_image_url']) { + $object->setLargeImageUrl($data['large_image_url']); + } elseif (\array_key_exists('large_image_url', $data) && null === $data['large_image_url']) { + $object->setLargeImageUrl(null); + } + if (\array_key_exists('maximum_image_url', $data) && null !== $data['maximum_image_url']) { + $object->setMaximumImageUrl($data['maximum_image_url']); + } elseif (\array_key_exists('maximum_image_url', $data) && null === $data['maximum_image_url']) { + $object->setMaximumImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if (null !== $object->getSmallImageUrl()) { + $data['small_image_url'] = $object->getSmallImageUrl(); + } + if (null !== $object->getMediumImageUrl()) { + $data['medium_image_url'] = $object->getMediumImageUrl(); + } + if (null !== $object->getLargeImageUrl()) { + $data['large_image_url'] = $object->getLargeImageUrl(); + } + if (null !== $object->getMaximumImageUrl()) { + $data['maximum_image_url'] = $object->getMaximumImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/TrailerImagesNormalizer.php b/src/Normalizer/TrailerImagesNormalizer.php new file mode 100644 index 0000000..7a381f2 --- /dev/null +++ b/src/Normalizer/TrailerImagesNormalizer.php @@ -0,0 +1,71 @@ +setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\TrailerImagesImages', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/TrailerNormalizer.php b/src/Normalizer/TrailerNormalizer.php new file mode 100644 index 0000000..a415434 --- /dev/null +++ b/src/Normalizer/TrailerNormalizer.php @@ -0,0 +1,95 @@ +setYoutubeId($data['youtube_id']); + } elseif (\array_key_exists('youtube_id', $data) && null === $data['youtube_id']) { + $object->setYoutubeId(null); + } + if (\array_key_exists('url', $data) && null !== $data['url']) { + $object->setUrl($data['url']); + } elseif (\array_key_exists('url', $data) && null === $data['url']) { + $object->setUrl(null); + } + if (\array_key_exists('embed_url', $data) && null !== $data['embed_url']) { + $object->setEmbedUrl($data['embed_url']); + } elseif (\array_key_exists('embed_url', $data) && null === $data['embed_url']) { + $object->setEmbedUrl(null); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\TrailerImagesImages', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getYoutubeId()) { + $data['youtube_id'] = $object->getYoutubeId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getEmbedUrl()) { + $data['embed_url'] = $object->getEmbedUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UserAboutDataItemNormalizer.php b/src/Normalizer/UserAboutDataItemNormalizer.php new file mode 100644 index 0000000..059b7cf --- /dev/null +++ b/src/Normalizer/UserAboutDataItemNormalizer.php @@ -0,0 +1,73 @@ +setAbout($data['about']); + } elseif (\array_key_exists('about', $data) && null === $data['about']) { + $object->setAbout(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserAboutNormalizer.php b/src/Normalizer/UserAboutNormalizer.php new file mode 100644 index 0000000..7fe5ae0 --- /dev/null +++ b/src/Normalizer/UserAboutNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UserAboutDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/UserByIdNormalizer.php b/src/Normalizer/UserByIdNormalizer.php new file mode 100644 index 0000000..fbe0cc3 --- /dev/null +++ b/src/Normalizer/UserByIdNormalizer.php @@ -0,0 +1,77 @@ +setUrl($data['url']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserClubsNormalizer.php b/src/Normalizer/UserClubsNormalizer.php new file mode 100644 index 0000000..6eb5b01 --- /dev/null +++ b/src/Normalizer/UserClubsNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UserClubsdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UserClubsdataItemNormalizer.php b/src/Normalizer/UserClubsdataItemNormalizer.php new file mode 100644 index 0000000..a21047a --- /dev/null +++ b/src/Normalizer/UserClubsdataItemNormalizer.php @@ -0,0 +1,83 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserFavoritesAnimeItemNormalizer.php b/src/Normalizer/UserFavoritesAnimeItemNormalizer.php new file mode 100644 index 0000000..738b277 --- /dev/null +++ b/src/Normalizer/UserFavoritesAnimeItemNormalizer.php @@ -0,0 +1,101 @@ +setType($data['type']); + } + if (\array_key_exists('start_year', $data)) { + $object->setStartYear($data['start_year']); + } + if (\array_key_exists('mal_id', $data)) { + $object->setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\AnimeImages', 'json', $context)); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getStartYear()) { + $data['start_year'] = $object->getStartYear(); + } + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserFavoritesCharactersItemNormalizer.php b/src/Normalizer/UserFavoritesCharactersItemNormalizer.php new file mode 100644 index 0000000..1603ac6 --- /dev/null +++ b/src/Normalizer/UserFavoritesCharactersItemNormalizer.php @@ -0,0 +1,101 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\CharacterImages', 'json', $context)); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserFavoritesMangaItemNormalizer.php b/src/Normalizer/UserFavoritesMangaItemNormalizer.php new file mode 100644 index 0000000..87787a7 --- /dev/null +++ b/src/Normalizer/UserFavoritesMangaItemNormalizer.php @@ -0,0 +1,101 @@ +setType($data['type']); + } + if (\array_key_exists('start_year', $data)) { + $object->setStartYear($data['start_year']); + } + if (\array_key_exists('mal_id', $data)) { + $object->setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\MangaImages', 'json', $context)); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if (null !== $object->getStartYear()) { + $data['start_year'] = $object->getStartYear(); + } + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserFavoritesNormalizer.php b/src/Normalizer/UserFavoritesNormalizer.php new file mode 100644 index 0000000..fee67a8 --- /dev/null +++ b/src/Normalizer/UserFavoritesNormalizer.php @@ -0,0 +1,121 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UserFavoritesAnimeItem', 'json', $context); + } + $object->setAnime($values); + } + if (\array_key_exists('manga', $data)) { + $values_1 = []; + foreach ($data['manga'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\UserFavoritesMangaItem', 'json', $context); + } + $object->setManga($values_1); + } + if (\array_key_exists('characters', $data)) { + $values_2 = []; + foreach ($data['characters'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\UserFavoritesCharactersItem', 'json', $context); + } + $object->setCharacters($values_2); + } + if (\array_key_exists('people', $data)) { + $values_3 = []; + foreach ($data['people'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, 'Jikan\\JikanPHP\\Model\\CharacterMeta', 'json', $context); + } + $object->setPeople($values_3); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getAnime()) { + $values = []; + foreach ($object->getAnime() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['anime'] = $values; + } + if (null !== $object->getManga()) { + $values_1 = []; + foreach ($object->getManga() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['manga'] = $values_1; + } + if (null !== $object->getCharacters()) { + $values_2 = []; + foreach ($object->getCharacters() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['characters'] = $values_2; + } + if (null !== $object->getPeople()) { + $values_3 = []; + foreach ($object->getPeople() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['people'] = $values_3; + } + + return $data; + } +} diff --git a/src/Normalizer/UserFriendsNormalizer.php b/src/Normalizer/UserFriendsNormalizer.php new file mode 100644 index 0000000..a250ef1 --- /dev/null +++ b/src/Normalizer/UserFriendsNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UserFriendsdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UserFriendsdataItemNormalizer.php b/src/Normalizer/UserFriendsdataItemNormalizer.php new file mode 100644 index 0000000..0240e5a --- /dev/null +++ b/src/Normalizer/UserFriendsdataItemNormalizer.php @@ -0,0 +1,83 @@ +setUser($this->denormalizer->denormalize($data['user'], 'Jikan\\JikanPHP\\Model\\UserMeta', 'json', $context)); + } + if (\array_key_exists('last_online', $data)) { + $object->setLastOnline($data['last_online']); + } + if (\array_key_exists('friends_since', $data)) { + $object->setFriendsSince($data['friends_since']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUser()) { + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + } + if (null !== $object->getLastOnline()) { + $data['last_online'] = $object->getLastOnline(); + } + if (null !== $object->getFriendsSince()) { + $data['friends_since'] = $object->getFriendsSince(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserHistoryNormalizer.php b/src/Normalizer/UserHistoryNormalizer.php new file mode 100644 index 0000000..f705e31 --- /dev/null +++ b/src/Normalizer/UserHistoryNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\History', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/UserImagesJpgNormalizer.php b/src/Normalizer/UserImagesJpgNormalizer.php new file mode 100644 index 0000000..e2c6a3b --- /dev/null +++ b/src/Normalizer/UserImagesJpgNormalizer.php @@ -0,0 +1,73 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserImagesNormalizer.php b/src/Normalizer/UserImagesNormalizer.php new file mode 100644 index 0000000..a099c68 --- /dev/null +++ b/src/Normalizer/UserImagesNormalizer.php @@ -0,0 +1,77 @@ +setJpg($this->denormalizer->denormalize($data['jpg'], 'Jikan\\JikanPHP\\Model\\UserImagesJpg', 'json', $context)); + } + if (\array_key_exists('webp', $data)) { + $object->setWebp($this->denormalizer->denormalize($data['webp'], 'Jikan\\JikanPHP\\Model\\UserImagesWebp', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getJpg()) { + $data['jpg'] = $this->normalizer->normalize($object->getJpg(), 'json', $context); + } + if (null !== $object->getWebp()) { + $data['webp'] = $this->normalizer->normalize($object->getWebp(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UserImagesWebpNormalizer.php b/src/Normalizer/UserImagesWebpNormalizer.php new file mode 100644 index 0000000..f001477 --- /dev/null +++ b/src/Normalizer/UserImagesWebpNormalizer.php @@ -0,0 +1,73 @@ +setImageUrl($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserMetaNormalizer.php b/src/Normalizer/UserMetaNormalizer.php new file mode 100644 index 0000000..774390e --- /dev/null +++ b/src/Normalizer/UserMetaNormalizer.php @@ -0,0 +1,83 @@ +setUsername($data['username']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\UserImages', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UserProfileFullExternalItemNormalizer.php b/src/Normalizer/UserProfileFullExternalItemNormalizer.php new file mode 100644 index 0000000..687151a --- /dev/null +++ b/src/Normalizer/UserProfileFullExternalItemNormalizer.php @@ -0,0 +1,77 @@ +setName($data['name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserProfileFullNormalizer.php b/src/Normalizer/UserProfileFullNormalizer.php new file mode 100644 index 0000000..c133baa --- /dev/null +++ b/src/Normalizer/UserProfileFullNormalizer.php @@ -0,0 +1,151 @@ +setMalId($data['mal_id']); + } elseif (\array_key_exists('mal_id', $data) && null === $data['mal_id']) { + $object->setMalId(null); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\UserImages', 'json', $context)); + } + if (\array_key_exists('last_online', $data) && null !== $data['last_online']) { + $object->setLastOnline($data['last_online']); + } elseif (\array_key_exists('last_online', $data) && null === $data['last_online']) { + $object->setLastOnline(null); + } + if (\array_key_exists('gender', $data) && null !== $data['gender']) { + $object->setGender($data['gender']); + } elseif (\array_key_exists('gender', $data) && null === $data['gender']) { + $object->setGender(null); + } + if (\array_key_exists('birthday', $data) && null !== $data['birthday']) { + $object->setBirthday($data['birthday']); + } elseif (\array_key_exists('birthday', $data) && null === $data['birthday']) { + $object->setBirthday(null); + } + if (\array_key_exists('location', $data) && null !== $data['location']) { + $object->setLocation($data['location']); + } elseif (\array_key_exists('location', $data) && null === $data['location']) { + $object->setLocation(null); + } + if (\array_key_exists('joined', $data) && null !== $data['joined']) { + $object->setJoined($data['joined']); + } elseif (\array_key_exists('joined', $data) && null === $data['joined']) { + $object->setJoined(null); + } + if (\array_key_exists('statistics', $data)) { + $object->setStatistics($this->denormalizer->denormalize($data['statistics'], 'Jikan\\JikanPHP\\Model\\UserProfileFullStatistics', 'json', $context)); + } + if (\array_key_exists('external', $data)) { + $values = []; + foreach ($data['external'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UserProfileFullExternalItem', 'json', $context); + } + $object->setExternal($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getLastOnline()) { + $data['last_online'] = $object->getLastOnline(); + } + if (null !== $object->getGender()) { + $data['gender'] = $object->getGender(); + } + if (null !== $object->getBirthday()) { + $data['birthday'] = $object->getBirthday(); + } + if (null !== $object->getLocation()) { + $data['location'] = $object->getLocation(); + } + if (null !== $object->getJoined()) { + $data['joined'] = $object->getJoined(); + } + if (null !== $object->getStatistics()) { + $data['statistics'] = $this->normalizer->normalize($object->getStatistics(), 'json', $context); + } + if (null !== $object->getExternal()) { + $values = []; + foreach ($object->getExternal() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['external'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/UserProfileFullStatisticsAnimeNormalizer.php b/src/Normalizer/UserProfileFullStatisticsAnimeNormalizer.php new file mode 100644 index 0000000..227f6fe --- /dev/null +++ b/src/Normalizer/UserProfileFullStatisticsAnimeNormalizer.php @@ -0,0 +1,131 @@ +setDaysWatched($data['days_watched']); + } + if (\array_key_exists('mean_score', $data)) { + $object->setMeanScore($data['mean_score']); + } + if (\array_key_exists('watching', $data)) { + $object->setWatching($data['watching']); + } + if (\array_key_exists('completed', $data)) { + $object->setCompleted($data['completed']); + } + if (\array_key_exists('on_hold', $data)) { + $object->setOnHold($data['on_hold']); + } + if (\array_key_exists('dropped', $data)) { + $object->setDropped($data['dropped']); + } + if (\array_key_exists('plan_to_watch', $data)) { + $object->setPlanToWatch($data['plan_to_watch']); + } + if (\array_key_exists('total_entries', $data)) { + $object->setTotalEntries($data['total_entries']); + } + if (\array_key_exists('rewatched', $data)) { + $object->setRewatched($data['rewatched']); + } + if (\array_key_exists('episodes_watched', $data)) { + $object->setEpisodesWatched($data['episodes_watched']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDaysWatched()) { + $data['days_watched'] = $object->getDaysWatched(); + } + if (null !== $object->getMeanScore()) { + $data['mean_score'] = $object->getMeanScore(); + } + if (null !== $object->getWatching()) { + $data['watching'] = $object->getWatching(); + } + if (null !== $object->getCompleted()) { + $data['completed'] = $object->getCompleted(); + } + if (null !== $object->getOnHold()) { + $data['on_hold'] = $object->getOnHold(); + } + if (null !== $object->getDropped()) { + $data['dropped'] = $object->getDropped(); + } + if (null !== $object->getPlanToWatch()) { + $data['plan_to_watch'] = $object->getPlanToWatch(); + } + if (null !== $object->getTotalEntries()) { + $data['total_entries'] = $object->getTotalEntries(); + } + if (null !== $object->getRewatched()) { + $data['rewatched'] = $object->getRewatched(); + } + if (null !== $object->getEpisodesWatched()) { + $data['episodes_watched'] = $object->getEpisodesWatched(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserProfileFullStatisticsMangaNormalizer.php b/src/Normalizer/UserProfileFullStatisticsMangaNormalizer.php new file mode 100644 index 0000000..db1f2f6 --- /dev/null +++ b/src/Normalizer/UserProfileFullStatisticsMangaNormalizer.php @@ -0,0 +1,137 @@ +setDaysRead($data['days_read']); + } + if (\array_key_exists('mean_score', $data)) { + $object->setMeanScore($data['mean_score']); + } + if (\array_key_exists('reading', $data)) { + $object->setReading($data['reading']); + } + if (\array_key_exists('completed', $data)) { + $object->setCompleted($data['completed']); + } + if (\array_key_exists('on_hold', $data)) { + $object->setOnHold($data['on_hold']); + } + if (\array_key_exists('dropped', $data)) { + $object->setDropped($data['dropped']); + } + if (\array_key_exists('plan_to_read', $data)) { + $object->setPlanToRead($data['plan_to_read']); + } + if (\array_key_exists('total_entries', $data)) { + $object->setTotalEntries($data['total_entries']); + } + if (\array_key_exists('reread', $data)) { + $object->setReread($data['reread']); + } + if (\array_key_exists('chapters_read', $data)) { + $object->setChaptersRead($data['chapters_read']); + } + if (\array_key_exists('volumes_read', $data)) { + $object->setVolumesRead($data['volumes_read']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDaysRead()) { + $data['days_read'] = $object->getDaysRead(); + } + if (null !== $object->getMeanScore()) { + $data['mean_score'] = $object->getMeanScore(); + } + if (null !== $object->getReading()) { + $data['reading'] = $object->getReading(); + } + if (null !== $object->getCompleted()) { + $data['completed'] = $object->getCompleted(); + } + if (null !== $object->getOnHold()) { + $data['on_hold'] = $object->getOnHold(); + } + if (null !== $object->getDropped()) { + $data['dropped'] = $object->getDropped(); + } + if (null !== $object->getPlanToRead()) { + $data['plan_to_read'] = $object->getPlanToRead(); + } + if (null !== $object->getTotalEntries()) { + $data['total_entries'] = $object->getTotalEntries(); + } + if (null !== $object->getReread()) { + $data['reread'] = $object->getReread(); + } + if (null !== $object->getChaptersRead()) { + $data['chapters_read'] = $object->getChaptersRead(); + } + if (null !== $object->getVolumesRead()) { + $data['volumes_read'] = $object->getVolumesRead(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserProfileFullStatisticsNormalizer.php b/src/Normalizer/UserProfileFullStatisticsNormalizer.php new file mode 100644 index 0000000..653d477 --- /dev/null +++ b/src/Normalizer/UserProfileFullStatisticsNormalizer.php @@ -0,0 +1,77 @@ +setAnime($this->denormalizer->denormalize($data['anime'], 'Jikan\\JikanPHP\\Model\\UserProfileFullStatisticsAnime', 'json', $context)); + } + if (\array_key_exists('manga', $data)) { + $object->setManga($this->denormalizer->denormalize($data['manga'], 'Jikan\\JikanPHP\\Model\\UserProfileFullStatisticsManga', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getAnime()) { + $data['anime'] = $this->normalizer->normalize($object->getAnime(), 'json', $context); + } + if (null !== $object->getManga()) { + $data['manga'] = $this->normalizer->normalize($object->getManga(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UserProfileNormalizer.php b/src/Normalizer/UserProfileNormalizer.php new file mode 100644 index 0000000..03d9343 --- /dev/null +++ b/src/Normalizer/UserProfileNormalizer.php @@ -0,0 +1,131 @@ +setMalId($data['mal_id']); + } elseif (\array_key_exists('mal_id', $data) && null === $data['mal_id']) { + $object->setMalId(null); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\UserImages', 'json', $context)); + } + if (\array_key_exists('last_online', $data) && null !== $data['last_online']) { + $object->setLastOnline($data['last_online']); + } elseif (\array_key_exists('last_online', $data) && null === $data['last_online']) { + $object->setLastOnline(null); + } + if (\array_key_exists('gender', $data) && null !== $data['gender']) { + $object->setGender($data['gender']); + } elseif (\array_key_exists('gender', $data) && null === $data['gender']) { + $object->setGender(null); + } + if (\array_key_exists('birthday', $data) && null !== $data['birthday']) { + $object->setBirthday($data['birthday']); + } elseif (\array_key_exists('birthday', $data) && null === $data['birthday']) { + $object->setBirthday(null); + } + if (\array_key_exists('location', $data) && null !== $data['location']) { + $object->setLocation($data['location']); + } elseif (\array_key_exists('location', $data) && null === $data['location']) { + $object->setLocation(null); + } + if (\array_key_exists('joined', $data) && null !== $data['joined']) { + $object->setJoined($data['joined']); + } elseif (\array_key_exists('joined', $data) && null === $data['joined']) { + $object->setJoined(null); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getLastOnline()) { + $data['last_online'] = $object->getLastOnline(); + } + if (null !== $object->getGender()) { + $data['gender'] = $object->getGender(); + } + if (null !== $object->getBirthday()) { + $data['birthday'] = $object->getBirthday(); + } + if (null !== $object->getLocation()) { + $data['location'] = $object->getLocation(); + } + if (null !== $object->getJoined()) { + $data['joined'] = $object->getJoined(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserStatisticsDataAnimeNormalizer.php b/src/Normalizer/UserStatisticsDataAnimeNormalizer.php new file mode 100644 index 0000000..cd4a8d1 --- /dev/null +++ b/src/Normalizer/UserStatisticsDataAnimeNormalizer.php @@ -0,0 +1,131 @@ +setDaysWatched($data['days_watched']); + } + if (\array_key_exists('mean_score', $data)) { + $object->setMeanScore($data['mean_score']); + } + if (\array_key_exists('watching', $data)) { + $object->setWatching($data['watching']); + } + if (\array_key_exists('completed', $data)) { + $object->setCompleted($data['completed']); + } + if (\array_key_exists('on_hold', $data)) { + $object->setOnHold($data['on_hold']); + } + if (\array_key_exists('dropped', $data)) { + $object->setDropped($data['dropped']); + } + if (\array_key_exists('plan_to_watch', $data)) { + $object->setPlanToWatch($data['plan_to_watch']); + } + if (\array_key_exists('total_entries', $data)) { + $object->setTotalEntries($data['total_entries']); + } + if (\array_key_exists('rewatched', $data)) { + $object->setRewatched($data['rewatched']); + } + if (\array_key_exists('episodes_watched', $data)) { + $object->setEpisodesWatched($data['episodes_watched']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDaysWatched()) { + $data['days_watched'] = $object->getDaysWatched(); + } + if (null !== $object->getMeanScore()) { + $data['mean_score'] = $object->getMeanScore(); + } + if (null !== $object->getWatching()) { + $data['watching'] = $object->getWatching(); + } + if (null !== $object->getCompleted()) { + $data['completed'] = $object->getCompleted(); + } + if (null !== $object->getOnHold()) { + $data['on_hold'] = $object->getOnHold(); + } + if (null !== $object->getDropped()) { + $data['dropped'] = $object->getDropped(); + } + if (null !== $object->getPlanToWatch()) { + $data['plan_to_watch'] = $object->getPlanToWatch(); + } + if (null !== $object->getTotalEntries()) { + $data['total_entries'] = $object->getTotalEntries(); + } + if (null !== $object->getRewatched()) { + $data['rewatched'] = $object->getRewatched(); + } + if (null !== $object->getEpisodesWatched()) { + $data['episodes_watched'] = $object->getEpisodesWatched(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserStatisticsDataMangaNormalizer.php b/src/Normalizer/UserStatisticsDataMangaNormalizer.php new file mode 100644 index 0000000..337f16a --- /dev/null +++ b/src/Normalizer/UserStatisticsDataMangaNormalizer.php @@ -0,0 +1,137 @@ +setDaysRead($data['days_read']); + } + if (\array_key_exists('mean_score', $data)) { + $object->setMeanScore($data['mean_score']); + } + if (\array_key_exists('reading', $data)) { + $object->setReading($data['reading']); + } + if (\array_key_exists('completed', $data)) { + $object->setCompleted($data['completed']); + } + if (\array_key_exists('on_hold', $data)) { + $object->setOnHold($data['on_hold']); + } + if (\array_key_exists('dropped', $data)) { + $object->setDropped($data['dropped']); + } + if (\array_key_exists('plan_to_read', $data)) { + $object->setPlanToRead($data['plan_to_read']); + } + if (\array_key_exists('total_entries', $data)) { + $object->setTotalEntries($data['total_entries']); + } + if (\array_key_exists('reread', $data)) { + $object->setReread($data['reread']); + } + if (\array_key_exists('chapters_read', $data)) { + $object->setChaptersRead($data['chapters_read']); + } + if (\array_key_exists('volumes_read', $data)) { + $object->setVolumesRead($data['volumes_read']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDaysRead()) { + $data['days_read'] = $object->getDaysRead(); + } + if (null !== $object->getMeanScore()) { + $data['mean_score'] = $object->getMeanScore(); + } + if (null !== $object->getReading()) { + $data['reading'] = $object->getReading(); + } + if (null !== $object->getCompleted()) { + $data['completed'] = $object->getCompleted(); + } + if (null !== $object->getOnHold()) { + $data['on_hold'] = $object->getOnHold(); + } + if (null !== $object->getDropped()) { + $data['dropped'] = $object->getDropped(); + } + if (null !== $object->getPlanToRead()) { + $data['plan_to_read'] = $object->getPlanToRead(); + } + if (null !== $object->getTotalEntries()) { + $data['total_entries'] = $object->getTotalEntries(); + } + if (null !== $object->getReread()) { + $data['reread'] = $object->getReread(); + } + if (null !== $object->getChaptersRead()) { + $data['chapters_read'] = $object->getChaptersRead(); + } + if (null !== $object->getVolumesRead()) { + $data['volumes_read'] = $object->getVolumesRead(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserStatisticsDataNormalizer.php b/src/Normalizer/UserStatisticsDataNormalizer.php new file mode 100644 index 0000000..4b21c33 --- /dev/null +++ b/src/Normalizer/UserStatisticsDataNormalizer.php @@ -0,0 +1,77 @@ +setAnime($this->denormalizer->denormalize($data['anime'], 'Jikan\\JikanPHP\\Model\\UserStatisticsDataAnime', 'json', $context)); + } + if (\array_key_exists('manga', $data)) { + $object->setManga($this->denormalizer->denormalize($data['manga'], 'Jikan\\JikanPHP\\Model\\UserStatisticsDataManga', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getAnime()) { + $data['anime'] = $this->normalizer->normalize($object->getAnime(), 'json', $context); + } + if (null !== $object->getManga()) { + $data['manga'] = $this->normalizer->normalize($object->getManga(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UserStatisticsNormalizer.php b/src/Normalizer/UserStatisticsNormalizer.php new file mode 100644 index 0000000..ee06daf --- /dev/null +++ b/src/Normalizer/UserStatisticsNormalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\UserStatisticsData', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UserUpdatesDataAnimeItemNormalizer.php b/src/Normalizer/UserUpdatesDataAnimeItemNormalizer.php new file mode 100644 index 0000000..99b4460 --- /dev/null +++ b/src/Normalizer/UserUpdatesDataAnimeItemNormalizer.php @@ -0,0 +1,107 @@ +setEntry($this->denormalizer->denormalize($data['entry'], 'Jikan\\JikanPHP\\Model\\AnimeMeta', 'json', $context)); + } + if (\array_key_exists('score', $data) && null !== $data['score']) { + $object->setScore($data['score']); + } elseif (\array_key_exists('score', $data) && null === $data['score']) { + $object->setScore(null); + } + if (\array_key_exists('status', $data)) { + $object->setStatus($data['status']); + } + if (\array_key_exists('episodes_seen', $data) && null !== $data['episodes_seen']) { + $object->setEpisodesSeen($data['episodes_seen']); + } elseif (\array_key_exists('episodes_seen', $data) && null === $data['episodes_seen']) { + $object->setEpisodesSeen(null); + } + if (\array_key_exists('episodes_total', $data) && null !== $data['episodes_total']) { + $object->setEpisodesTotal($data['episodes_total']); + } elseif (\array_key_exists('episodes_total', $data) && null === $data['episodes_total']) { + $object->setEpisodesTotal(null); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getEntry()) { + $data['entry'] = $this->normalizer->normalize($object->getEntry(), 'json', $context); + } + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if (null !== $object->getEpisodesSeen()) { + $data['episodes_seen'] = $object->getEpisodesSeen(); + } + if (null !== $object->getEpisodesTotal()) { + $data['episodes_total'] = $object->getEpisodesTotal(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserUpdatesDataMangaItemNormalizer.php b/src/Normalizer/UserUpdatesDataMangaItemNormalizer.php new file mode 100644 index 0000000..01c0b85 --- /dev/null +++ b/src/Normalizer/UserUpdatesDataMangaItemNormalizer.php @@ -0,0 +1,123 @@ +setEntry($this->denormalizer->denormalize($data['entry'], 'Jikan\\JikanPHP\\Model\\MangaMeta', 'json', $context)); + } + if (\array_key_exists('score', $data) && null !== $data['score']) { + $object->setScore($data['score']); + } elseif (\array_key_exists('score', $data) && null === $data['score']) { + $object->setScore(null); + } + if (\array_key_exists('status', $data)) { + $object->setStatus($data['status']); + } + if (\array_key_exists('chapters_read', $data) && null !== $data['chapters_read']) { + $object->setChaptersRead($data['chapters_read']); + } elseif (\array_key_exists('chapters_read', $data) && null === $data['chapters_read']) { + $object->setChaptersRead(null); + } + if (\array_key_exists('chapters_total', $data) && null !== $data['chapters_total']) { + $object->setChaptersTotal($data['chapters_total']); + } elseif (\array_key_exists('chapters_total', $data) && null === $data['chapters_total']) { + $object->setChaptersTotal(null); + } + if (\array_key_exists('volumes_read', $data) && null !== $data['volumes_read']) { + $object->setVolumesRead($data['volumes_read']); + } elseif (\array_key_exists('volumes_read', $data) && null === $data['volumes_read']) { + $object->setVolumesRead(null); + } + if (\array_key_exists('volumes_total', $data) && null !== $data['volumes_total']) { + $object->setVolumesTotal($data['volumes_total']); + } elseif (\array_key_exists('volumes_total', $data) && null === $data['volumes_total']) { + $object->setVolumesTotal(null); + } + if (\array_key_exists('date', $data)) { + $object->setDate($data['date']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getEntry()) { + $data['entry'] = $this->normalizer->normalize($object->getEntry(), 'json', $context); + } + if (null !== $object->getScore()) { + $data['score'] = $object->getScore(); + } + if (null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if (null !== $object->getChaptersRead()) { + $data['chapters_read'] = $object->getChaptersRead(); + } + if (null !== $object->getChaptersTotal()) { + $data['chapters_total'] = $object->getChaptersTotal(); + } + if (null !== $object->getVolumesRead()) { + $data['volumes_read'] = $object->getVolumesRead(); + } + if (null !== $object->getVolumesTotal()) { + $data['volumes_total'] = $object->getVolumesTotal(); + } + if (null !== $object->getDate()) { + $data['date'] = $object->getDate(); + } + + return $data; + } +} diff --git a/src/Normalizer/UserUpdatesDataNormalizer.php b/src/Normalizer/UserUpdatesDataNormalizer.php new file mode 100644 index 0000000..0a9f1c6 --- /dev/null +++ b/src/Normalizer/UserUpdatesDataNormalizer.php @@ -0,0 +1,93 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UserUpdatesDataAnimeItem', 'json', $context); + } + $object->setAnime($values); + } + if (\array_key_exists('manga', $data)) { + $values_1 = []; + foreach ($data['manga'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\UserUpdatesDataMangaItem', 'json', $context); + } + $object->setManga($values_1); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getAnime()) { + $values = []; + foreach ($object->getAnime() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['anime'] = $values; + } + if (null !== $object->getManga()) { + $values_1 = []; + foreach ($object->getManga() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['manga'] = $values_1; + } + + return $data; + } +} diff --git a/src/Normalizer/UserUpdatesNormalizer.php b/src/Normalizer/UserUpdatesNormalizer.php new file mode 100644 index 0000000..21c8288 --- /dev/null +++ b/src/Normalizer/UserUpdatesNormalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\UserUpdatesData', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersSearchNormalizer.php b/src/Normalizer/UsersSearchNormalizer.php new file mode 100644 index 0000000..4d1b69b --- /dev/null +++ b/src/Normalizer/UsersSearchNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UsersSearchdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersSearchdataItemNormalizer.php b/src/Normalizer/UsersSearchdataItemNormalizer.php new file mode 100644 index 0000000..6cf02e0 --- /dev/null +++ b/src/Normalizer/UsersSearchdataItemNormalizer.php @@ -0,0 +1,89 @@ +setUrl($data['url']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\UserImages', 'json', $context)); + } + if (\array_key_exists('last_online', $data)) { + $object->setLastOnline($data['last_online']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getLastOnline()) { + $data['last_online'] = $object->getLastOnline(); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersTempDataItemAnimeStatsNormalizer.php b/src/Normalizer/UsersTempDataItemAnimeStatsNormalizer.php new file mode 100644 index 0000000..4f1c3d6 --- /dev/null +++ b/src/Normalizer/UsersTempDataItemAnimeStatsNormalizer.php @@ -0,0 +1,131 @@ +setDaysWatched($data['days_watched']); + } + if (\array_key_exists('mean_score', $data)) { + $object->setMeanScore($data['mean_score']); + } + if (\array_key_exists('watching', $data)) { + $object->setWatching($data['watching']); + } + if (\array_key_exists('completed', $data)) { + $object->setCompleted($data['completed']); + } + if (\array_key_exists('on_hold', $data)) { + $object->setOnHold($data['on_hold']); + } + if (\array_key_exists('dropped', $data)) { + $object->setDropped($data['dropped']); + } + if (\array_key_exists('plan_to_watch', $data)) { + $object->setPlanToWatch($data['plan_to_watch']); + } + if (\array_key_exists('total_entries', $data)) { + $object->setTotalEntries($data['total_entries']); + } + if (\array_key_exists('rewatched', $data)) { + $object->setRewatched($data['rewatched']); + } + if (\array_key_exists('episodes_watched', $data)) { + $object->setEpisodesWatched($data['episodes_watched']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDaysWatched()) { + $data['days_watched'] = $object->getDaysWatched(); + } + if (null !== $object->getMeanScore()) { + $data['mean_score'] = $object->getMeanScore(); + } + if (null !== $object->getWatching()) { + $data['watching'] = $object->getWatching(); + } + if (null !== $object->getCompleted()) { + $data['completed'] = $object->getCompleted(); + } + if (null !== $object->getOnHold()) { + $data['on_hold'] = $object->getOnHold(); + } + if (null !== $object->getDropped()) { + $data['dropped'] = $object->getDropped(); + } + if (null !== $object->getPlanToWatch()) { + $data['plan_to_watch'] = $object->getPlanToWatch(); + } + if (null !== $object->getTotalEntries()) { + $data['total_entries'] = $object->getTotalEntries(); + } + if (null !== $object->getRewatched()) { + $data['rewatched'] = $object->getRewatched(); + } + if (null !== $object->getEpisodesWatched()) { + $data['episodes_watched'] = $object->getEpisodesWatched(); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersTempDataItemFavoritesNormalizer.php b/src/Normalizer/UsersTempDataItemFavoritesNormalizer.php new file mode 100644 index 0000000..c8fbb44 --- /dev/null +++ b/src/Normalizer/UsersTempDataItemFavoritesNormalizer.php @@ -0,0 +1,121 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\EntryMeta', 'json', $context); + } + $object->setAnime($values); + } + if (\array_key_exists('manga', $data)) { + $values_1 = []; + foreach ($data['manga'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'Jikan\\JikanPHP\\Model\\EntryMeta', 'json', $context); + } + $object->setManga($values_1); + } + if (\array_key_exists('characters', $data)) { + $values_2 = []; + foreach ($data['characters'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'Jikan\\JikanPHP\\Model\\EntryMeta', 'json', $context); + } + $object->setCharacters($values_2); + } + if (\array_key_exists('people', $data)) { + $values_3 = []; + foreach ($data['people'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, 'Jikan\\JikanPHP\\Model\\EntryMeta', 'json', $context); + } + $object->setPeople($values_3); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getAnime()) { + $values = []; + foreach ($object->getAnime() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['anime'] = $values; + } + if (null !== $object->getManga()) { + $values_1 = []; + foreach ($object->getManga() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['manga'] = $values_1; + } + if (null !== $object->getCharacters()) { + $values_2 = []; + foreach ($object->getCharacters() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['characters'] = $values_2; + } + if (null !== $object->getPeople()) { + $values_3 = []; + foreach ($object->getPeople() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['people'] = $values_3; + } + + return $data; + } +} diff --git a/src/Normalizer/UsersTempDataItemImagesJpgNormalizer.php b/src/Normalizer/UsersTempDataItemImagesJpgNormalizer.php new file mode 100644 index 0000000..f5c7329 --- /dev/null +++ b/src/Normalizer/UsersTempDataItemImagesJpgNormalizer.php @@ -0,0 +1,71 @@ +setImageUrl($data['image_url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersTempDataItemImagesNormalizer.php b/src/Normalizer/UsersTempDataItemImagesNormalizer.php new file mode 100644 index 0000000..5f3a24b --- /dev/null +++ b/src/Normalizer/UsersTempDataItemImagesNormalizer.php @@ -0,0 +1,77 @@ +setJpg($this->denormalizer->denormalize($data['jpg'], 'Jikan\\JikanPHP\\Model\\UsersTempDataItemImagesJpg', 'json', $context)); + } + if (\array_key_exists('webp', $data)) { + $object->setWebp($this->denormalizer->denormalize($data['webp'], 'Jikan\\JikanPHP\\Model\\UsersTempDataItemImagesWebp', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getJpg()) { + $data['jpg'] = $this->normalizer->normalize($object->getJpg(), 'json', $context); + } + if (null !== $object->getWebp()) { + $data['webp'] = $this->normalizer->normalize($object->getWebp(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersTempDataItemImagesWebpNormalizer.php b/src/Normalizer/UsersTempDataItemImagesWebpNormalizer.php new file mode 100644 index 0000000..211dd8b --- /dev/null +++ b/src/Normalizer/UsersTempDataItemImagesWebpNormalizer.php @@ -0,0 +1,71 @@ +setImageUrl($data['image_url']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersTempDataItemMangaStatsNormalizer.php b/src/Normalizer/UsersTempDataItemMangaStatsNormalizer.php new file mode 100644 index 0000000..c6e8529 --- /dev/null +++ b/src/Normalizer/UsersTempDataItemMangaStatsNormalizer.php @@ -0,0 +1,137 @@ +setDaysRead($data['days_read']); + } + if (\array_key_exists('mean_score', $data)) { + $object->setMeanScore($data['mean_score']); + } + if (\array_key_exists('reading', $data)) { + $object->setReading($data['reading']); + } + if (\array_key_exists('completed', $data)) { + $object->setCompleted($data['completed']); + } + if (\array_key_exists('on_hold', $data)) { + $object->setOnHold($data['on_hold']); + } + if (\array_key_exists('dropped', $data)) { + $object->setDropped($data['dropped']); + } + if (\array_key_exists('plan_to_read', $data)) { + $object->setPlanToRead($data['plan_to_read']); + } + if (\array_key_exists('total_entries', $data)) { + $object->setTotalEntries($data['total_entries']); + } + if (\array_key_exists('reread', $data)) { + $object->setReread($data['reread']); + } + if (\array_key_exists('chapters_read', $data)) { + $object->setChaptersRead($data['chapters_read']); + } + if (\array_key_exists('volumes_read', $data)) { + $object->setVolumesRead($data['volumes_read']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getDaysRead()) { + $data['days_read'] = $object->getDaysRead(); + } + if (null !== $object->getMeanScore()) { + $data['mean_score'] = $object->getMeanScore(); + } + if (null !== $object->getReading()) { + $data['reading'] = $object->getReading(); + } + if (null !== $object->getCompleted()) { + $data['completed'] = $object->getCompleted(); + } + if (null !== $object->getOnHold()) { + $data['on_hold'] = $object->getOnHold(); + } + if (null !== $object->getDropped()) { + $data['dropped'] = $object->getDropped(); + } + if (null !== $object->getPlanToRead()) { + $data['plan_to_read'] = $object->getPlanToRead(); + } + if (null !== $object->getTotalEntries()) { + $data['total_entries'] = $object->getTotalEntries(); + } + if (null !== $object->getReread()) { + $data['reread'] = $object->getReread(); + } + if (null !== $object->getChaptersRead()) { + $data['chapters_read'] = $object->getChaptersRead(); + } + if (null !== $object->getVolumesRead()) { + $data['volumes_read'] = $object->getVolumesRead(); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersTempDataItemNormalizer.php b/src/Normalizer/UsersTempDataItemNormalizer.php new file mode 100644 index 0000000..529ea66 --- /dev/null +++ b/src/Normalizer/UsersTempDataItemNormalizer.php @@ -0,0 +1,143 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('images', $data)) { + $object->setImages($this->denormalizer->denormalize($data['images'], 'Jikan\\JikanPHP\\Model\\UsersTempDataItemImages', 'json', $context)); + } + if (\array_key_exists('last_online', $data)) { + $object->setLastOnline($data['last_online']); + } + if (\array_key_exists('gender', $data)) { + $object->setGender($data['gender']); + } + if (\array_key_exists('birthday', $data)) { + $object->setBirthday($data['birthday']); + } + if (\array_key_exists('location', $data)) { + $object->setLocation($data['location']); + } + if (\array_key_exists('joined', $data)) { + $object->setJoined($data['joined']); + } + if (\array_key_exists('anime_stats', $data)) { + $object->setAnimeStats($this->denormalizer->denormalize($data['anime_stats'], 'Jikan\\JikanPHP\\Model\\UsersTempDataItemAnimeStats', 'json', $context)); + } + if (\array_key_exists('manga_stats', $data)) { + $object->setMangaStats($this->denormalizer->denormalize($data['manga_stats'], 'Jikan\\JikanPHP\\Model\\UsersTempDataItemMangaStats', 'json', $context)); + } + if (\array_key_exists('favorites', $data)) { + $object->setFavorites($this->denormalizer->denormalize($data['favorites'], 'Jikan\\JikanPHP\\Model\\UsersTempDataItemFavorites', 'json', $context)); + } + if (\array_key_exists('about', $data)) { + $object->setAbout($data['about']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getImages()) { + $data['images'] = $this->normalizer->normalize($object->getImages(), 'json', $context); + } + if (null !== $object->getLastOnline()) { + $data['last_online'] = $object->getLastOnline(); + } + if (null !== $object->getGender()) { + $data['gender'] = $object->getGender(); + } + if (null !== $object->getBirthday()) { + $data['birthday'] = $object->getBirthday(); + } + if (null !== $object->getLocation()) { + $data['location'] = $object->getLocation(); + } + if (null !== $object->getJoined()) { + $data['joined'] = $object->getJoined(); + } + if (null !== $object->getAnimeStats()) { + $data['anime_stats'] = $this->normalizer->normalize($object->getAnimeStats(), 'json', $context); + } + if (null !== $object->getMangaStats()) { + $data['manga_stats'] = $this->normalizer->normalize($object->getMangaStats(), 'json', $context); + } + if (null !== $object->getFavorites()) { + $data['favorites'] = $this->normalizer->normalize($object->getFavorites(), 'json', $context); + } + if (null !== $object->getAbout()) { + $data['about'] = $object->getAbout(); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersTempNormalizer.php b/src/Normalizer/UsersTempNormalizer.php new file mode 100644 index 0000000..9251a5c --- /dev/null +++ b/src/Normalizer/UsersTempNormalizer.php @@ -0,0 +1,79 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\UsersTempDataItem', 'json', $context); + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Normalizer/UsersUserbyidIdGetResponse200Normalizer.php b/src/Normalizer/UsersUserbyidIdGetResponse200Normalizer.php new file mode 100644 index 0000000..07c7464 --- /dev/null +++ b/src/Normalizer/UsersUserbyidIdGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\UserById', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersUsernameFavoritesGetResponse200Normalizer.php b/src/Normalizer/UsersUsernameFavoritesGetResponse200Normalizer.php new file mode 100644 index 0000000..be7c4fd --- /dev/null +++ b/src/Normalizer/UsersUsernameFavoritesGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\UserFavorites', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersUsernameFullGetResponse200Normalizer.php b/src/Normalizer/UsersUsernameFullGetResponse200Normalizer.php new file mode 100644 index 0000000..682a3aa --- /dev/null +++ b/src/Normalizer/UsersUsernameFullGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\UserProfileFull', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersUsernameGetResponse200Normalizer.php b/src/Normalizer/UsersUsernameGetResponse200Normalizer.php new file mode 100644 index 0000000..460e053 --- /dev/null +++ b/src/Normalizer/UsersUsernameGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\UserProfile', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersUsernameReviewsGetResponse200DataNormalizer.php b/src/Normalizer/UsersUsernameReviewsGetResponse200DataNormalizer.php new file mode 100644 index 0000000..346b5e2 --- /dev/null +++ b/src/Normalizer/UsersUsernameReviewsGetResponse200DataNormalizer.php @@ -0,0 +1,85 @@ +setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $value; + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/UsersUsernameReviewsGetResponse200Normalizer.php b/src/Normalizer/UsersUsernameReviewsGetResponse200Normalizer.php new file mode 100644 index 0000000..9b64a32 --- /dev/null +++ b/src/Normalizer/UsersUsernameReviewsGetResponse200Normalizer.php @@ -0,0 +1,71 @@ +setData($this->denormalizer->denormalize($data['data'], 'Jikan\\JikanPHP\\Model\\UsersUsernameReviewsGetResponse200Data', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/WatchEpisodesNormalizer.php b/src/Normalizer/WatchEpisodesNormalizer.php new file mode 100644 index 0000000..174103d --- /dev/null +++ b/src/Normalizer/WatchEpisodesNormalizer.php @@ -0,0 +1,85 @@ +denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\WatchEpisodesdataItem', 'json', $context); + } + $object->setData($values); + } + if (\array_key_exists('pagination', $data)) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['data'] = $values; + } + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + + return $data; + } +} diff --git a/src/Normalizer/WatchEpisodesdataItemEpisodesItemNormalizer.php b/src/Normalizer/WatchEpisodesdataItemEpisodesItemNormalizer.php new file mode 100644 index 0000000..e872374 --- /dev/null +++ b/src/Normalizer/WatchEpisodesdataItemEpisodesItemNormalizer.php @@ -0,0 +1,89 @@ +setMalId($data['mal_id']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('premium', $data)) { + $object->setPremium($data['premium']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getMalId()) { + $data['mal_id'] = $object->getMalId(); + } + if (null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getPremium()) { + $data['premium'] = $object->getPremium(); + } + + return $data; + } +} diff --git a/src/Normalizer/WatchEpisodesdataItemNormalizer.php b/src/Normalizer/WatchEpisodesdataItemNormalizer.php new file mode 100644 index 0000000..92820a9 --- /dev/null +++ b/src/Normalizer/WatchEpisodesdataItemNormalizer.php @@ -0,0 +1,91 @@ +setEntry($this->denormalizer->denormalize($data['entry'], 'Jikan\\JikanPHP\\Model\\AnimeMeta', 'json', $context)); + } + if (\array_key_exists('episodes', $data)) { + $values = []; + foreach ($data['episodes'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Jikan\\JikanPHP\\Model\\WatchEpisodesdataItemEpisodesItem', 'json', $context); + } + $object->setEpisodes($values); + } + if (\array_key_exists('region_locked', $data)) { + $object->setRegionLocked($data['region_locked']); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getEntry()) { + $data['entry'] = $this->normalizer->normalize($object->getEntry(), 'json', $context); + } + if (null !== $object->getEpisodes()) { + $values = []; + foreach ($object->getEpisodes() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['episodes'] = $values; + } + if (null !== $object->getRegionLocked()) { + $data['region_locked'] = $object->getRegionLocked(); + } + + return $data; + } +} diff --git a/src/Normalizer/WatchPromosNormalizer.php b/src/Normalizer/WatchPromosNormalizer.php new file mode 100644 index 0000000..51f0353 --- /dev/null +++ b/src/Normalizer/WatchPromosNormalizer.php @@ -0,0 +1,91 @@ +setPagination($this->denormalizer->denormalize($data['pagination'], 'Jikan\\JikanPHP\\Model\\PaginationPagination', 'json', $context)); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + } + if (\array_key_exists('data', $data)) { + $values = []; + foreach ($data['data'] as $value) { + $values[] = $value; + } + $object->setData($values); + } + + return $object; + } + + /** + * @param mixed $object + * @param null|mixed $format + * + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if (null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + if (null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if (null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $value) { + $values[] = $value; + } + $data['data'] = $values; + } + + return $data; + } +} diff --git a/src/Parser/MetadataParser.php b/src/Parser/MetadataParser.php deleted file mode 100644 index 6fd7e23..0000000 --- a/src/Parser/MetadataParser.php +++ /dev/null @@ -1,65 +0,0 @@ -className = $className; - $this->classmap = $classmap; - } - - public function getParsedProperties(): array - { - $class = new \ReflectionClass($this->className); - $properties[$this->className]['properties'] = []; - foreach ($class->getProperties() as $property) { - $properties[$this->className]['properties'][$property->getName()] = - ['type' => $this->parseTypeFromDocblock($property->getDocComment())]; - } - - return $properties; - } - - public function parseTypeFromDocblock(string $docblock): string - { - preg_match_all('/@var\s([\\\\\w\[\]]+)/', $docblock, $matches); - $type = $matches[1][0] ?? $docblock; - - if (strpos($type, 'string[]') !== false) { - return sprintf('array'); - } - - return $this->mapType($type); - } - - public function mapType(string $type): string - { - $searchKey = str_replace('[]', '', $type, $isArray); - $type = $this->classmap[$searchKey] ?? $type; - $type = ltrim($type, '\\'); - $type = str_replace('[]', '', $type); - if ($isArray) { - return sprintf('array<%s>', $type); - } - - return $type; - } -} diff --git a/src/Runtime/Client/BaseEndpoint.php b/src/Runtime/Client/BaseEndpoint.php new file mode 100644 index 0000000..b3c7bbf --- /dev/null +++ b/src/Runtime/Client/BaseEndpoint.php @@ -0,0 +1,82 @@ +getQueryOptionsResolver()->resolve($this->queryParameters); + $optionsResolved = array_map(function ($value) { + return null !== $value ? $value : ''; + }, $optionsResolved); + + return http_build_query($optionsResolved, '', '&', PHP_QUERY_RFC3986); + } + + public function getHeaders(array $baseHeaders = []): array + { + return array_merge($this->getExtraHeaders(), $baseHeaders, $this->getHeadersOptionsResolver()->resolve($this->headerParameters)); + } + + protected function getQueryOptionsResolver(): OptionsResolver + { + return new OptionsResolver(); + } + + protected function getHeadersOptionsResolver(): OptionsResolver + { + return new OptionsResolver(); + } + + // ---------------------------------------------------------------------------------------------------- + // Used for OpenApi2 compatibility + protected function getFormBody(): array + { + return [['Content-Type' => ['application/x-www-form-urlencoded']], http_build_query($this->getFormOptionsResolver()->resolve($this->formParameters))]; + } + + protected function getMultipartBody($streamFactory = null): array + { + $bodyBuilder = new MultipartStreamBuilder($streamFactory); + $formParameters = $this->getFormOptionsResolver()->resolve($this->formParameters); + foreach ($formParameters as $key => $value) { + $bodyBuilder->addResource($key, $value); + } + + return [['Content-Type' => ['multipart/form-data; boundary="'.($bodyBuilder->getBoundary().'"')]], $bodyBuilder->build()]; + } + + protected function getFormOptionsResolver(): OptionsResolver + { + return new OptionsResolver(); + } + + protected function getSerializedBody(SerializerInterface $serializer): array + { + return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')]; + } +} diff --git a/src/Runtime/Client/Client.php b/src/Runtime/Client/Client.php new file mode 100644 index 0000000..01407d7 --- /dev/null +++ b/src/Runtime/Client/Client.php @@ -0,0 +1,90 @@ +httpClient = $httpClient; + $this->requestFactory = $requestFactory; + $this->serializer = $serializer; + $this->streamFactory = $streamFactory; + } + + public function executeEndpoint(Endpoint $endpoint, string $fetch = self::FETCH_OBJECT) + { + if (self::FETCH_RESPONSE === $fetch) { + trigger_deprecation('jane-php/open-api-common', '7.3', 'Using %s::%s method with $fetch parameter equals to response is deprecated, use %s::%s instead.', __CLASS__, __METHOD__, __CLASS__, 'executeRawEndpoint'); + + return $this->executeRawEndpoint($endpoint); + } + + return $endpoint->parseResponse($this->processEndpoint($endpoint), $this->serializer, $fetch); + } + + public function executeRawEndpoint(Endpoint $endpoint): ResponseInterface + { + return $this->processEndpoint($endpoint); + } + + private function processEndpoint(Endpoint $endpoint): ResponseInterface + { + [$bodyHeaders, $body] = $endpoint->getBody($this->serializer, $this->streamFactory); + $queryString = $endpoint->getQueryString(); + $uriGlue = false === mb_strpos($endpoint->getUri(), '?') ? '?' : '&'; + $uri = '' !== $queryString ? $endpoint->getUri().$uriGlue.$queryString : $endpoint->getUri(); + $request = $this->requestFactory->createRequest($endpoint->getMethod(), $uri); + if ($body) { + if ($body instanceof StreamInterface) { + $request = $request->withBody($body); + } elseif (is_resource($body)) { + $request = $request->withBody($this->streamFactory->createStreamFromResource($body)); + } elseif (mb_strlen($body) <= 4000 && @file_exists($body)) { + // more than 4096 chars will trigger an error + $request = $request->withBody($this->streamFactory->createStreamFromFile($body)); + } else { + $request = $request->withBody($this->streamFactory->createStream($body)); + } + } + foreach ($endpoint->getHeaders($bodyHeaders) as $name => $value) { + $request = $request->withHeader($name, $value); + } + if (count($endpoint->getAuthenticationScopes()) > 0) { + $scopes = []; + foreach ($endpoint->getAuthenticationScopes() as $scope) { + $scopes[] = $scope; + } + $request = $request->withHeader(AuthenticationRegistry::SCOPES_HEADER, $scopes); + } + + return $this->httpClient->sendRequest($request); + } +} diff --git a/src/Runtime/Client/CustomQueryResolver.php b/src/Runtime/Client/CustomQueryResolver.php new file mode 100644 index 0000000..1f8d177 --- /dev/null +++ b/src/Runtime/Client/CustomQueryResolver.php @@ -0,0 +1,10 @@ +hasHeader('Content-Type') ? current($response->getHeader('Content-Type')) : null; + + return $this->transformResponseBody((string) $response->getBody(), $response->getStatusCode(), $serializer, $contentType); + } +} diff --git a/src/Runtime/Normalizer/CheckArray.php b/src/Runtime/Normalizer/CheckArray.php new file mode 100644 index 0000000..12e7707 --- /dev/null +++ b/src/Runtime/Normalizer/CheckArray.php @@ -0,0 +1,13 @@ +getReferenceUri(); + + return $ref; + } + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null): bool + { + return $data instanceof Reference; + } +} diff --git a/src/Serializer/SerializerFactory.php b/src/Serializer/SerializerFactory.php deleted file mode 100644 index 9447286..0000000 --- a/src/Serializer/SerializerFactory.php +++ /dev/null @@ -1,17 +0,0 @@ -addMetadataDir(__DIR__.'/../../metadata/'); - - return $builder->build(); - } -} diff --git a/test/JikanPHPTest.php b/test/JikanPHPTest.php deleted file mode 100644 index d137b33..0000000 --- a/test/JikanPHPTest.php +++ /dev/null @@ -1,561 +0,0 @@ -jikan = new JikanPHPClient(); - } - - /** - * @test - * @vcr it_gets_anime.yaml - */ - public function it_gets_anime() - { - $request = new Request\Anime\AnimeRequest(1); - $anime = $this->jikan->getAnime($request); - self::assertInstanceOf(Model\Anime\Anime::class, $anime); - } - - /** - * @test - * @vcr it_gets_anime_episodes.yaml - */ - public function it_gets_anime_episodes() - { - $request = new Request\Anime\AnimeEpisodesRequest(1); - $episodes = $this->jikan->getAnimeEpisodes($request); - self::assertNotCount(0, $episodes->getEpisodes()); - self::assertContainsOnly(Model\Anime\EpisodeListItem::class, $episodes->getEpisodes()); - } - - /** - * @test - * @vcr it_gets_anime_videos.yaml - */ - public function it_gets_anime_videos() - { - $request = new Request\Anime\AnimeVideosRequest(1); - $videos = $this->jikan->getAnimeVideos($request); - self::assertNotCount(0, $videos->getPromos()); - self::assertContainsOnly(Model\Anime\PromoListItem::class, $videos->getPromos()); - } - - /** - * @test - * @vcr it_gets_manga.yaml - */ - public function it_gets_manga() - { - $request = new Request\Manga\MangaRequest(1); - $manga = $this->jikan->getManga($request); - self::assertInstanceOf(Model\Manga\Manga::class, $manga); - } - - /** - * @test - * @vcr it_gets_characters.yaml - */ - public function it_gets_characters() - { - $request = new Request\Character\CharacterRequest(1); - $response = $this->jikan->getCharacter($request); - self::assertInstanceOf(Model\Character\Character::class, $response); - } - - /** - * @test - * @vcr it_gets_persons.yaml - */ - public function it_gets_persons() - { - $request = new Request\Person\PersonRequest(1); - $response = $this->jikan->getPerson($request); - self::assertInstanceOf(Model\Person\Person::class, $response); - } - - /** - * @test - * @vcr it_gets_user_profile.yaml - */ - public function it_gets_user_profile() - { - $request = new Request\User\UserProfileRequest('sandshark'); - $response = $this->jikan->getUserProfile($request); - self::assertInstanceOf(Model\User\Profile::class, $response); - } - - /** - * @test - * @vcr it_gets_user_friends.yaml - */ - public function it_gets_user_friends() - { - $request = new Request\User\UserFriendsRequest('sandshark'); - $response = $this->jikan->getUserFriends($request); - self::assertNotCount(0, $response); - self::assertContainsOnly(Model\User\Friend::class, $response); - } - - /** - * @test - * @vcr it_gets_seasonal.yaml - */ - public function it_gets_seasonal() - { - $request = new Request\Seasonal\SeasonalRequest(2018, 'winter'); - $response = $this->jikan->getSeasonal($request); - self::assertInstanceOf(Model\Seasonal\Seasonal::class, $response); - self::assertContainsOnlyInstancesOf(Model\Seasonal\SeasonalAnime::class, $response->getAnime()); - } - - /** - * @test - * @vcr it_gets_producers.yaml - */ - public function it_gets_producers() - { - $request = new Request\Producer\ProducerRequest(1); - $response = $this->jikan->getProducer($request); - self::assertInstanceOf(Model\Producer\Producer::class, $response); - } - - /** - * @test - * @vcr it_gets_magazines.yaml - */ - public function it_gets_magazines() - { - $request = new Request\Magazine\MagazineRequest(1); - $response = $this->jikan->getMagazine($request); - self::assertInstanceOf(Model\Magazine\Magazine::class, $response); - } - - /** - * @test - * @vcr it_gets_anime_genres.yaml - */ - public function it_gets_anime_genres() - { - $request = new Request\Genre\AnimeGenreRequest(1); - $response = $this->jikan->getAnimeGenre($request); - self::assertInstanceOf(Model\Genre\AnimeGenre::class, $response); - } - - /** - * @test - * @vcr it_gets_manga_genres.yaml - */ - public function it_gets_manga_genres() - { - $request = new Request\Genre\MangaGenreRequest(1); - $response = $this->jikan->getMangaGenre($request); - self::assertInstanceOf(Model\Genre\MangaGenre::class, $response); - } - - /** - * @test - * @vcr it_gets_schedule.yaml - */ - public function it_gets_schedule() - { - $request = new Request\Schedule\ScheduleRequest(); - $response = $this->jikan->getSchedule($request); - self::assertInstanceOf(Model\Schedule\Schedule::class, $response); - } - - /** - * @test - * @vcr it_gets_anime_characters_and_staff.yaml - */ - public function it_gets_anime_characters_and_staff() - { - $request = new Request\Anime\AnimeCharactersAndStaffRequest(1); - $response = $this->jikan->getAnimeCharactersAndStaff($request); - self::assertInstanceOf(Model\Anime\AnimeCharactersAndStaff::class, $response); - } - - /** - * @test - * @vcr it_gets_anime_pictures.yaml - */ - public function it_gets_anime_pictures() - { - $request = new Request\Anime\AnimePicturesRequest(1); - $response = $this->jikan->getAnimePictures($request); - self::assertNotCount(0, $response); - self::assertContainsOnly(Model\Common\Picture::class, $response); - } - - /** - * @test - * @vcr it_gets_manga_pictures.yaml - */ - public function it_gets_manga_pictures() - { - $request = new Request\Manga\MangaPicturesRequest(1); - $response = $this->jikan->getMangaPictures($request); - self::assertNotCount(0, $response); - self::assertContainsOnly(Model\Common\Picture::class, $response); - } - - /** - * @test - * @vcr it_gets_character_pictures.yaml - */ - public function it_gets_character_pictures() - { - $request = new Request\Character\CharacterPicturesRequest(1); - $response = $this->jikan->getCharacterPictures($request); - self::assertNotCount(0, $response); - self::assertContainsOnly(Model\Common\Picture::class, $response); - } - - /** - * @test - * @vcr it_gets_person_pictures.yaml - */ - public function it_gets_person_pictures() - { - $request = new Request\Person\PersonPicturesRequest(1); - $response = $this->jikan->getPersonPictures($request); - self::assertNotCount(0, $response); - self::assertContainsOnly(Model\Common\Picture::class, $response); - } - - /** - * @test - * @vcr it_gets_anime_search.yaml - */ - public function it_gets_anime_search() - { - $request = new Request\Search\AnimeSearchRequest('Ghost In The Shell'); - $response = $this->jikan->getAnimeSearch($request); - self::assertInstanceOf(Model\Search\AnimeSearch::class, $response); - } - - /** - * @test - * @vcr it_gets_manga_search.yaml - */ - public function it_gets_manga_search() - { - $request = new Request\Search\MangaSearchRequest('One Piece'); - $response = $this->jikan->getMangaSearch($request); - self::assertInstanceOf(Model\Search\MangaSearch::class, $response); - } - - /** - * @test - * @vcr it_gets_character_search.yaml - */ - public function it_gets_character_search() - { - $request = new Request\Search\CharacterSearchRequest('Revy'); - $response = $this->jikan->getCharacterSearch($request); - self::assertInstanceOf(Model\Search\CharacterSearch::class, $response); - } - - /** - * @test - * @vcr it_gets_person_search.yaml - */ - public function it_gets_person_search() - { - $request = new Request\Search\PersonSearchRequest('shinkai'); - $response = $this->jikan->getPersonSearch($request); - self::assertInstanceOf(Model\Search\PersonSearch::class, $response); - } - - /** - * @test - * @vcr it_gets_manga_characters.yaml - */ - public function it_gets_manga_characters() - { - $request = new Request\Manga\MangaCharactersRequest(1); - $response = $this->jikan->getMangaCharacters($request); - self::assertContainsOnly(Model\Manga\CharacterListItem::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_top_anime.yaml - */ - public function it_gets_top_anime() - { - $request = new Request\Top\TopAnimeRequest(1, Constants::TOP_UPCOMING); - $response = $this->jikan->getTopAnime($request); - self::assertContainsOnly(Model\Top\TopAnime::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_top_manga.yaml - */ - public function it_gets_top_manga() - { - $request = new Request\Top\TopMangaRequest(1, Constants::TOP_MANGA); - $response = $this->jikan->getTopManga($request); - self::assertContainsOnly(Model\Top\TopManga::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_top_characters.yaml - */ - public function it_gets_top_characters() - { - $request = new Request\Top\TopCharactersRequest(1); - $response = $this->jikan->getTopCharacters($request); - self::assertContainsOnly(Model\Top\TopCharacter::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_top_people.yaml - */ - public function it_gets_top_people() - { - $request = new Request\Top\TopPeopleRequest(1); - $response = $this->jikan->getTopPeople($request); - self::assertContainsOnly(Model\Top\TopPerson::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_anime_stats.yaml - */ - public function it_gets_anime_stats() - { - $request = new Request\Anime\AnimeStatsRequest(1); - $response = $this->jikan->getAnimeStats($request); - self::assertInstanceOf(Model\Anime\AnimeStats::class, $response); - } - - /** - * @test - * @vcr it_gets_manga_stats.yaml - */ - public function it_gets_manga_stats() - { - $request = new Request\Manga\MangaStatsRequest(1); - $response = $this->jikan->getMangaStats($request); - self::assertInstanceOf(Model\Manga\MangaStats::class, $response); - } - - /** - * @test - * @vcr it_gets_anime_forum.yaml - */ - public function it_gets_anime_forum() - { - $request = new Request\Anime\AnimeForumRequest(1); - $response = $this->jikan->getAnimeForum($request); - self::assertContainsOnly(Model\Forum\ForumTopic::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_manga_forum.yaml - */ - public function it_gets_manga_forum() - { - $request = new Request\Manga\MangaForumRequest(1); - $response = $this->jikan->getMangaForum($request); - self::assertContainsOnly(Model\Forum\ForumTopic::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_more_anime_info.yaml - */ - public function it_gets_more_anime_info() - { - $request = new Request\Anime\AnimeMoreInfoRequest(1); - $response = $this->jikan->getAnimeMoreInfo($request); - self::assertContains('Suggested Order', $response); - self::assertContains('(takes place between episodes 22 and 23)', $response); - } - - /** - * @test - * @vcr it_gets_more_manga_info.yaml - */ - public function it_gets_more_manga_info() - { - $request = new Request\Manga\MangaMoreInfoRequest(2); - $response = $this->jikan->getMangaMoreInfo($request); - self::assertContains('Berserk: The Prototype', $response); - self::assertContains('on which the Berserk manga is based.', $response); - } - - /** - * @test - * @vcr it_gets_season_list.yaml - */ - public function it_gets_season_list() - { - $request = new Request\SeasonList\SeasonListRequest(); - $response = $this->jikan->getSeasonList($request); - self::assertContainsOnly(Model\SeasonList\SeasonListItem::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_user_history.yaml - */ - public function it_gets_user_history() - { - $request = new Request\User\UserHistoryRequest('sandshark', 'anime'); - $response = $this->jikan->getUserHistory($request); - self::assertContainsOnly(Model\User\History::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_user_anime_list.yaml - */ - public function it_gets_user_anime_list() - { - $request = new Request\User\UserAnimeListRequest('sandshark', 1); - $response = $this->jikan->getUserAnimeList($request); - self::assertContainsOnly(Model\User\AnimeListItem::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_user_manga_list.yaml - */ - public function it_gets_user_manga_list() - { - $request = new Request\User\UserMangaListRequest('sandshark', 1); - $response = $this->jikan->getUserMangaList($request); - self::assertContainsOnly(Model\User\MangaListItem::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_anime_recently_updated_by_users.yaml - */ - public function it_gets_anime_recently_updated_by_users() - { - $request = new Request\Anime\AnimeRecentlyUpdatedByUsersRequest(1); - $response = $this->jikan->getAnimeRecentlyUpdatedByUsers($request); - self::assertContainsOnly(Model\User\AnimeListItem::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_manga_recently_updated_by_users.yaml - */ - public function it_gets_manga_recently_updated_by_users() - { - $request = new Request\Manga\MangaRecentlyUpdatedByUsersRequest(1); - $response = $this->jikan->getMangaRecentlyUpdatedByUsers($request); - self::assertContainsOnly(Model\User\MangaListItem::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_anime_recommendations.yaml - */ - public function it_gets_anime_recommendations() - { - $request = new Request\Anime\AnimeRecommendationsRequest(1); - $response = $this->jikan->getAnimeRecommendations($request); - self::assertContainsOnly(Model\Common\Recommendation::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_manga_recommendations.yaml - */ - public function it_gets_manga_recommendations() - { - $request = new Request\Manga\MangaRecommendationsRequest(1); - $response = $this->jikan->getMangaRecommendations($request); - self::assertContainsOnly(Model\Common\Recommendation::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_club_users.yaml - */ - public function it_gets_club_users() - { - $request = new Request\Club\UserListRequest(21349); - $response = $this->jikan->getClubUsers($request); - self::assertContainsOnly(Model\Club\UserProfile::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_anime_reviews.yaml - */ - public function it_gets_anime_reviews() - { - $request = new Request\Anime\AnimeReviewsRequest(1); - $response = $this->jikan->getAnimeReviews($request); - self::assertContainsOnly(Model\Anime\AnimeReview::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_manga_reviews.yaml - */ - public function it_gets_manga_reviews() - { - $request = new Request\Manga\MangaReviewsRequest(1); - $response = $this->jikan->getMangaReviews($request); - self::assertContainsOnly(Model\Manga\MangaReview::class, $response); - self::assertNotCount(0, $response); - } - - /** - * @test - * @vcr it_gets_clubs.yaml - */ - public function it_gets_clubs() - { - $request = new Request\Club\ClubRequest(21349); - $response = $this->jikan->getClub($request); - self::assertInstanceOf(Model\Club\Club::class, $response); - } -} diff --git a/test/bootstrap.php b/test/bootstrap.php deleted file mode 100644 index 63f77ab..0000000 --- a/test/bootstrap.php +++ /dev/null @@ -1,9 +0,0 @@ -setCassettePath(__DIR__ .'/../vendor/jikan/jikanphp-fixtures') - ->enableLibraryHooks(['curl']) - ->enableRequestMatchers(['url', 'method', 'query_string']) -; -\VCR\VCR::turnOn(); diff --git a/tests/ClientTest.php b/tests/ClientTest.php new file mode 100644 index 0000000..eb3ddcd --- /dev/null +++ b/tests/ClientTest.php @@ -0,0 +1,17 @@ +getAnimeById(5114); + self::assertEquals('Fullmetal Alchemist: Brotherhood', $anime->getData()->getTitle()); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..35a4740 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,2 @@ +