PHPackages                             drinkynet/codelocks-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. drinkynet/codelocks-api

ActiveLibrary[API Development](/categories/api)

drinkynet/codelocks-api
=======================

Basic wrapper for the Codelocks Netcode API

7.0.3(4y ago)3472MITPHPPHP &gt;=5.4CI failing

Since Apr 11Pushed 4y ago3 watchersCompare

[ Source](https://github.com/drinkynet/codelocks-api)[ Packagist](https://packagist.org/packages/drinkynet/codelocks-api)[ Docs](https://github.com/drinkynet/codelocks-api/)[ RSS](/packages/drinkynet-codelocks-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (14)Used By (0)

Codelocks API Wrapper
=====================

[](#codelocks-api-wrapper)

Lightweight PHP wrapper for the [Codelocks Connect API](https://www.codelocksconnect.net/api-documentation).

This wrapper update is aimed at being backwards compatible with the previous version making it a drop-in replacement to connect to the new API with no breaking changes to method calls or structure.

Installing
----------

[](#installing)

Install via composer:

```
composer require drinkynet/codelocks-api

```

Examples
--------

[](#examples)

Create an instance of the Codelocks class with your API key and default Access Key

```
$codelocks = new \drinkynet\Codelocks\Codelocks($key, $accessKey);

$netcode = $codelocks->netcode();
```

Get a netcode for lock `0000000000000000000000000000001a` that is valid now:

```
$netcode->lock('0000000000000000000000000000001a')->get();
```

Get a netcode for lock `0000000000000000000000000000001a` that is valid for a specific time and date:

```
$code = $netcode->lock('0000000000000000000000000000001a')
    ->date(new \DateTime('2016-09-23'))
    ->hour(9)
    ->duration(1)
    ->get();
```

**Note:** You can get the lock ID for each lock from the lock list returned by the `->lock()` method call

Get an initialisation sequence for a lock model:

```
$codelocks = new \drinkynet\Codelocks\Codelocks($key, $accessKey);

// Init sequence data with default master code
$init = $codelocks->init()
    ->lockModel('K3CONNECT')
    ->get();

// Init sequence data with custom master code
$init = $codelocks->init()
    ->lockModel('K3CONNECT')
    ->masterCode('12345678')
    ->get();
```

Get a list of locks associated with the API credentials:

```
$codelocks = new \drinkynet\Codelocks\Codelocks($key, $accessKey);

// Uses the accessKey set earlier
$locks = $codelocks->lock()->get();

// Use a different accessKey associated with the API key
$locks $codelocks->lock('abcde12345')->get();
```

Previous versions
-----------------

[](#previous-versions)

If you are using the "Codelocks Customer API" install the 6.0.1 version of this wrapper via composer.

**Note:** API versions prior to this are nolonger available online.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 95.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~171 days

Recently: every ~14 days

Total

13

Last Release

1675d ago

Major Versions

1.0.1 → 2.0.02016-05-31

2.0.1 → 5.0.02018-07-18

5.0.1 → 6.0.12020-01-22

6.0.1 → 7.0.02021-10-05

PHP version history (2 changes)1.0.0PHP &gt;=5.3

1.0.1PHP &gt;=5.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6780886?v=4)[drinkynet](/maintainers/drinkynet)[@drinkynet](https://github.com/drinkynet)

---

Top Contributors

[![drinkynet](https://avatars.githubusercontent.com/u/6780886?v=4)](https://github.com/drinkynet "drinkynet (43 commits)")[![Guntrisoft](https://avatars.githubusercontent.com/u/6049076?v=4)](https://github.com/Guntrisoft "Guntrisoft (1 commits)")[![KarlAustin](https://avatars.githubusercontent.com/u/5338970?v=4)](https://github.com/KarlAustin "KarlAustin (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/drinkynet-codelocks-api/health.svg)

```
[![Health](https://phpackages.com/badges/drinkynet-codelocks-api/health.svg)](https://phpackages.com/packages/drinkynet-codelocks-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
