2017 © Pedro Peláez
 

library karotz

PHP library for the Karotz REST API

image

karotz/karotz

PHP library for the Karotz REST API

  • Wednesday, January 4, 2012
  • by devster
  • Repository
  • 1 Watchers
  • 5 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

KarotzPhp - PHP library for the Karotz REST API

Installation

Old school

Download the latest version of KarotzPhp and add the Karotz namespace to your PSR-0 autoloading system, or simply require the autoload.php, (*1)

Composer

{
    "require": {
        "karotz/karotz": ">=1.0.0-alpha"
    }
}

Usage

use Karotz\Karotz;

$kz = new Karotz('Interactive ID');

try {
    // Make flash your Karotz LED in red
    $response = $kz->ledPulse('FF0000', 500, 500);

    // Test the response
    if ($response->getStatus())
        echo "Rabbit flashs red light!";
    else
        echo $response->getCode().": ".$response->getDescription();

} catch(\Exception $e) {
    echo $e->getMessage();
}

Get the Interactive ID

To run, the Karotz REST API needs an Interactive ID, which is reset every 15 minutes. Check the official documentation to know how retrieve this ID. http://dev.karotz.com/api/interactiveid.html KarotzPhp is not involved in managing the life cycle of the Interactive ID, but provides a way to get it with the signed START method:, (*2)

use Karotz\Karotz;

$kz = new Karotz();

// Open a session and save the Interactive ID in the Karotz object
$response = $kz->start('install ID', 'API key', 'secret key');

Features

Work in progress... waiting for some test, (*3)

About

Requirements

  • Any flavor of PHP 5.3 should do

Author

License

KarotzPhp is licensed under the MIT License - see the LICENSE file for details, (*4)

The Versions

04/01 2012

dev-master

9999999-dev http://github.com/devster/KarotzPhp

PHP library for the Karotz REST API

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Thierry Geindre

api rest nabaztag karotz

04/01 2012

dev-transport_curl

dev-transport_curl http://github.com/devster/KarotzPhp

PHP library for the Karotz REST API

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Thierry Geindre

api rest nabaztag karotz

04/01 2012

1.0.1-alpha

1.0.1.0-alpha http://github.com/devster/KarotzPhp

PHP library for the Karotz REST API

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Thierry Geindre

api rest nabaztag karotz