Files
RSSHub/website/docs/api.md
T
Tony 17da3677d9 docs: i18n sidebar, fix code block (#13085)
* docs: i18n sidebar

* docs: `code-group` to `tabs`

* docs: admonitions use default title

* docs: fix route

* docs: fix build

* docs: fix add-docs admonitions

* docs: unwrap `details` wrapped content

* docs: mention no i18n switch in dev mode

* docs: fix add-docs rendering

* docs: fix typo
2023-08-21 22:08:41 +08:00

47 lines
1.1 KiB
Markdown

# API
:::caution
The API is under active development and is subject to change. All suggestions are welcome!
:::
RSSHub provides the following APIs:
## List of Public Routes
:::tip
This API **will not** return any routes under `lib/protected_router.js`.
:::
Eg: <https://rsshub.app/api/routes/github>
Route: `/api/routes/:name?`
Parameters:
- `name`, route's top level name as in [https://github.com/DIYgod/RSSHub/tree/master/lib/routes](https://github.com/DIYgod/RSSHub/tree/master/lib/routes). Optional, **returns all public routes if not specified**.
A successful request returns an HTTP status code `200 OK` with the result in JSON:
```js
{
"status": "success",
"data": {
"github": {
"routes": [
"/github/trending/:since/:language?",
"/github/issue/:user/:repo",
"/github/user/followers/:user",
"/github/stars/:user/:repo"
]
}
},
"message": "request returned 4 routes"
}
```
If no matching results were found, the server returns only an HTTP status code `204 No Content`.