jikan-rest/app/Http/Controllers/V4DB/RecommendationsController.php
pushrbx 49ebc8f581 wip - mediator refactor
- anime schedules - validation and corrections
- refactorings around "augmentResponse" - macro usage instead
2023-05-21 11:14:34 +01:00

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);
}
}