據 AlphaMoat 統計,截至 2026-09,Node.js API 客戶端黃金標準 累計下載 891 次、獲 0 個星標,在全部 5,078 個 AI 技能中排名第 5,062 位,在「開發程式設計」分類(577 個)中排名第 577 位。
| 平台 | 累計安裝 | 累計下載 | 星標 | 評論 |
|---|---|---|---|---|
| ClawHub ↗ | 22 | 857 | - | - |
| SkillHub ↗ | 215 | 891 | - | — |
各平台的計數口徑不同,統計時間不一致。
該技能介紹多 Endpoint、多金鑰輪詢、優先順序策略、連線池、退避重試與熔斷器等客戶端設計。實際行為仍需根據目標 API 和環境測試;文件描述不構成生產可靠性保證。
資料釋出於 2026-10-27
以下是根據技能文件生成的示例,不代表實際執行結果。
2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。
| 月份 | 累計下載 | 環比 | 星標 |
|---|---|---|---|
| 2026-09 | 891 | — | - |
| 2026-08 | 824 | +7.3% | - |
| 2026-07 | 768 | +20.2% | - |
| 2026-06 | 639 | +10.0% | - |
| 2026-05 | 581 | — | - |
| 2026-03 | 343 | — | - |
以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。
---
name: reliable-api-client
description: Node.js API 客户端黄金标准 v3.0 - 多Endpoint + 多Key轮询 + 限流 + 熔断器
homepage: https://github.com/tvvshow/openclaw-evomap
metadata:
{
"openclaw":
{
"emoji": "🌐",
"requires": {}, "install": [],
},
}
---
# Node.js API 客户端黄金标准 v3.0
整合多Endpoint + 多Key轮询 + 限流 + 连接池 + 指数退避重试 + 熔断器
## 新功能 (v3.0)
| 功能 | 说明 |
|------|------|
| **多Endpoint** | 支持多个上游地址,自动故障转移 |
| **Endpoint熔断** | 每个Endpoint独立熔断器 |
| **优先级策略** | 支持 priority/least-used/round-robin |
| **延迟监控** | 跟踪每个Endpoint的响应时间 |
## 使用方法
```javascript
const ReliableAPIClient = require('./reliable-api-client');
const client = new ReliableAPIClient({
// 多 Endpoint 支持
endpoints: [
{ url: 'https://api.example.com', priority: 10 }, // 高优先级
{ url: 'https://backup.example.com', priority: 5 }
],
endpointStrategy: 'priority', // priority | round-robin | least-used
endpointCooldown: 60000, // 1分钟冷却
// 多 Key 支持
apiKeys: ['key1', 'key2', 'key3'],
keyStrategy: 'round-robin',
// 限流
maxQPS: 10,
// 重试
maxRetries: 3,
// 熔断
circuitThreshold: 5,
circuitReset: 30000,
// 连接池
poolSize: 20
});
// 添加更多 Endpoint
client.addEndpoint('https://new-endpoint.com', priority: 8);
client.addAPIKey('new-key');
// 请求
const data = await client.get('/users');
const result = await client.post('/orders', { item: 'test' });
// 统计
console.log('Endpoints:', client.getEndpointStats());
console.log('Keys:', client.getKeyStats());
console.log('Circuit:', client.getCircuitBreakerStatus(url));
```
## 架构
```
请求 → [限流器] → [Endpoint选择] → [Key选择] → [熔断器] → 发送
↓
[指数退避重试]
↓
[失败 → 切换Endpoint/Key]
```
## 故障转移逻辑
1. 优先选择健康的 Endpoint
2. 按策略选择(priority/least-used/round-robin)
3. 请求失败 → 标记 Endpoint 错误
4. 连续失败 → 熔断器打开
5. 熔断后 → 自动切换到下一个 Endpoint
6. 冷却后 → Endpoint 恢复健康
## 文件
- `reliable-api-client.js` - 主代码
## 相关文档
- `EVOMAP_STANDARD.md` - 胶囊发布规范
用 gh 命令列工具檢視 GitHub 上的 PR 檢查、工作流執行與 API 查詢的技能。
聚合 16 個搜尋引擎、無需 API Key 的檢索技能。
用命令列直接列出、配置、授權並呼叫 MCP 服務與工具。
生成有效的 Mermaid 圖表,如流程圖、時序圖、思維導圖、ER 圖、使用者旅程等。
用受管 OAuth 訪問 YouTube Data API,檢索影片並管理頻道內容。
透過受管的 OAuth 連線訪問 GitHub REST API。
覆蓋規劃、實現、驗證與測試的編碼工作流技能。
整理 Docker 常用命令與容器工作流的技能。
資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。