PHP SDK
PHP SDK
El SDK oficial de PHP para la Laddro Career API.
Instalacion
composer require laddro/career-sdkInicio rapido
use Laddro\Career\LaddroClient;
$client = new LaddroClient(apiKey: $_ENV['LADDRO_API_KEY']);
// Listar plantillas
$templates = $client->templates()->list();
// Analizar un curriculo
$resume = $client->resumes()->parse('/path/to/resume.pdf');
// Personalizar para un empleo
$result = $client->tailor(
resumeId: $resume->id,
positionName: 'Senior Engineer',
jobDescription: 'We are looking for...'
);Streaming
$stream = $client->tailor(
resumeId: 'res_abc123',
positionName: 'Senior Engineer',
jobDescription: '...',
stream: true
);
foreach ($stream as $event) {
echo $event->section . ': ' . $event->content . PHP_EOL;
}Manejo de errores
use Laddro\Career\Exceptions\LaddroException;
try {
$client->resumes()->get('nonexistent');
} catch (LaddroException $e) {
echo $e->getStatus(); // 404
echo $e->getMessage(); // "Resume not found"
}