<commit_before># Booli API wrapper
A lightweight API wrapper for the Booli API written in PHP.

## Basic usage
Initialize a new instance of the Booli wrapper class.

    $booli = new Booli();
    $booli->setApiKey('<KEY>');
    $booli->setCallerId('<NAME>');

After that you can make listing calls like this.

    $filters = [
	    'maxListPrice' => 4000000,
    ];
    
    $test = $booli->getListing('Stockholm', $filters)->withImages();
    echo json_encode($test->response);

To apply filters, pass in filters as a second argument as an associative array.

## Available methods

| Endpoint      | Method name          | Verb  |
|---------------|----------------------|-------|
| listings      | getListing           | GET   |
| listing:id    | getSingleListing     | GET   |
| images        | (chained) withImages | GET   |

    Example made by <NAME> (lilja.io)
    You can find the repository for this project at https://github.com/jlilja/Booli-php-wrapper<commit_msg>update example and endpoint listing<commit_after># Booli API wrapper
A lightweight API wrapper for the Booli API written in PHP.

## Basic usage
Initialize a new instance of the Booli wrapper class. Provide your key and caller id. I'd prefer to do it with .env!

    $dotenv = new Dotenv(__DIR__);
    $dotenv->load();

    $booli = new Booli();
    $booli->setApiKey(getenv('API_KEY'));
    $booli->setCallerId(getenv('CALLER_ID'));

After that you can make listing calls like this.

    $filters = [
	    'maxListPrice' => 4000000,
    ];
    
    $test = $booli->getListing('Stockholm', $filters)->withImages();
    echo json_encode($test->response);

To apply filters, pass in filters as a second argument as an associative array.

## Available methods

| Endpoint      | Method name          | Verb  |
|---------------|----------------------|-------|
| listings      | getListing           | GET   |
| listing:id    | getSingleListing     | GET   |
| latest        | getLatest *          | GET   |
| images        | (chained) withImages | GET   |

* Not currently available with the withImages chained method.

    Example made by <NAME> (lilja.io)
    You can find the repository for this project at https://github.com/jlilja/Booli-php-wrapper
{'fraction_non_alphanumeric': 0.1448493027440396, 'fraction_numerical': 0.006297795771479982, 'mean_word_length': 2.49685534591195, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 20, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4374597', 'n_tokens_mistral': 681, 'n_tokens_neox': 638, 'n_words': 217}