2017 © Pedro PelĂĄez
 

library seatsio-php

A PHP client for the seats.io API

image

assisjeferson/seatsio-php

A PHP client for the seats.io API

  • Monday, May 28, 2018
  • by assisjeferson
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

seatsio-php, the official Seats.io PHP client library

Build Status Latest Stable Version, (*1)

This is the official PHP client library for the Seats.io V2 REST API., (*2)

Installing seatsio-php

The recommended way to install seatsio-php is through Composer., (*3)

composer require seatsio/seatsio-php

The minimum required PHP version is 5.5., (*4)

Versioning

seatsio-php only uses major version numbers: v5, v6, v7 etc. Each release - backwards compatible or not - receives a new major version number., (*5)

The reason: we want to play safe and assume that each release might break backwards compatibility., (*6)

Examples

Creating a chart and an event

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>); // can be found on https://app.seats.io/settings
$chart = $seatsio->charts->create();
$event = $seatsio->events->create($chart->key);
echo 'Created event with key ' . $event->key;

Booking objects

Changes the object status to ‘booked’. Booked seats are not selectable on a rendered chart., (*7)

https://www.seats.io/docs/api-v2#core-resources-objects-book-objects, (*8)

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>);
$seatsio->events->book(<AN EVENT KEY>, ["A-1", "A-2"]);

Booking objects that have been held

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>);
$seatsio->events->book(<AN EVENT KEY>, ["A-1", "A-2"], <A HOLD TOKEN>);

Booking general admission areas

Either, (*9)

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>);
$seatsio->events->book(<AN EVENT KEY>, ["GA1", "GA1", "GA1"]);

Or, (*10)

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>);
$seatsio->events->book(<AN EVENT KEY>, ["objectId" => "GA1", "quantity" => 3]);

Releasing objects

Changes the object status to ‘free’. Free seats are selectable on a rendered chart., (*11)

https://www.seats.io/docs/api-v2#core-resources-objects-release-objects, (*12)

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>);
$seatsio->events->release(<AN EVENT KEY>, ["A-1", "A-2"]);

Changing object status

Changes the object status to a custom status of your choice. If you need more statuses than just booked and free, you can use this to change the status of a seat, table or booth to your own custom status., (*13)

https://www.seats.io/docs/api-v2#core-resources-objects-change-object-status, (*14)

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>);
$seatsio->events->changeObjectStatus(<AN EVENT KEY>, ["A-1", "A-2"], "unavailable");

Event reports

Want to know which seats of an event are booked, and which ones are free? That’s where reporting comes in handy., (*15)

The report types you can choose from are: - byStatus - byCategoryLabel - byCategoryKey - byLabel - byOrderId, (*16)

https://www.seats.io/docs/api-v2#core-resources-event-reports, (*17)

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>);
$seatsio->eventReports->byStatus(<AN EVENT KEY>, <OPTIONAL FILTER>);

Listing charts

$seatsio = new \Seatsio\SeatsioClient(<SECRET KEY>);

$chart1 = $seatsio->charts->create();
$chart2 = $seatsio->charts->create();
$chart3 = $seatsio->charts->create();

$charts = $seatsio->charts->listAll();
foreach($charts as $chart) {
    echo 'Chart ' . $chart->key;
}

Error handling

When an API call results in a 4xx or 5xx error (e.g. when a chart could not be found), a SeatsioException is thrown., (*18)

This exception contains a message string describing what went wrong, and also two other properties:, (*19)

  • messages: an array of error messages that the server returned. In most cases, this array will contain only one element.
  • requestId: the identifier of the request you made. Please mention this to us when you have questions, as it will make debugging easier.

The Versions

28/05 2018

dev-master

9999999-dev

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

28/05 2018

v12

12.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

08/05 2018

v11

11.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

08/05 2018

v10

10.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

29/03 2018

v9

9.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

09/02 2018

v8

8.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

08/02 2018

v7

7.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

19/01 2018

v6

6.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

26/12 2017

v5

5.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

26/12 2017

v4.0.0

4.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

22/12 2017

3.0.0

3.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

22/12 2017

2

2.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires

22/12 2017

1

1.0.0.0

A PHP client for the seats.io API

  Sources   Download

MIT

The Requires

 

The Development Requires