返回顶部
r

rapidapi-universal-skill通用RapidAPI技能

Template-driven RapidAPI client with auto-registered actions and a universal call entrypoint

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
310
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

rapidapi-universal-skill

技能名称: rapidapi-universal-skill

详细描述:
使用 {baseDir}/index.js 调用 RapidAPI,模板来自 {baseDir}/templates。
当任务涉及 RapidAPI 端点或模板定义的操作时,优先使用此技能。

该技能的实际功能

该技能是一个极简的 RapidAPI 客户端,可将 RapidAPI 端点定义转换为可调用的操作。 其用途包括:
  • - 将 RapidAPI 端点转换为稳定的操作名称
  • 将输入标准化为查询/请求体/请求头/路径参数
  • 返回一致的 ok/status/data/error/meta 结构

它不是一个服务器。它是一个小型本地客户端,可从脚本或其他技能中调用。

关键能力

  • - 自动注册来自 {baseDir}/templates/*.json 的模板
  • listActions() 枚举所有已注册的操作及其模式
  • callAction(name, params) 调用模板定义的端点
  • callRapidApi(payload) 允许无需模板直接调用 RapidAPI
  • scripts/import-endpoint.js 将 RapidAPI 端点 JSON 负载转换为模板文件

基本用法

使用配置驱动初始化(推荐): js import { createRapidApiSkill } from {baseDir}/index.js; import config from {baseDir}/config.json assert { type: json };

const skill = await createRapidApiSkill({ config });
const res = await skill.callAction(getusertweets, {
user: 2455740283,
count: 20
});

或直接调用(无模板):
js
const skill = await createRapidApiSkill({ config });
const res = await skill.callRapidApi({
host: twitter241.p.rapidapi.com,
path: /user-tweets,
method: GET,
query: { user: 2455740283, count: 20 }
});

模板设计说明

模板为纯 JSON 格式。应包含:
  • - name、host、path、method
  • querySchema(以及可选的 bodySchema、headerSchema、pathParams)

示例片段:
json
{
name: getusertweets,
host: twitter241.p.rapidapi.com,
path: /user-tweets,
method: GET,
querySchema: {
user: {type: string, required: true},
count: {type: number, required: true},
cursor: {type: string}
}
}

适用场景

当你需要一致且可复用的 RapidAPI 接口,而无需构建后端时,请使用此技能。 它特别适用于:
  • - 社交数据 API(X/Twitter、TikTok、LinkedIn)
  • 搜索/聚合 API
  • 跨多个任务或工作流重复调用 RapidAPI

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 rapidapi-1775939472 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 rapidapi-1775939472 技能

通过命令行安装

skillhub install rapidapi-1775939472

下载

⬇ 下载 rapidapi-universal-skill v0.1.0(免费)

文件大小: 12.53 KB | 发布时间: 2026-4-12 11:11

v0.1.0 最新 2026-4-12 11:11
- Initial release of rapidapi-universal-skill: a minimal, template-driven RapidAPI client.
- Auto-registers all RapidAPI action templates from the templates directory.
- Provides consistent actions: listActions(), callAction(name, params), and callRapidApi(payload).
- Includes helper script (import-endpoint.js) to convert RapidAPI endpoints to templates.
- Designed for stable, repeatable calls to RapidAPI endpoints in local scripts or workflows.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部