/**
  * Retrieve all charts for given secret key
  */
 static function charts($data)
 {
     $test = new ApiTest('charts', 200, 'array');
     $client = new SeatsioApiClient($data['secretKey']);
     try {
         //execute API call
         $test->responseData = $client->charts();
     } 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;
 }
示例#2
0
<?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->charts();
//print response data
echo '<pre>' . print_r($data, true) . '</pre>';