PHP code example of lonnylot / clarityboard-php-sdk

1. Go to this page and download the library: Download lonnylot/clarityboard-php-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/ */

    

lonnylot / clarityboard-php-sdk example snippets


\Clarityboard\Client::setApiKey('enter-your-api-key');

$response = \Clarityboard\Dashboard::retrieve(['dashboardId' => 'd290f1ee-6c54-4b01-90e6-d701748f0851']);

$response = \Clarityboard\Dashboard::all();

\Clarityboard\Dashboard::create(['name' => 'My New Dashboard']);

$response = \Clarityboard\Dashboard::retrieve(['dashboardId' => 'd290f1ee-6c54-4b01-90e6-d701748f0851']);

\Clarityboard\Dashboard::create([
  'group' => 'Sales',
  'data' => [
    "name" => "Shoe Laces",
    "sale" => 4.99,
    "cost" => 0.99
  ]
]);

$response = \Clarityboard\RecordGroup::all();

$response = RecordGroup::update(['group' => 'Sales', 'data' => ['Purchase Date' => '2018-09-17T18:24:00']]);

$response = Record::create([
  'group' => 'Sales', 'data' => [
    "name" => "Shoe Laces",
    "sale" => 4.99,
    "cost" => 0.99
  ]
]);