<?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->changeStatus(Config::$eventKey, 'reserved', array(array('objectId' => Config::$generalAdmissionArea, 'quantity' => '64'))); //print response data echo '<pre>' . print_r($data, true) . '</pre>';
/** * Change booking status of general admission area * For more info see seats.io API docs */ static function changeStatusGeneralAdmission($data) { $test = new ApiTest('changeStatusGeneralAdmission', 200, 'NULL'); $client = new SeatsioApiClient($data['secretKey']); try { //execute API call $test->responseData = $client->changeStatus($data['eventKey'], $data['status'], $data['objects']); } 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; }
<?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->changeStatus(Config::$eventKey, 'reserved', array('a-2', 'c-7')); //print response data echo '<pre>' . print_r($data, true) . '</pre>';