Ask Your Question

Revision history [back]

I did the same but I am not able to understand the schema of object or maybe I am misunderstanding.

I am able to get the data from 'Property ' resource for all classes but not getting their images.

Now I am trying to get the data from 'Media' resource for all corresponding L_ListingID's but this implementation is jerk: GetObject("Property", "Photo", "12345", "*", 1); foreach ($photos as $photo) { $listing = $photo['Content-ID']; $number = $photo['Object-ID'];

    if ($photo['Success'] == true) {
            echo "{$listing}'s #{$number} photo is at {$photo['Location']}\n";
    }
    else {
            echo "({$listing}-{$number}): {$photo['ReplyCode']} = {$photo['ReplyText']}\n";
    }

}

I have changed it to: $firstID = $results->first()->get('L_ListingID'); // I WILL USE BELOW CODE INSIDE FOREACH LOOP WITH INDIVIDUAL L_ListingID.

echo $firstID; $photos = $rets->GetObject("Property", "Photo", $firstID,"*","1");

foreach ($photos as $photo) { $listing = $photo->getContentId(); $number = $photo->getObjectId();

    if ($photo['Success'] == true) {                  // NOW I AM GETTING ERROR HERE $photo['success'] is undefined.
            echo "{$listing}'s #{$number} photo is at {$photo->getLocation()}\n";
    }
    else {
            echo "({$listing}-{$number}): {$photo['ReplyCode']} = {$photo['ReplyText']}\n";
    }

}

But I am not getting how to replace $photo['Success]. Really It's easy but not too much. Wasting lot of time in R&D as well as replacement of older parameters and functionalities.