Skip to content

Guntrisoft/codelocks-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codelocks API

Lightweight PHP wrapper for the Codelocks Netcode API version 3.

Installing

Install via composer:

composer require drinkynet/codelocks-api

Examples

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();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%