1. Go to this page and download the library: Download larowka/kudago-api 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/ */
larowka / kudago-api example snippets
use Larowka\KudaGo\Api;
$kudago = new Api();
$events = $kudago->events();
// Sorting
$events->orderBy('id', '-publication_date') // Order by id ASC and by publication_date DESC
->get();
// Details
$events->expand('images', 'dates') // Get detailed information of images and dates in result
->get();
// Filter by time
$events->before('2022', '!Y') // Get results between 2021-10-12 and 2022 year
->after('2021-10-12', 'Y-m-d')
->get();
// Filter by coordinates
$events->inRadius(59.9, 30.3, 10000) // Include only events in radius 10000 meters around point [latitude, longitude]
->get();
// Paginator
$events->page(3) // Page number
->pageSize(35) // Items on page
->get();
// Concrete object
$events->find(161043); // find by event ID
$kudago->search()
->query('art') // Query string
->type('event') // Include only specific type: news, event, place, list
->expand('place', 'dates')
->get();