Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is the Clarityboard SDK for PHP. Please refer to our API Docs for more information.

Requirements

PHP 5.4.0 and later.

Composer

You can install the bindings via Composer. Run the following command:

composer require lonnylot/clarityboard-php-sdk

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Dependencies

The library requires the GuzzleHTTP library.

Getting Started

Before using the SDK endpoints you must set your API key:

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

Here is an example of making the call synchronously:

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

Dashboards

List

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

Create

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

Retrieve

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

Records

Create

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

Record Group

List

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

Create/Update

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

Record

Create

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

About

Clarityboard SDK for PHP

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages