PHP SDK
PHP SDK
Den offisielle PHP SDK-en for Laddro Career API.
Installasjon
composer require laddro/career-sdkHurtigstart
use Laddro\Career\LaddroClient;
$client = new LaddroClient(apiKey: $_ENV['LADDRO_API_KEY']);
$templates = $client->templates()->list();
$resume = $client->resumes()->parse('/path/to/resume.pdf');
$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; }Feilhåndtering
use Laddro\Career\Exceptions\LaddroException;
try { $client->resumes()->get('nonexistent'); }
catch (LaddroException $e) { echo $e->getStatus(); echo $e->getMessage(); }