mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
- anime schedules - validation and corrections - refactorings around "augmentResponse" - macro usage instead
65 lines
1.8 KiB
PHP
65 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\V4DB;
|
|
|
|
use App\Dto\QueryAnimeRecommendationsCommand;
|
|
use App\Dto\QueryMangaRecommendationsCommand;
|
|
|
|
class RecommendationsController extends Controller
|
|
{
|
|
|
|
/**
|
|
* @OA\Get(
|
|
* path="/recommendations/anime",
|
|
* operationId="getRecentAnimeRecommendations",
|
|
* tags={"recommendations"},
|
|
*
|
|
* @OA\Parameter(ref="#/components/parameters/page"),
|
|
*
|
|
* @OA\Response(
|
|
* response="200",
|
|
* description="Returns recent anime recommendations",
|
|
* @OA\JsonContent(
|
|
* ref="#/components/schemas/recommendations"
|
|
* )
|
|
* ),
|
|
* @OA\Response(
|
|
* response="400",
|
|
* description="Error: Bad request. When required parameters were not supplied.",
|
|
* ),
|
|
* ),
|
|
*
|
|
*/
|
|
public function anime(QueryAnimeRecommendationsCommand $command)
|
|
{
|
|
return $this->mediator->send($command);
|
|
}
|
|
|
|
/**
|
|
* @OA\Get(
|
|
* path="/recommendations/manga",
|
|
* operationId="getRecentMangaRecommendations",
|
|
* tags={"recommendations"},
|
|
*
|
|
* @OA\Parameter(ref="#/components/parameters/page"),
|
|
*
|
|
* @OA\Response(
|
|
* response="200",
|
|
* description="Returns recent manga recommendations",
|
|
* @OA\JsonContent(
|
|
* ref="#/components/schemas/recommendations"
|
|
* )
|
|
* ),
|
|
* @OA\Response(
|
|
* response="400",
|
|
* description="Error: Bad request. When required parameters were not supplied.",
|
|
* ),
|
|
* ),
|
|
*
|
|
*/
|
|
public function manga(QueryMangaRecommendationsCommand $command)
|
|
{
|
|
return $this->mediator->send($command);
|
|
}
|
|
}
|