PHP code example of epse / miep-php-api-client

1. Go to this page and download the library: Download epse/miep-php-api-client 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/ */

    

epse / miep-php-api-client example snippets

 
use MaxImmo\ExternalParties\MiepClient;
use MaxImmo\ExternalParties\Client;
use MaxImmo\ExternalParties\JsonResponseEvaluator;
use Http\Client\HttpClient;
use Http\Message\MessageFactory;

$httpClient = new HttpClient(); // Implementation of Interface
$messageFactory =  new MessageFactory(); // Implementation of Interface
$responseEvaluator = new JsonResponseEvaluator();
$apiClient = new Client($httpClient, $messageFactory, $responseEvaluator);
$miepClient = new MiepClient('client_id', 'client_secret', $apiClient);

use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle6\Client as HttpClient;
use Http\Message\MessageFactory\GuzzleMessageFactory as MessageFactory;
use MaxImmo\ExternalParties\Client;
use MaxImmo\ExternalParties\JsonResponseEvaluator;
use MaxImmo\ExternalParties\MiepClient;

$httpClient = new HttpClient(new GuzzleClient(['base_uri' => 'https://ep.max-immo.be']));
$messageFactory = new MessageFactory();
$responseEvaluator = new JsonResponseEvaluator();
$apiClient = new Client($httpClient, $messageFactory, $responseEvaluator);
$miepClient = new MiepClient('client_id', 'client_secret', $apiClient);

$miepClient->getBrokers();

$miepClient->getInformationForBroker('brokerId');

$miepClient->getRealEstateListForBroker('brokerId');

$miepClient->getPropertyForBroker('brokerId', 'propertyId');

$miepClient->getProjectForBroker('brokerId', 'projectId');
bash
$ composer