PHP Likibu API Client
Access more than 5 000 000 short term rentals using Likibu API, (*1)
Installing via Composer (Recommended)
The recommended way to install is through Composer :, (*2)
Install composer, (*3)
curl -sS https://getcomposer.org/installer | php
Add Likibu Client as dependency, (*4)
php composer.phar require likibu/client @dev
After installing, you need to require Composer's autoloader:, (*5)
require 'vendor/autoloader.php'
Using the PHAR archive
Copy LikibuClient.phar to your project's directory., (*6)
Then you just have to require it:, (*7)
require 'path/to/LikibuClient.phar'
Requirements
PHP >= 5.5, cURL, Guzzle 6, (*8)
You will also need an API key. Contact us on Likibu to get an access., (*9)
Exemples
Get all the offers in Paris, (*10)
<?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, (*11)
<?php
require 'vendor/autoloader.php'
$client = new \Likibu\Client('API_KEY');
$offer = $client->getOffer('azerty123', array(
'culture' => 'en',
'currency' => 'EUR',
));