• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

xaoxuu/github-api: 一个通过定时缓存 GitHub API 数据并提供加速访问的工具,解决了 ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

xaoxuu/github-api

开源软件地址:

https://github.com/xaoxuu/github-api

开源编程语言:

Python 100.0%

开源软件介绍:

github-api

一个通过定时缓存 GitHub API 数据并提供加速访问的工具,解决了直接调用 GitHub API 频率有限制以及速度过慢的问题。

示例:https://gh-api.xaoxuu.com/v1/users?target=xaoxuu

使用方法

  1. 把本仓库 fork 到您的 GitHub 中。
  2. 修改 config.yml 中的配置信息。
  3. 前往 Actions 页面,点击绿色的「enable workflows」按钮。
  4. 刷新 Actions 页面,点击左侧「Generator」选项卡,再点击右侧的「enable workflow」按钮。
  5. 点击 Star 以主动触发 Action 进行测试。

等待 Action 运行完毕,生成 output 路径以及文件就说明配置成功了。

为了方便更新,请不要直接使用 fork 的仓库作为数据来源仓库,而仅仅作为缓存仓库,当 API 更新时,直接删掉并重新 fork 就可以了。

API 文档

users

https://gh-api.xaoxuu.com/v1/users?source={owner/repo}&target={owner}

自己部署 API 可以省略 source 参数

contributors

https://gh-api.xaoxuu.com/v1/contributors?source={owner/repo}&target={owner/repo}

示例:https://gh-api.xaoxuu.com/v1/contributors?source=xaoxuu/github-api&target=xaoxuu/hexo-theme-stellar

releases

https://gh-api.xaoxuu.com/v1/releases?source={owner/repo}&target={owner/repo}

示例:https://gh-api.xaoxuu.com/v1/releases?source=xaoxuu/github-api&target=xaoxuu/hexo-theme-stellar

issues

https://gh-api.xaoxuu.com/v1/issues?source={owner/repo}&target={owner/repo}

示例:https://gh-api.xaoxuu.com/v1/issues?source=xaoxuu/github-api&target=xaoxuu/hexo-theme-stellar

自己部署 API 可以缩短链接

修改配置文件中的 source_repo 并以您 fork 的仓库为源码创建 Vercel App,请求您的 API 时可以省略 source 参数:

https://github-api-yourname.vercel.app/v1/users?target={owner}
https://github-api-yourname.vercel.app/v1/contributors?target={owner/repo}
https://github-api-yourname.vercel.app/v1/releases?target={owner/repo}
https://github-api-yourname.vercel.app/v1/issues?target={owner/repo}



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap