Updates - Adds group to the link element in the API and the PHP-SDK (release v1.1.22)
API
request:
/rest/v1/objekt/detail?id=1234567&culture=de
/rest/v1/projekt/detail?id=1234567&culture=de
There is a new element <gruppe>
inside the <link>
element.
<links>
<link>
<titel>Youtube video</titel>
<pfad>http://www.youtube.com/watch?v=123456789</pfad>
<gruppe>filmlink</gruppe>
</link>
<link>
<titel>3D tour - cupix</titel>
<pfad>https://players.cupix.com/p/123456789</pfad>
<gruppe>rundgang</gruppe>
</link>
<link>
<titel>Digital expose</titel>
<pfad>https://www.yumpu.com/de/embed/view/p123456789</pfad>
<gruppe>links</gruppe>
</link>
</links>
PHP-SDK v1.1.22
- Acquiring the links of a realty
$api = new JustimmoApi('xxxxxxxxx', 'xxxxxxxxxxxx');
$api->setBaseUrl('http://api.justimmo.at/rest');
$api->setCulture('de');
$mapper = new RealtyMapper();
$wrapper = new RealtyWrapper($mapper);
$query = new RealtyQuery($api, $wrapper, $mapper);
$realty = $query
->findPk(1234567);
/** @var \Justimmo\Model\Attachment $link */
foreach ($realty->getLinks() as $link) {
var_dump($link);
}
/** @var \Justimmo\Model\Attachment $attachment */
foreach ($realty->getAttachments() as $attachment) {
if ($attachment->getType() === 'link') {
var_dump($attachment);
}
}
- Acquiring the links of a residential project
$api = new JustimmoApi('xxxxxxxxx', 'xxxxxxxxxxxx');
$api->setBaseUrl('http://api.justimmo.at/rest');
$api->setCulture('de');
$mapper = new ProjectMapper();
$wrapper = new ProjectWrapper($mapper);
$query = new ProjectQuery($api, $wrapper, $mapper);
$project = $query
->findPk(1234567);
/** @var \Justimmo\Model\Attachment $link */
foreach ($project->getLinks() as $link) {
var_dump($link);
}
/** @var \Justimmo\Model\Attachment $attachment */
foreach ($project->getAttachments() as $attachment) {
if ($attachment->getType() === 'link') {
var_dump($attachment);
}
}