PHPackages                             alexkratky/apix - 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. alexkratky/apix

ActiveLibrary[API Development](/categories/api)

alexkratky/apix
===============

Class to work with API rate limits.

v1.0.0(6y ago)011MITPHPPHP &gt;=7.0

Since Sep 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/AlexKratky/APIX)[ Packagist](https://packagist.org/packages/alexkratky/apix)[ Docs](https://panx.eu/)[ RSS](/packages/alexkratky-apix/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (5)Used By (0)

APIX
====

[](#apix)

Class to work with API rate limits.

### Installation

[](#installation)

`composer require alexkratky/apix`

### Usage

[](#usage)

```
require 'vendor/autoload.php';
use AlexKratky\API;
use AlexKratky\Cache;

Cache::setDirectory(__DIR__ . '/cache/');

$API_Endpoint = new API('v1');
if(!$API_Endpoint->request(new URL())) {
    echo $API_Endpoint->error();
    exit();
}

//valid API request. Continue with code.
```

### Information

[](#information)

API class is class to work with API request. On created [API endpoint](https://panx.eu/docs/api-endpoints) creates API interface, which will handle all requests. To response to the request, the request must contain valid API key (One from `api_keys` table). The valid means, that the key must exists and must have not reached the rate limits. If the corresponding route have template file(s), it will be required, but if have function, the function will be executed, and if the function return something, the result will outputed as beautify json string (The result will be encoded using json\_encode) and also it will save he response as cache file. This cache file name is combination of API key and URL.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~120 days

Total

3

Last Release

2193d ago

Major Versions

v0.2.0 → v1.0.02020-05-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/b26914cbd1aae790e4de261206944ef146af64f8f9fc8b4484c0697dfa333d05?d=identicon)[AlexKratky](/maintainers/AlexKratky)

---

Top Contributors

[![AlexKratky](https://avatars.githubusercontent.com/u/33813757?v=4)](https://github.com/AlexKratky "AlexKratky (3 commits)")

---

Tags

phpapiRateendpointlimits

### Embed Badge

![Health badge](/badges/alexkratky-apix/health.svg)

```
[![Health](https://phpackages.com/badges/alexkratky-apix/health.svg)](https://phpackages.com/packages/alexkratky-apix)
```

###  Alternatives

[reindert-vetter/api-version-control

A Laravel package to manage versions of endpoints in an elegant way

1671.0M](/packages/reindert-vetter-api-version-control)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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