etix-simple/etix-php

Etix API 的 PHP SDK

1.0.1 2018-01-19 19:39 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:41:50 UTC


README

Build Status Latest Stable Version Total Downloads License

这个库使用 REST API,文档位于 api.etix.com

安装

composer require etix-simple/etix-php

认证

<?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);
    

场馆

<?php

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

活动

<?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',
]);

艺术家

<?php

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

类别

<?php

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

验证

<?php

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

时间戳

<?php

$dateTime = $etix->getTimestamp();

开发

# 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