Skip to content

etix-simple/etix-php

Repository files navigation

Etix PHP SDK

Build Status Latest Stable Version Total Downloads License

This library uses the REST API, documentation is found at api.etix.com.

Install

composer require etix-simple/etix-php

Authenticate

<?php
    
use Etix\Etix;
    
$etix = new Etix();

// Ask your Etix service representative for the key type code
define('ETIX_EVENTBOOKING_KEY_TYPE', 'KTEXAMPLE8AC7B18D1DAEEE4DDDDDDD5E0732F40E3EEA1533333333017C6DE32A6');

// $apiKey = $etix->login($username, $password)->getApiKey();
$etix->loginWithApiKey($apiKey);
    

Venues

<?php

$venueCount = $etix->getVenueCount();
$venues = $etix->getVenues(['pageNum' => 1, 'pageSize' => 20]);
$venue = $etix->getVenue($venueId);

Events

<?php

$eventCount = $etix->getEventCount(['venueId' => $venueId]);
$events = $etix->getEvents(['venueId' => $venueId, 'pageNum' => 1, 'pageSize' => 20]);
$event = $etix->getEvents($eventId);
$eventDataSnapshot = $etix->getEventDataSnapshot($eventId);
$eventTicketsDetails = $etix->getEventTicketsDetails($eventId, [
    'lastTimeISO8601'   =>  '2017-10-01T05:48:03Z',
]);

Artists

<?php

$artistCount = $etix->getArtistCount();
$artists = $etix->getArtists(['pageNum' => 1, 'pageSize' => 20]);
$artist = $etix->getArtist($artistId);

Categories

<?php

$categoryCount = $etix->getCategoryCount();
$categories = $etix->getCategories(['pageNum' => 1, 'pageSize' => 20]);
$category = $etix->getCategory($categoryId);

Validate

<?php

$result = $etix->validateTicket($serial);
$stats = $etix->getValidationStatistics($eventId);

Timestamp

<?php

$dateTime = $etix->getTimestamp();

Development

# TESTS
phpunit --bootstrap vendor/autoload.php tests/EtixTest.php

# START LOCAL DOCKER
docker-compose build && docker-compose up --force-recreate

# Documentation
phpDocumentor -d ./src -t docs