feat: ajout de la gestion des sources de contenu avec des commandes et des gestionnaires pour l'importation, la mise à jour et l'exportation, ainsi que la création des ressources API correspondantes.
This commit is contained in:
parent
ebcca466a9
commit
32b4e4fbb2
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Setting\Infrastructure\ApiPlatform\Resource;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use App\Domain\Setting\Infrastructure\ApiPlatform\State\Provider\GetContentSourceStateProvider;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[ApiResource(
|
||||
shortName: 'ContentSource',
|
||||
operations: [
|
||||
new Get(
|
||||
uriTemplate: '/content-sources/{id}',
|
||||
provider: GetContentSourceStateProvider::class,
|
||||
description: 'Récupère une source de contenu par son identifiant'
|
||||
)
|
||||
]
|
||||
)]
|
||||
class GetContentSourceResource
|
||||
{
|
||||
public function __construct(
|
||||
#[Assert\NotBlank]
|
||||
#[Assert\Type('integer')]
|
||||
public readonly int $id,
|
||||
public readonly string $baseUrl,
|
||||
public readonly string $chapterUrlFormat,
|
||||
public readonly string $scrapingType,
|
||||
public readonly ?string $imageSelector,
|
||||
public readonly ?string $nextPageSelector,
|
||||
public readonly ?string $chapterSelector,
|
||||
public readonly string $cleanBaseUrl,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user