PHPackages                             hisway/top-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. hisway/top-sdk

ActiveLibrary

hisway/top-sdk
==============

Taobao top client(SDK) for laravel 5.\*

071PHP

Since Oct 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hisway/taobao-topsdk)[ Packagist](https://packagist.org/packages/hisway/top-sdk)[ RSS](/packages/hisway-top-sdk/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

淘宝API for laravel/lumen (5.1|5.2)
=================================

[](#淘宝api-for-laravellumen-5152)

当前淘宝客 API 升级为2.0，原「淘宝客初级包」合并到了「淘宝客基础API」。

laravel
-------

[](#laravel)

### 安装

[](#安装)

`composer require hisway/top-sdk`

### 配置

[](#配置)

- 在config/app.php中的providers数组中添加`Hisway\TopClient\TopClientServiceProvider::class,`
- 在config/app.php中的aliases数组中添加`'TopClient' => Hisway\TopClient\Facades\TopClient::class,`
- 执行 `php artisan vendor:publish --provider="Hisway\TopClient\TopClientServiceProvider"` 生成配置文件
- 编辑.env文件，设置appid,appsecret

### 示例代码

[](#示例代码)

```
use TopClient;
use TopClient\request\TbkItemGetRequest;

$topclient = TopClient::connection();
$req = new TbkItemGetRequest;
$req->setFields("num_iid,title,pict_url,reserve_price,zk_final_price,user_type,provcity,item_url");
$req->setQ('手机');
$req->setSort("tk_total_sales");
$req->setPageNo('1'); // 实验后发现必需用字符串的数字才能正确分页
$req->setPageSize('40');
$resp = $topclient->execute($req);
dd($resp);
```

lumen
-----

[](#lumen)

### 安装

[](#安装-1)

`composer require Hisway/taobao-top-client`

### 配置

[](#配置-1)

- 手动复制vendor/Hisway/taobao-top-client/config/taobaotop.php到config目录下
- 在bootstrap/app.php下添加

```
if (!class_exists('TopClient')) {
    class_alias('Hisway\TopClient\Facades\TopClient', 'TopClient');
}
$app->register(Hisway\TopClient\TopClientServiceProvider::class);
```

- 编辑.env文件，设置appid,appsecret

### 示例代码

[](#示例代码-1)

```
use TopClient;
use TopClient\request\TbkItemGetRequest;

$topclient = TopClient::connection();
$req = new TbkItemGetRequest;
$req->setFields("num_iid,title,pict_url,reserve_price,zk_final_price,user_type,provcity,item_url");
$req->setQ('手机');
$req->setSort("tk_total_sales");
$req->setPageNo('1'); // 实验后发现必需用字符串的数字才能正确分页
$req->setPageSize('40');
$resp = $topclient->execute($req);
dd($resp);
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![hisway](https://avatars.githubusercontent.com/u/3006019?v=4)](https://github.com/hisway "hisway (9 commits)")

### Embed Badge

![Health badge](/badges/hisway-top-sdk/health.svg)

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

PHPackages © 2026

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