jcbl / booliwrapper
A lightweight API wrapper for the Booli API written in PHP.
1.0.1
2017-10-01 09:20 UTC
Requires
- php: >=5.6
- guzzlehttp/guzzle: ^6.3
- vlucas/phpdotenv: ^2.4
Requires (Dev)
- larapack/dd: 1.*
- phpunit/phpunit: 4.*
- squizlabs/php_codesniffer: ^2.2 || ^3.0.2
- symfony/var-dumper: ^3.3
- wimg/php-compatibility: *
This package is not auto-updated.
Last update: 2025-03-30 08:01:49 UTC
README
A lightweight API wrapper for the Booli API written in PHP.
Installing
composer require jcbl/booliwrapper
Basic usage
Initialize a new instance of the Booli wrapper class. Provide your key and caller id. I prefer to do it with .env.
require_once __DIR__ . '/vendor/autoload.php';
use Jcbl\Booliwrapper\Booli;
use Dotenv\Dotenv;
$dotenv = new Dotenv(__DIR__);
$dotenv->load();
$booli = new Booli(getenv('CALLER_ID'), getenv('API_KEY'));
After that you can make listing calls like this.
$listingAll = $booli->listing()->all([
'q' => 'stockholm',
'limit' => 3,
'filters' => [
'maxListPrice' => 2000000
]
]);
$listingSingle = $booli->listing()->single(BOOLI_ID);
echo $listingAll;
echo $listingSingle;
To apply filters, pass filters as a second argument as an associative array. The get method accesses the response property, returning a json response.
Available methods
Endpoint | Method name |
---|---|
listings | listing()->all() |
listings | listing()->single() |
sold | sold()->all() |
sold | sold()->single() |
area | area()->get() |