Git Product home page Git Product logo

miep-public-api's Introduction

MIEP Public API Client

Build Status

Installation

Get your preferred HTTP Client implementation

install the latest version with

$ composer require zimmobe/miep-php-api-client

Usage

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);

More info: PHP-HTTP

Guzzle example

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);

Get list of available Brokers

$miepClient->getBrokers();

Get information for given Broker

$miepClient->getInformationForBroker('brokerId');

Note: Broker ID is the sub-domain of the broker's MaxImmo URL. This Broker ID will be provided in the list of available brokers discussed earlier.

Get Real Estate for Broker

$miepClient->getRealEstateListForBroker('brokerId');

Note: Broker ID is the sub-domain of the broker's MaxImmo URL. This Broker ID will be provided in the list of available brokers discussed earlier.

Get property for Broker

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

Note:

  • brokerId is the sub-domain of the broker's MaxImmo URL. This Broker ID will be provided in the list of available brokers discussed earlier.
  • propertyId is the Max-immo property id. This Property ID will be provided in the list of available Real Estate discussed earlier.

Get project for broker

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

Note:

  • brokerId is the sub-domain of the broker's MaxImmo URL. This Broker ID will be provided in the list of available brokers discussed earlier.
  • projectId is the Max-immo property id. This Project ID will be provided in the list of available Real Estate discussed earlier.

Versioning

This library will follow the classic semver versioning. The master branch will always follow the latest release.

Changes on the core of this library and added features, will be merged back to previous versions on a best effort basis.

License

The MIT License (MIT). Please see License File for more information.

miep-public-api's People

Contributors

koenraadm avatar mathieuzimmo avatar brpauwels avatar stefanbraspenning avatar

Stargazers

Ian Droogmans avatar Matthias De Vriendt avatar

Watchers

Christophe Debruel avatar James Cloos avatar Mathieu Maes avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.