PHP code example of urieldavid / desafio_xlr8_php

1. Go to this page and download the library: Download urieldavid/desafio_xlr8_php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

urieldavid / desafio_xlr8_php example snippets


use XLR8\Exception\XLR8Exception;
use XLR8\Search;

NearbyHotels(41.157944, -8.629105, "pricepernight");
} catch (XLR8Exception $e) {
    echo $e->getMessage();
}

use XLR8\Exception\XLR8Exception;
use XLR8\Search;

  'limit' => 15,
        'responseJson' => false | true,
        'selectSource' => null | 'source_1' | 'any other endpoint in config.json'
    ];
    $search = new Search();
    $search->getNearbyHotels(41.157944, -8.629105, "pricepernight", $options);
} catch (XLR8Exception $e) {
    echo $e->getMessage();
}

        $options = [
            'page' => 1,
            'limit' => 15,
            'responseJson' => false | true,
            'selectSource' => null | 'source_1' | 'any other endpoint in config.json'
        ];
    
shell
composer