Add DTOs, exceptions, and jobs for translation service.
Introduced new Data Transfer Objects (DTOs), exceptions, and jobs to enhance the translation service functionality. Updated namespaces for consistency and added rate limiting to the translation provider. Expanded the README with detailed usage instructions.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace korElf\TranslateLaravel\Translate\Yandex;
|
||||
namespace KorElf\TranslateLaravel\Translate\Yandex;
|
||||
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
@@ -10,15 +10,15 @@ use Jose\Component\KeyManagement\JWKFactory;
|
||||
use Jose\Component\Signature\Algorithm\PS256;
|
||||
use Jose\Component\Signature\JWSBuilder;
|
||||
use Jose\Component\Signature\Serializer\CompactSerializer;
|
||||
use korElf\TranslateLaravel\Exceptions\TranslateException;
|
||||
use KorElf\TranslateLaravel\Exceptions\TranslateException;
|
||||
|
||||
final class Connection
|
||||
{
|
||||
private readonly string $path;
|
||||
private readonly string $folderId;
|
||||
private readonly string $privateKey;
|
||||
private readonly string $keyId;
|
||||
private readonly string $serviceAccountId;
|
||||
private string $path;
|
||||
private string $folderId;
|
||||
private string $privateKey;
|
||||
private string $keyId;
|
||||
private string $serviceAccountId;
|
||||
|
||||
public function __construct(string $path, string $folderId, string $privateKey, string $keyId, string $serviceAccountId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user