1. Go to this page and download the library: Download trexima/issz-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
trexima / issz-client example snippets
rexima\Issz\Service\ISSZService;
use Trexima\Issz\Client\ISSZClient;
$isszClient = new ISSZClient(
__DIR__ . '/var/cert.pem',
__DIR__ . '/var/key.pem',
'passphrase');
use Ramsey\Uuid\Uuid;
$uuid = Uuid::uuid4();
// fill mandatory information
$offer = new \Trexima\Issz\Model\JobOffer();
$offer->setSKISCO08('5120000');
$offer->setBaseSalary(880.25);
$offer->setEmploymentRelationship('501601');
$offer->setExternalID('41561dsa56156');
$offer->setJobCategory('524802');
$offer->setJobDescription('Nejaky test popis');
$offer->setJobPositionCount(2);
$offer->setLegalID('31364381');
$offer->setPositionName('Nazov pracovnej pozicie');
$offer->setUrl('nejaka url');
$workingLoad = new \Trexima\Issz\Model\JobOffer\WorkingLoad();
$workingLoad->setWorkingWeekHours(1000);
$offer->setWorkingLoad($workingLoad);
$offers = [];
$offers[] = $offer;
$isszService = new ISSZService($isszClient);
$errors = $isszService->getValidator()->validate($offers);
if (count($errors) > 0) {
throw new \Symfony\Component\Validator\Exception\ValidationFailedException($offers, $errors);
}
try {
$response = $isszService->postBatch('https://apitest.mpsvr.gov.sk/api/sz/pracovne-ponuky/import/', $uuid, $offers);
echo $response->getStatusCode();
} catch (\GuzzleHttp\Exception\ClientException $e) {
echo $e->getResponse()->getBody();
}