Lightweight PHP wrapper for the Codelocks Netcode API version 3.
Install via composer:
composer require drinkynet/codelocks-api
Create an instance of the Codelocks class with your API key and pairing ID
$codelocks = new \drinkynet\Codelocks\Codelocks($key, $pid);
$netcode = $codelocks->netcode();
Get a netcode for lock N000001
that is valid now:
$netcode->lock('N000001')->get();
Get a netcode for lock N000000
that is valid in the future:
$code = $netcode->lock('N000000')
->date(new \DateTime('2016-09-23'))
->hour(9)
->duration(1)
->get();