PHPackages                             tansilu/tslopensdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tansilu/tslopensdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tansilu/tslopensdk
==================

低碳数据开放平台PHP SDK

0.3.18(2y ago)048MITPHPPHP &gt;=7.4

Since Jul 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mothz/tsl-open-sdk-php)[ Packagist](https://packagist.org/packages/tansilu/tslopensdk)[ Docs](https://open.tsl3060.com)[ RSS](/packages/tansilu-tslopensdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (21)Used By (0)

碳丝路低碳数据开放平台PHP SDK
==================

[](#碳丝路低碳数据开放平台php-sdk)

1. 安装
-----

[](#1-安装)

```
composer install tansilu/tslopensdk

```

2. 配置
-----

[](#2-配置)

申请应用APPID ，并设置应用私钥和公钥。

3. 初始化客户端
---------

[](#3-初始化客户端)

```
$apiClient = new \com\tsl3060\open\sdk\ApiClient();

$conf = new \com\tsl3060\open\sdk\Config();
//应用APPID
$conf->setAppId("");
//应用私钥
$conf->setPrivateKey("");
//应用公钥
$conf->setPublicKey("");
//API 平台公钥
$conf->setApiPublicKey("");

$apiClient->setConfig($conf);

//设置通知数据监听
$apiClient->setNotifyListener();
```

4. 通知接收
-------

[](#4-通知接收)

使用通知接收，需自行实现应用回调接口；在回调接口中将接收到数据传入 $apiClient-&gt;notifyRun() 即可

```
$header = getallheaders();
$raw = file_get_contents("php://input");

try {
    $no = $apiClient->notifyRun($header['Content-Type'], $raw);
    header("Content-Type: application/json");
    echo json_encode($no);
} catch (\com\tsl3060\open\sdk\exception\BadResourceException|\com\tsl3060\open\sdk\exception\UnknownResourceException $e) {
    //输出异常
    header('HTTP/1.1 500 Internal Server Error');
}
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

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

Recently: every ~2 days

Total

19

Last Release

874d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9acfcaa1e55dd270de56c2dd1ac2271e44e57066b7c49ece0b81a072aa835703?d=identicon)[mothz](/maintainers/mothz)

---

Top Contributors

[![mothz](https://avatars.githubusercontent.com/u/2850334?v=4)](https://github.com/mothz "mothz (78 commits)")

---

Tags

tslopensdk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tansilu-tslopensdk/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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