Download the PHP package hirvi/ticketco-php without Composer
On this page you can find all versions of the php package hirvi/ticketco-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hirvi/ticketco-php
More information about hirvi/ticketco-php
Files in hirvi/ticketco-php
Package ticketco-php
Short Description Simple API wrapper for TicketCo.no
License MIT
Homepage https://hirvi.no/
Informations about the package ticketco-php
TicketCo API - PHP Client 
- Installation
- Laravel Users
- Service Provider
- Facade
- Configuration
- Usage
- Initialize
- Get all events
- Get single event
- Get event status
- Collection object
- Further documentation
Installation
Add the following to your composer.json
Laravel Users
We've added some classes to help Laravel 5 users make use of the library with ease.
Service Provider
You can register our service provider in your app.php
config file.
Facade
If you prefer facades, make sure you add this as well:
Configuration
There are only one configuration option you need to fill in. Publish the config by running:
php artisan vendor:publish
Now, the config file will be located under config/ticketco.php
:
Usage
Initialize
Unless you are using the Laravel Facade, you need to initialize the client by passing it the API-key.
Fetch all events
Get single event
Get event status
Check whether the event is available or has ended.
Collection object
Queries will return an instance of the Illuminate\Support\Collection object, which is really easy to work with. If you don't want to use the Collection object however, you can transform it into an array using $result->toArray()
.
Further documentation
TicketCo's API documentation is located here; http://apidoc.ticketco.no/api/v1/public.