etix-simple/etix-php

PHP SDK for Etix API

1.0.1 2018-01-19 19:39 UTC

This package is not auto-updated.

Last update: 2024-06-09 04:06:28 UTC


README

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