devilcius / eventful-api
PHP API client for EventFul webservices
v0.4
2016-10-11 11:53 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- php: >=5.3.3
- phpunit/phpunit: ~4.8
- vlucas/phpdotenv: *
This package is not auto-updated.
Last update: 2024-11-23 20:04:37 UTC
README
Php EventFul Api Client
A PHP client library for the EventFul API
Installation
composer require devilcius/eventful-api
Quick Start
The main entry point of the library is the EventFul\EventFulApiClient
class. Once you have
an EventFulApiClient instance, you can easily access all the API services and call their
methods. Any use of the Eventful API requires a valid, current application key. You can obtain one here
Let's try to find an event using the search
method of the Event
service:
<?php // 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; }
Tests
phpunit