PHP code example of timitek / getrets

1. Go to this page and download the library: Download timitek/getrets 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/ */

    

timitek / getrets example snippets



use Timitek\GetRETS\GetRETS;
$getRets = new GetRETS($customerKey);
$listings = $getRets->getListing()->searchByKeyword($preparedKeywords);

(new GetRETS($customerKey))->getListing();

(new GetRETS($customerKey))->getListing()->searchByKeyword($preparedKeywords);

(new GetRETS($customerKey))->getListing()->search($keywords, $extra, $maxPrice, $minPrice, $beds, $baths, $

(new GetRETS($customerKey))->getListing()->details($listingSource, $listingType, $listingId);

(new GetRETS($customerKey))->getListing()->imageUrl($listingSource, $listingType, $listingId, $photoId, $width = null, $height = null);

(new GetRETS($customerKey))->getRETSListing();

(new GetRETS($customerKey))->getRETSListing()->searchByKeyword($preparedKeywords);

(new GetRETS($customerKey))->getRETSListing()->search($keywords, $extra, $maxPrice, $minPrice, $beds, $baths, $

(new GetRETS($customerKey))->getRETSListing()->details($listingSource, $listingType, $listingId);

(new GetRETS($customerKey))->getRETSListing()->imageUrl($listingSource, $listingType, $listingId, $photoId, $width = null, $height = null);

(new GetRETS($customerKey))->getRETSListing()->executeDMQL($query, $feedName, $listingType);

(new GetRETS($customerKey))->getRETSListing()->getListingsByDMQL($query, $feedName, $listingType);

(new GetRETS($customerKey))->getGeocoding();

(new GetRETS($customerKey))->getGeocoding()->parseGoogleResults($googleResults);

(new GetRETS($customerKey))->getGeocoding()->googleGeocode($address);

(new GetRETS($customerKey))->getListing()->setLimit(10)->searchByKeyword($preparedKeywords);

(new GetRETS($customerKey))->getListing()->setSortBy("providedBy")->setReverseSort(true)->searchByKeyword($preparedKeywords);

private $sortBy = "rawListPrice";

private $reverseSort = false;

$listings = $getRets->getListing()->setSortBy("providedBy")->setReverseSort(true)->searchByKeyword($preparedKeywords);