1. Go to this page and download the library: Download zimmobe/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/ */
zimmobe / 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 GuzzleHttpClient;
use GuzzleHttp\Psr7\HttpFactory;
use MaxImmo\ExternalParties\Client;
use MaxImmo\ExternalParties\JsonResponseEvaluator;
use MaxImmo\ExternalParties\MiepClient;
$apiClient = new Client(
new GuzzleHttpClient(['base_uri' => 'https://ep.max-immo.be']),
new HttpFactory(),
new JsonResponseEvaluator()
);
$miepClient = new MiepClient('client_id', 'client_secret', $apiClient);