mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat: Support subscribe GitHub file commits (#2002)
* feat: Support subscribe github single file * refact: Use GitHub API to crawl commits * Use GitHub API to crawl commits * Update document * Add access_token for github file commits api
This commit is contained in:
@@ -95,6 +95,21 @@ GitHub 官方也提供了一些 RSS:
|
||||
|
||||
<Route name="仓库 Branches" author="max-arnold" example="/github/branches/DIYgod/RSSHub" path="/github/branches/:user/:repo" :paramsDesc="['用户名', '仓库名']"/>
|
||||
|
||||
<Route name="文件 Commits" author="zengxs" example="/github/file/DIYgod/RSSHub/master/lib/router.js" path="/github/file/:user/:repo/:branch/:filepath+" :paramsDesc="['用户名', '仓库名', '分支名', '文件路径']">
|
||||
|
||||
| 用户名 | 仓库名 | 分支名 | 文件路径 |
|
||||
| -------- | -------- | -------- | --------------- |
|
||||
| `DIYgod` | `RSSHub` | `master` | `lib/router.js` |
|
||||
|
||||
> - **分支名**中如果有 `/` 等特殊字符需使用 urlencode 进行编码,通常 `/` 需要被替换成 `%2f`
|
||||
> - **文件路径**中如果有特殊字符同样需使用 urlencode 进行编码,但文件路径可以正常识别 `/` 字符
|
||||
> - **文件路径**如果以 `.rss`, `.atom`, `.json` 结尾,需要将后缀中的 `.` 替换成 `%2e`
|
||||
> > Reeder 订阅 `%2erss` 或类似后缀的时候会出错,此时再在路由后面加上 `.rss` 即可正常订阅
|
||||
> >
|
||||
> > 如: `https://rsshub.app/github/file/DIYgod/RSSHub/master/lib/router%2ejs` 替换成 `https://rsshub.app/github/file/DIYgod/RSSHub/master/lib/router%2ejs.rss` 即可
|
||||
|
||||
</Route>
|
||||
|
||||
<Route name="搜索结果" author="LogicJake" example="/github/search/RSSHub/bestmatch/desc" path="/github/search/:query/:sort?/:order?" :paramsDesc="['搜索关键词', '排序选项(默认为bestmatch)','排序顺序,desc和asc(默认desc降序)']"/>
|
||||
|
||||
| 排序选项 | sort |
|
||||
|
||||
Reference in New Issue
Block a user