PHP code example of chartblocks / php-rest-sdk

1. Go to this page and download the library: Download chartblocks/php-rest-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

chartblocks / php-rest-sdk example snippets



$client = new \ChartBlocks\Client(array(
  'token' => 'PASTE_TOKEN',
  'secret' => 'PASTE_SECRET'
  ));
  
$dataSets = $client->getRepository('dataSet');
$myDataSet = $dataSets->findById('52f139ea054ff30f1f000004');

$myDataSet->append(array(
  new \ChartBlocks\DataSet\Row(null, array('a', 'b', 'c')),
  new \ChartBlocks\DataSet\Row(null, array('d', 'e', 'f'))
));