PHP library for interacting with the Ninja Blocks platform.
For the time being only Device has been implemented. If you would like to use other non-implemented API features there is a generic MakeRequest function to use make the calls.
- Include/Require nbapi.php into your PHP script
- Instantiate a Device object with your access token
$deviceAPI = new DeviceAPI("YOUR ACCESS TOKEN");
- Use the implemented methods
$deviceAPI->getDevices();
$deviceAPI->actuate();
$deviceAPI->subscribe();
$deviceAPI->unsubscribe();
$deviceAPI->data();
$deviceAPI->lastHeartbeat();