Attachments

Attachments have multiple properties

On every model object (Realty, Employee, Project) you can fetch it’s attachment with following methods

<?php
$realty->getPictures();
$realty->getVideos();
$realty->getDocuments();

//you can add a parameter to the methods to filter by different groups

//gets all pictures regardless of the group
$realty->getPictures();

//gets all pictures without a group
$realty->getPictures(null);

//gets all pictures of the group TITELBILD
$realty->getPictures('TITELBILD');

//gets all pictures of the group bilder360
$realty->getPictures('bilder360');

// ...

File Urls

A list of available attachment sizes can be found here.

<?php
//gets an url to an attachment size, but only if the api returned that size
$attachment->getUrl('big');

//gets an url to an attachment size, even if the api does not return that size. BEWARE: this method cannot ensure that the url is a valid ressource
$attachment->calculateUrl('big');