<?php require '../vendor/autoload.php'; require '../src/SeatsioApiClient.php'; require '../config.php'; //instantiate API client $client = new SeatsioApiClient(Config::$secretKey); //execute API request $data = $client->orders(Config::$eventKey, Config::$orderId); //print response data echo '<pre>' . print_r($data, true) . '</pre>';
/** * Retrieve all objects for event and order key */ static function orders($data) { $test = new ApiTest('orders', 200, 'array'); $client = new SeatsioApiClient($data['secretKey']); try { //execute API call $test->responseData = $client->orders($data['eventKey'], $data['orderId']); } catch (Exception $e) { $test->error = true; $test->errorData = $e->getMessage(); } $test->request = $client->request; $test->code = $client->response->code; $test->type = gettype($test->responseData); return $test; }