1. Go to this page and download the library: Download seatsio/seatsio-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
seatsio / seatsio-php example snippets
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
...
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$chart = $seatsio->charts->create();
$event = $seatsio->events->create($chart->key);
echo 'Created event with key ' . $event->key;
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$seatsio->events->book(<AN EVENT KEY>, ["A-1", "A-2"]);
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$seatsio->events->book(<AN EVENT KEY>, ["A-1", "A-2"], <A HOLD TOKEN>);
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$seatsio->events->book(<AN EVENT KEY>, ["GA1", "GA1", "GA1"]);
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$seatsio->events->book(<AN EVENT KEY>, [["objectId" => "GA1", "quantity" => 3]]);
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$seatsio->events->release(<AN EVENT KEY>, ["A-1", "A-2"]);
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$seatsio->events->changeObjectStatus(<AN EVENT KEY>, ["A-1", "A-2"], "unavailable");
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$objectInfos = $seatsio->events->retrieveObjectInfos($event->key, ["A-1", "A-2"]);
print_r($objectInfos["A-1"]->categoryKey)
print_r($objectInfos["A-1"]->categoryLabel)
print_r($objectInfos["A-1"]->status)
print_r($objectInfos["A-2"]->categoryKey)
print_r($objectInfos["A-2"]->categoryLabel)
print_r($objectInfos["A-2"]->status)
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$seatsio->eventReports->byStatus(<AN EVENT KEY>, <OPTIONAL FILTER>);
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>);
$charts = $seatsio->charts->listAll();
foreach($charts as $chart) {
echo 'Chart ' . $chart->key;
}
// ... user initially opens the screen ...
$firstPage = $seatsio->charts->listFirstPage();
foreach($firstPage->items as $chart) {
echo 'Chart ' . $chart->key;
}
// ... user clicks on 'next page' button ...
$nextPage = $seatsio->charts->listPageAfter($firstPage->nextPageStartsAfter);
foreach($nextPage->items as $chart) {
echo 'Chart ' . $chart->key;
}
// ... user clicks on 'previous page' button ...
$previousPage = $seatsio->charts->listPageBefore($nextPage->previousPageEndsBefore);
foreach($page->items as $chart) {
echo 'Chart ' . $chart->key;
}
use Seatsio\Region;
use Seatsio\SeatsioClient;
// company admin key can be found on https://app.seats.io/company-settings
$seatsio = new SeatsioClient(Region::EU(), <COMPANY ADMIN KEY>);
$seatsio->workspaces->create("a workspace");
use Seatsio\Region;
use Seatsio\SeatsioClient;
// company admin key can be found on https://app.seats.io/company-settings
// workspace public key can be found on https://app.seats.io/workspace-settings
$seatsio = new SeatsioClient(Region::EU(), <COMPANY ADMIN KEY>, <WORKSPACE PUBLIC KEY>);
$chart = $seatsio->charts->create();
$event = $seatsio->events->create($chart->key);
echo 'Created event with key ' . $event->key;
use Seatsio\Region;
use Seatsio\SeatsioClient;
$seatsio = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>, null, 3);