dev-master
9999999-devAPI client for the Das Keyboard Q
MIT
The Requires
The Development Requires
by Tim Lytle
API client for the Das Keyboard Q
Currently work in progress. See example for usage., (*2)
composer require tjlytle/qclient
$token = 'oauth 2 token'; $client = new \QClient\Client($token);
Currently the client provides access to collections by providing iterable objects. The items are simple containers for the API response providing array access to the data:, (*3)
foreach($client->device_descriptions as $description){ echo $description['name']; } foreach($client->devices as $device): foreach($client->signals as $signal):
To create a signal, use the collection and the method, as well as a Signal
object:, (*4)
$signal = new Signal(); $signal->setName('Sent from PHP Client'); $signal->setPid('DK5QPID'); $signal->setZone('KEY_A'); $signal->setColor('#008000'); $client->signals->post($signal);
To update, use the patch method:, (*5)
$client->signals->patch($signal);
API client for the Das Keyboard Q
MIT