PHPackages                             alapi/php-sdk - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. alapi/php-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

alapi/php-sdk
=============

This is ALAPI PHP-SDK

1.0.2(5y ago)16[2 issues](https://github.com/ALAPI-SDK/PHP-SDK/issues)MITPHPPHP &gt;=7.2

Since Jun 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ALAPI-SDK/PHP-SDK)[ Packagist](https://packagist.org/packages/alapi/php-sdk)[ Docs](https://www.alapi.cn)[ RSS](/packages/alapi-php-sdk/feed)WikiDiscussions main Synced 3w ago

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

ALAPI-SDK
---------

[](#alapi-sdk)

这是 ALAPI 的 PHP SDK

环境要求
----

[](#环境要求)

- PHP &gt;= 7.2
- ext-json
- ext-curl

安装
--

[](#安装)

```
composer require alapi/php-sdk

```

使用
--

[](#使用)

```
# 初始化客户端
use ALAPI\Client;

$client = new Client('你的token');

# 开始请求
$result = $client->setApi('/api/url')
       ->setParam('url','https://www.alapi.cn') # 设置请求参数，设置多个参数可以调用多次这个方法
       ->setParam('type','tcn') #
       ->throw() # 如果返回 code 不等于 200 则抛异常，不调用这个方法则不会抛异常
       ->request();  # 请求

var_dump($result);
var_dump($result->getData()); # 获取请求数据
```

```
# 添加文件上传
use ALAPI\Client;

$client = new Client('你的token');

# 开始请求
$result = $client->setApi('/api/image')
       ->setParam('image','文件路径',true) # 第二个参数是文件路径，第三个参数是否为文件
       ->setParam('type','alapi') #
       ->throw() # 如果返回 code 不等于 200 则抛异常，不调用这个方法则不会抛异常
       ->request();  # 请求

var_dump($result);
var_dump($result->getData()); # 获取请求数据
```

接口文档地址
------

[](#接口文档地址)

ALAPI 接口文档地址：

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

3

Last Release

1837d ago

PHP version history (2 changes)1.0.0PHP ^7.2

1.0.2PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/22a45c91e7343a20031eb47d6f02fcb59a5a0d5f37936124242cff4730ca5af5?d=identicon)[Alone88](/maintainers/Alone88)

---

Top Contributors

[![anhao](https://avatars.githubusercontent.com/u/9844218?v=4)](https://github.com/anhao "anhao (14 commits)")

---

Tags

httpapiphp-sdkalapialapi-sdk

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/alapi-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/alapi-php-sdk/health.svg)](https://phpackages.com/packages/alapi-php-sdk)
```

###  Alternatives

[quickbooks/v3-php-sdk

The Official PHP SDK for QuickBooks Online Accounting API

28210.6M33](/packages/quickbooks-v3-php-sdk)[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.7M18](/packages/xeroapi-xero-php-oauth2)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34216.9k2](/packages/onesignal-onesignal-php-api)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[meteocontrol/vcom-api-client

HTTP Client for meteocontrol's VCOM API - The VCOM API enables you to directly access your data on the meteocontrol platform.

188.0k1](/packages/meteocontrol-vcom-api-client)

PHPackages © 2026

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