PHPackages                             aliyunapi/guzzle-subscriber - 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. aliyunapi/guzzle-subscriber

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

aliyunapi/guzzle-subscriber
===========================

aliyunsdk

1.0.3(7y ago)76.8k15MITPHPPHP &gt;=5.5.0

Since Mar 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aliyunapi/guzzle-subscriber)[ Packagist](https://packagist.org/packages/aliyunapi/guzzle-subscriber)[ RSS](/packages/aliyunapi-guzzle-subscriber/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (5)Used By (5)

aliyun-guzzle
=============

[](#aliyun-guzzle)

鉴于官方SDK被称为史上最烂外包SDK，所以这个中间件是 GuzzleHttp 专用的，支持阿里云大部分API请求。有需要的自行扩展。 For license information check the [LICENSE](LICENSE)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/23bcf35bfebd36193dfcf97d941869e2eb6ef8c6dc237b5dc18c017dc7eb33fe/68747470733a2f2f706f7365722e707567782e6f72672f616c6979756e6170692f67757a7a6c652d737562736372696265722f762f737461626c652e706e67)](https://packagist.org/packages/aliyunapi/guzzle-subscriber)[![Total Downloads](https://camo.githubusercontent.com/608a1625da6929fd03625dfdc36d06a7df91be4cebe12ef6eb9366d0c12c6449/68747470733a2f2f706f7365722e707567782e6f72672f616c6979756e6170692f67757a7a6c652d737562736372696265722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/aliyunapi/guzzle-subscriber)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist aliyunapi/guzzle-subscriber

```

or add

```
"aliyunapi/guzzle-subscriber": "~1.0"

```

to the require section of your composer.json.

使用
--

[](#使用)

```
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use aliyun\guzzle\subscriber\Rpc;

$stack = HandlerStack::create();

//跟guzzlephp普通用法唯一的区别就是这里吧中间件加载进来，他会自动帮你签名重新包装请求参数。
$middleware = new Rpc([
    'accessKeyId' => '123456',
    'accessSecret' => '654321',
]);
$stack->push($middleware);

//这里设置 网关地址，数组参数请参见 http://docs.guzzlephp.org/en/latest/request-options.html
//操作哪个接口对应的 base_uri 就写哪个
$client = new Client([
    'base_uri' => 'http://live.aliyuncs.com/',
    'handler' => $stack,
]);

//查询参数  https://help.aliyun.com/document_detail/35412.html
//这个页面列出了几个参数就在数组提交几个参数,其他的API接口也一样，只需对应参数给他提交即可。
$res = $client->get('/', [
    'query' => [
        'Action' => 'DescribeLiveStreamOnlineUserNum',
        'DomainName' => 'live.aaa.tv',
        'AppName' => 'live',
        'StreamName' => 'bbb',
        ]
]);

print_r($res->getBody()->getContents());

////////////////////////////////////////////////////////////////////ROA已经实现了，但是没有条件测试，欢迎提交合并
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use aliyun\guzzle\subscriber\Roa;

$stack = HandlerStack::create();

//跟guzzlephp普通用法唯一的区别就是这里吧中间件加载进来，
//他会自动帮你签名重新包装请求参数。
$middleware = new Roa([
    'accessKeyId' => '123456',
    'accessSecret' => '654321',
    'version'=>'123456',
]);
$stack->push($middleware);

$client = new Client([
    'base_uri' => 'http://cs.aliyuncs.com/',
    'handler' => $stack,
]);

$res = $client->get('/', [
    'query' => [
        //etc
        ]
]);

print_r($res->getBody()->getContents());

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~203 days

Total

4

Last Release

2772d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87b658aa9d49e0c80cfc609fa2b9dc6d615672b1d895f421f751945a0e394087?d=identicon)[larvacent](/maintainers/larvacent)

---

Top Contributors

[![xutl](https://avatars.githubusercontent.com/u/20939388?v=4)](https://github.com/xutl "xutl (22 commits)")[![xutongle](https://avatars.githubusercontent.com/u/46956076?v=4)](https://github.com/xutongle "xutongle (1 commits)")

---

Tags

aliyunaliyun-sdkguzzlehttpGuzzleguzzlehttpaliyunaliyun-sdk

### Embed Badge

![Health badge](/badges/aliyunapi-guzzle-subscriber/health.svg)

```
[![Health](https://phpackages.com/badges/aliyunapi-guzzle-subscriber/health.svg)](https://phpackages.com/packages/aliyunapi-guzzle-subscriber)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[spatie/crawler

Crawl all internal links found on a website

2.8k17.7M58](/packages/spatie-crawler)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[guzzlehttp/oauth-subscriber

Guzzle OAuth 1.0 subscriber

24015.1M149](/packages/guzzlehttp-oauth-subscriber)[guzzlehttp/guzzle-services

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.

25510.9M189](/packages/guzzlehttp-guzzle-services)[graham-campbell/guzzle-factory

Provides A Simple Guzzle Factory With Good Defaults

926.8M53](/packages/graham-campbell-guzzle-factory)

PHPackages © 2026

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