Provides access to the DigiTickets API.

1.0.2 2021-08-18 22:40 UTC

This package is auto-updated.

Last update: 2021-10-18 23:05:32 UTC


Provides access to the DigiTickets API. At present this is a fairly basic HTTP client. Eventually this will be fleshed out and have methods for all the endpoints available in the API along with the possible parameters.


composer require digitickets/digitickets-php-api-client



require __DIR__.'/vendor/autoload.php';

use DigiTicketsApiClient\ApiClient;

$apiClient = new ApiClient();

$response = $apiClient->get('branches'); // Returns a PSR ResponseInterface.

// You can get an array of data from the response object with this method:
$branches = $apiClient->parseResponse($response);

// Returns:
// Array
// (
//     [0] => Array
//         (
//             [branchID] => 11
//             [name] => DigiTickets Demo Branch


To run tests:

phpunit tests

Some of these tests require an API Key to access the API. You can also specify a different API to make requests to when testing. Both of these go into a .env file in the root of this repository. Make a copy of .env.example to see what this file should contain.

cp .env.example .env

Note: Don't use the API key of a live company (or a test company you care about) for these tests, as the tests will create and delete data.