PHPackages                             eugenefvdm/api-collection - 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. eugenefvdm/api-collection

Abandoned → [eugenefvdm/api-framework](/?search=eugenefvdm%2Fapi-framework)Library[API Development](/categories/api)

eugenefvdm/api-collection
=========================

APIs for various services

v0.12(1y ago)122[3 issues](https://github.com/eugenefvdm/api-collection/issues)MITPHPPHP ^8.1CI passing

Since Mar 21Pushed 1mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (9)Versions (13)Used By (0)

API Framework
=============

[](#api-framework)

[![Tests](https://github.com/eugenefvdm/api-framework/actions/workflows/tests.yml/badge.svg)](https://github.com/eugenefvdm/api-framework/actions/workflows/tests.yml)[![Larastan](https://github.com/eugenefvdm/api-framework/actions/workflows/larastan.yml/badge.svg)](https://github.com/eugenefvdm/api-framework/actions/workflows/larastan.yml)[![Downloads](https://camo.githubusercontent.com/dbba248fe83b373e172e4d1ce0cfb7a14ceff92530d4a0b026d9b3b190f746e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f657567656e656676646d2f6170692d6672616d65776f726b2e737667)](https://packagist.org/packages/eugenefvdm/api-framework)

Another day, another API.

A set of Laravel API service providers.

1. BulkSMS
2. Discord
3. DNS
4. Fail2ban
5. Hello Peter
6. Slack
7. Tail
8. Telegram
9. WHM/cPanel
10. WHMCS
11. X (Twitter)
12. ZADomains

Installation
------------

[](#installation)

```
composer require eugenefvdm/api-framework
```

Publish the configuration file
------------------------------

[](#publish-the-configuration-file)

```
php artisan vendor:publish --provider="Eugenefvdm\Api\ApiServiceProvider" --tag="config"
```

Contents of `config/api.php`
----------------------------

[](#contents-of-configapiphp)

```
return [
    'bulk_sms' => [
        'username' => env('BULK_SMS_USERNAME'),
        'password' => env('BULK_SMS_PASSWORD'),
    ],

    'discord' => [
        'bot_token' => env('DISCORD_BOT_TOKEN'),
    ],

    'hello_peter' => [
        'api_key' => env('HELLO_PETER_API_KEY'),
    ],

    'slack' => [
        'webhook_url' => env('SLACK_WEBHOOK_URL'),
    ],

    'telegram' => [
        'bot_token' => env('TELEGRAM_BOT_TOKEN'),
        'chat_id' => env('TELEGRAM_CHAT_ID'),
    ],

    'whm' => [
        'username' => env('WHM_USERNAME'),
        'password' => env('WHM_PASSWORD'),
        'server' => env('WHM_SERVER', 'https://server.example.com:2087'),
    ],

    'whmcs' => [
        'url' => env('WHMCS_URL'),
        'api_identifier' => env('WHMCS_API_IDENTIFIER'),
        'api_secret' => env('WHMCS_API_SECRET'),
    ],

    'x' => [
        'bearer_token' => env('X_BEARER_TOKEN'),
    ],

    'za_domains' => [
        'username' => env('ZA_DOMAINS_USERNAME'),
        'password' => env('ZA_DOMAINS_PASSWORD'),
    ],
];
```

Usage
-----

[](#usage)

Precede access by the facade namespace, e.g.

```
use Eugenefvdm\Api\Facades\Bulksms;
Bulksms::sendSms("Hello SMS!", ["27600000000"]);
```

Here is a list of all the API calls:

```
Bulksms::sendSms("Hello SMS!", ["27600000001","2760000000"]);

$discordUser = Discord::user("123456789012345678");

$nsRecords = Dns::NS("example.com");

$digMxRecords = Dns::MX("example.com"); // Use `dig` to get MX records
$nativeMxRecords = Dns::MX("example.com", false); // Use PHP native to get MX recorss

Fail2ban:setServer("username", "hostname", 22); // Port is optional
$firstEntry = Fail2ban::first("192.168.1.1");
$lastEntry = Fail2ban::last("192.168.1.1");

$unrepliedReviews = Hellopeter::unrepliedReviews();

Slack::sendText("Hello Slack!");

Tail::setServer("username", "hostname", 22);
$logEntry = Tail::last("/var/log/mail.log", "user@example.com", 1); // 1 = optional number of log entries to return

Telegram::sendMessage("Hi Telegram!");

$bandwidth = Whm::bandwidth();
Whm::disableEmail('cPanel_username','user@example.com');
Whm::enableEmail('cPanel_username','user@example.com');
$whitelist = Whm::cphulkWhitelist();
$blacklist = Whm::cphulkBlacklist();
Whm::createEmail('cpanel_username','user@example.com','password');
$password = Whm::generatePassword(); // Generate a random 12 character password

Whmcs::addClient([]); // See `addClient()` in `Whmcs.php` for required parameters
// Laravel model wrappers:
Whmcs::createClientGroup($name, $colour = '#ffffff');
Whmcs::createCustomClientField($name, $type = 'text');

$userId = X::userId("x_username");
$tweets = X::tweets($userId['data']['id'], 5);
$userWithLimits = X::userWithRateLimits("x_username");

$registrant = Zadomains::registrant("example.co.za");
```

Testing
-------

[](#testing)

```
vendor/bin/pest
```

Design philosophy
-----------------

[](#design-philosophy)

APIs can be hard. Reading documentation is a drag. And what if you only want to use a few calls? Do you really have to learn everything? This framework gives you the power of many APIs in one package. It's minimalist and uses Laravel's facades for easy access. Each call is tested using stubs which doubles as a handy reference.

Contribution Guidelines
-----------------------

[](#contribution-guidelines)

New contributions are super welcome!

1. Fork the repository
2. Create a new branch for your changes (`git checkout -b feature/amazing-api`)
3. Make your changes
4. Run the tests (`./vendor/bin/pest`)
5. Run Larastan (`./vendor/bin/phpstan analyse`)
6. Submit a pull request

When adding a new API, it has to be added to both ApiServiceProvider, ApiManager and a Facade.

### Code Style &amp; Standards

[](#code-style--standards)

- Pint is installed, so simply run `vendor/bin/pint` to make your code clean
- For new APIs and API calls:
    - Add feature tests with stubs (see existing examples)
    - Ensure stubs are redacted of sensitive information
    - Follow the existing naming conventions:
        - Capitalize only the first letter of API's name, e.g., `Bulksms`, `Zadomains`
        - For compound names, also don't capatalize, e.g., `Hellopeter`
        - Getters should not be prepended by "get", e.g. use `message()` instead of `getMessage()`
        - Setters should be prepended by "set", e.g. `setServer()`
    - All API responses should follow this format:

```
// Success response
[
    "status" => "success",
    "output" => $output,
]
// Error response
[
    "status" => "error",
    "output" => "Error message here",
]
```

### Need Help?

[](#need-help)

If you have an idea for a new API or API call but don't have time to implement it, feel free to open a new issue to see if we can do an implementation.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance50

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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 ~0 days

Total

12

Last Release

417d ago

PHP version history (2 changes)v0.1PHP &gt;=7.4

v0.2PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/932743c076390240ecdefe58dc5f81b60cb5fe9ed38b3bead0541f640a7bb2a8?d=identicon)[eugenevdm](/maintainers/eugenevdm)

---

Top Contributors

[![eugenefvdm](https://avatars.githubusercontent.com/u/1836436?v=4)](https://github.com/eugenefvdm "eugenefvdm (82 commits)")

---

Tags

phpapilaravelslacktailtelegramdiscordapisbulksmsfail2banhellopeterzadomains

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/eugenefvdm-api-collection/health.svg)

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

###  Alternatives

[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[dystcz/lunar-api

Dystore API layer for Lunar e-commerce package

411.1k3](/packages/dystcz-lunar-api)[gufy/whmcs

WHMCS API for Laravel 5

201.7k](/packages/gufy-whmcs)

PHPackages © 2026

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