据 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),按月更新。口径说明见数据方法。