Open lillorme opened 6 years ago
The third parameter to GetObject should be the Property Key Field, usually the one with a SystemName of ListingID
. You should be able to use something like this:
$results = $rets->Search($resource, $class, $query, $params);
foreach ($results as $r) {
printf("ListingID: %s\n", $r->get('ListingID'));
$photos = $rets->GetObject('Property', 'Photo', $r->get('ListingID'), '*', 1);
foreach ($photos as $p) {
printf("Photo %s: %s\n", $p->getObjectId(), $p->getLocation());
}
}
@quinncomendant The above code is not working.
@parteek-sdm You might need to customize the key names, they'll be different for each RETS API.
Try retsmd.com – Use it to log in to your MLS to get a LIVE data dictionary and schema, which you need to know to communicate with the API correctly.
@troydavisson I'm new to PHRETS and I would like to know how would I get the content_id to place in the action below
$photos = $rets->GetObject("Property", "Photo", "$content_ids", "*", 1);