Access more than 5 000 000 short term rentals using Likibu API
The recommended way to install is through Composer :
Install composer
curl -sS https://getcomposer.org/installer | php
Add Likibu Client as dependency
php composer.phar require likibu/client @dev
After installing, you need to require Composer's autoloader:
require 'vendor/autoloader.php'
Copy LikibuClient.phar to your project's directory.
Then you just have to require it:
require 'path/to/LikibuClient.phar'
PHP >= 5.5, cURL, Guzzle 6
You will also need an API key. Contact us on Likibu to get an access.
Get all the offers in Paris
<?php
require 'vendor/autoloader.php'
$client = new \Likibu\Client('API_KEY');
$offers = $client->search(array(
'where' => 'Paris',
'culture' => 'en',
'currency' => 'EUR',
));
// do something with the results
foreach ($offers['results'] as $result) {
$id = $result['id'];
$title = $result['title'];
}
Get an offer's details
<?php
require 'vendor/autoloader.php'
$client = new \Likibu\Client('API_KEY');
$offer = $client->getOffer('azerty123', array(
'culture' => 'en',
'currency' => 'EUR',
));