PHP code example of devilcius / eventful-api

1. Go to this page and download the library: Download devilcius/eventful-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/ */

    

devilcius / eventful-api example snippets




// options:
$apiKey = 'secretAppKey'; // mandatory
$endPoint = 'http://api.evdb.com'; // optional
$timeout = 10; // optional
$userAgent = 'EventFul PHP Client'; // optional
$apiClient = new EventFulApiClient($apiKey, $endPoint, $timeout, $userAgent);

$service = $apiClient->getEventService();
$params['page_number'] = 1;
$params['page_size'] = 10;
$params['category'] = 'music';
$params['location'] = 'Madrid';
$result = $service->search($params);
foreach ($result->events->event as $event) {
    echo $event->title;
}