Official PHP based SDK for the Nitrapi RESTful API.
- PHP 5.5 or higher
- Composer
Edit the composer.json and execute composer.phar update
{
"require": {
"nitrado/nitrapi-php-lib": "dev-master",
}
}
<?php
require_once '../vendor/autoload.php';
try {
$api = new \Nitrapi\Nitrapi("<accesss token>");
var_dump($api->getServices());
} catch(\Exception $e) {
var_dump("API Error: " . $e->getMessage());
}