PHPackages                             ledc/xiao-hong-shu - 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. ledc/xiao-hong-shu

ActiveLibrary[API Development](/categories/api)

ledc/xiao-hong-shu
==================

小红书开放平台，自研商家SDK（授权API、公共API、素材API、商品API、库存API、订单API、售后API等）

v7.5.0(9mo ago)11MITPHPPHP &gt;=7.4

Since Jul 17Pushed 9mo agoCompare

[ Source](https://github.com/ledccn/ledc-xiao-hong-shu)[ Packagist](https://packagist.org/packages/ledc/xiao-hong-shu)[ RSS](/packages/ledc-xiao-hong-shu/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (8)Used By (0)

说明
==

[](#说明)

小红书开放平台，自研商家SDK（授权API、公共API、素材API、商品API、库存API、订单API、售后API等）

安装
--

[](#安装)

`composer require ledc/xiao-hong-shu`

使用说明
----

[](#使用说明)

开箱即用，只需要传入一个配置，初始化一个实例即可：

```
use Ledc\XiaoHongShu\Config;
use Ledc\XiaoHongShu\Merchant;

// 数据库或环境变量内的配置信息
$config = [
    'appKey' => '',
    'appSecret' => '',
    'version' => '2.0',
    'storeId' => '',
    'timeout' => 10,
    'enabled' => true,
];

$merchant = new Merchant(new Config($config));
```

在创建实例后，所有的方法都可以由IDE自动补全；例如：

```
/** @var \Ledc\XiaoHongShu\Merchant $merchant */

// 获取小红书HTTP客户端（处理了签名逻辑）
$client = $merchant->getClient();

// 售后接口
$afterSaleClient = $merchant->getAfterSaleClient();

// 获取公共接口
$commonClient = $merchant->getCommonClient();

// 获取库存接口
$inventoryClient = $merchant->getInventoryClient();

// 获取素材接口
$materialClient = $merchant->getMaterialClient();

// 获取授权接口
$oauthClient = $merchant->getOauthClient();

// 获取订单接口
$orderClient = $merchant->getOrderClient();

// 获取商品接口
$productClient = $merchant->getProductClient();

// 更多...
```

官方文档
----

[](#官方文档)

捐赠
--

[](#捐赠)

[![reward](reward.png)](reward.png)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance57

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

Total

7

Last Release

283d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4af14254189bc74029cc40f4206f8006872b0cd092c680201f204a85a490f143?d=identicon)[ledccn](/maintainers/ledccn)

---

Top Contributors

[![ledccn](https://avatars.githubusercontent.com/u/53997080?v=4)](https://github.com/ledccn "ledccn (8 commits)")

###  Code Quality

Static AnalysisRector

### Embed Badge

![Health badge](/badges/ledc-xiao-hong-shu/health.svg)

```
[![Health](https://phpackages.com/badges/ledc-xiao-hong-shu/health.svg)](https://phpackages.com/packages/ledc-xiao-hong-shu)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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