PHP code example of arnaudleroy-studio / coffeetrove
1. Go to this page and download the library: Download arnaudleroy-studio/coffeetrove 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/ */
arnaudleroy-studio / coffeetrove example snippets
use CoffeeTrove\Client;
$client = new Client();
// Find cafes near a coordinate pair
$cafes = $client->searchCafes(
latitude: 48.8566,
longitude: 2.3522,
radiusKm: 2,
limit: 10,
);
foreach ($cafes as $cafe) {
echo "{$cafe['name']} — score: {$cafe['score']}/100\n";
}