Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jlilja/booli-php-wrapper
A lightweight API wrapper for the Booli API written in PHP.
https://github.com/jlilja/booli-php-wrapper
api booli php wrapper
Last synced: 13 days ago
JSON representation
A lightweight API wrapper for the Booli API written in PHP.
- Host: GitHub
- URL: https://github.com/jlilja/booli-php-wrapper
- Owner: jlilja
- License: mit
- Created: 2017-07-19T19:21:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-21T21:19:21.000Z (about 7 years ago)
- Last Synced: 2024-10-11T02:28:08.299Z (about 1 month ago)
- Topics: api, booli, php, wrapper
- Language: PHP
- Homepage: https://lilja.io
- Size: 40 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Booli API wrapper
A lightweight API wrapper for the Booli API written in PHP.[![Build Status](https://travis-ci.org/jlilja/Booli-php-wrapper.svg?branch=master)](https://travis-ci.org/jlilja/Booli-php-wrapper)
## 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() |