docs: parameter joint (#10000)

Signed-off-by: Rongrong <i@rong.moe>
This commit is contained in:
Rongrong
2022-06-22 09:38:51 +08:00
committed by GitHub
parent dfdb1a03d4
commit 99dd550ffb
2 changed files with 32 additions and 8 deletions
+18 -6
View File
@@ -2,7 +2,19 @@
::: tip
The parameters can be linked with `&` to used together to generate a complex feed.
Parameters here are actually URI query and can be linked together with `&` to generate a complex feed.
Parameters here need to be placed after the route path. Some routes may have <span color=green>**custom route parameters**</span> and <span color=violet>**parameters here**</span> need to be placed after them.
E.g.
<a href="https://rsshub.app/twitter/user/durov/readable=1&includeRts=0?brief=100&limit=5">https://rsshub.app/twitter/user/durov/<span color=green><b>readable=1&includeRts=0</b></span>?<span color=violet><b>brief=100&limit=5</b></span></a>
If a <span color=magenta>**output format**</span> (`.atom`, `.rss`, `.debug.json`) is set, it needs to be placed between the route path (including <span color=green>**custom route parameters**</span>) and <span color=violet>**other parameters**</span>.
E.g.
<a href="https://rsshub.app/twitter/user/durov/readable=1&includeRts=0.atom?brief=100&limit=5">https://rsshub.app/twitter/user/durov/<span color=green><b>readable=1&includeRts=0</b></span><span color=magenta><b>.atom</b></span>?<span color=violet><b>brief=100&limit=5</b></span></a>
:::
@@ -28,7 +40,7 @@ Set `filter` to include the content
- `filter_time`: filter `pubDate`, in seconds, return specified time range. Item without `pubDate` will not be filtered.
For example: [https://rsshub.app/dribbble/popular?filter=Blue|Yellow|Black](https://rsshub.app/dribbble/popular?filter=Blue|Yellow|Black)
E.g. [https://rsshub.app/dribbble/popular?filter=Blue|Yellow|Black](https://rsshub.app/dribbble/popular?filter=Blue|Yellow|Black)
Set `filterout` to exclude unwanted content.
@@ -40,13 +52,13 @@ Set `filterout` to exclude unwanted content.
- `filterout_author`: filter `author` only
For example: [https://rsshub.app/dribbble/popular?filterout=Blue|Yellow|Black](https://rsshub.app/dribbble/popular?filterout=Blue|Yellow|Black)
E.g. [https://rsshub.app/dribbble/popular?filterout=Blue|Yellow|Black](https://rsshub.app/dribbble/popular?filterout=Blue|Yellow|Black)
Set `filter_case_sensitive` to determine whether the filtering keywords should be case sensitive. The parameter would apply to both `filter` and `filterout`.
Default: `true`
Example: [https://rsshub.app/dribbble/popular?filter=BluE|yeLLow|BlaCK&filter_case_sensitive=false](https://rsshub.app/dribbble/popular?filter=BluE|yeLLow|BlaCK&filter_case_sensitive=false)
E.g. [https://rsshub.app/dribbble/popular?filter=BluE|yeLLow|BlaCK&filter_case_sensitive=false](https://rsshub.app/dribbble/popular?filter=BluE|yeLLow|BlaCK&filter_case_sensitive=false)
## Limit Entries
@@ -108,12 +120,12 @@ There are more details in the [FAQ](/en/faq.html).
RSSHub conforms to RSS 2.0 and Atom Standard, simply append `.rss` `.atom` to the end of the feed address to obtain the feed in corresponding format. The default output format is RSS 2.0.
For example:
E.g.
- Default (RSS 2.0) - [https://rsshub.app/dribbble/popular](https://rsshub.app/dribbble/popular)
- RSS 2.0 - [https://rsshub.app/dribbble/popular.rss](https://rsshub.app/dribbble/popular.rss)
- Atom - [https://rsshub.app/dribbble/popular.atom](https://rsshub.app/dribbble/popular.atom)
- Apply filters or URL query [https://rsshub.app/dribbble/popular.atom?filterout=Blue|Yellow|Black](https://rsshub.app/dribbble/popular.atom?filterout=Blue|Yellow|Black)
- Apply filters or URL query - [https://rsshub.app/dribbble/popular.atom?filterout=Blue|Yellow|Black](https://rsshub.app/dribbble/popular.atom?filterout=Blue|Yellow|Black)
### Debug
+14 -2
View File
@@ -2,7 +2,19 @@
::: tip 提示
所有通用参数可以使用 `&` 连接组合使用,效果叠加
通用参数实际上是 URI 中的 query,可以使用 `&` 连接组合使用,效果叠加。
通用参数需要置于路由路径的最后。有些路由在路由路径(route path)的最后引入了<span color=green>**自定义参数**</span>,<span color=violet>**通用参数**</span>也需要置于它们之后。
举例:
<a href="https://rsshub.app/twitter/user/durov/readable=1&includeRts=0?brief=100&limit=5"><https://rsshub.app/twitter/user/durov/><span color=green><b>readable=1\&includeRts=0</b></span>?<span color=violet><b>brief=100\&limit=5</b></span></a>
如果设置了<span color=magenta>**输出格式**</span>(`.atom`, `.rss`, `.debug.json`),则需要置于路由路径(含<span color=green>**自定义参数**</span>)与<span color=violet>**其它通用参数**</span>之间。
举例:
<a href="https://rsshub.app/twitter/user/durov/readable=1&includeRts=0.atom?brief=100&limit=5"><https://rsshub.app/twitter/user/durov/><span color=green><b>readable=1\&includeRts=0</b></span><span color=magenta><b>.atom</b></span>?<span color=violet><b>brief=100\&limit=5</b></span></a>
:::
@@ -114,7 +126,7 @@ RSSHub 同时支持 RSS 2.0 和 Atom 输出格式,在路由末尾添加 `.rss`
- 缺省 RSS 2.0 - <https://rsshub.app/jianshu/home>
- RSS 2.0 - <https://rsshub.app/jianshu/home.rss>
- Atom - <https://rsshub.app/jianshu/home.atom>
- 和 filter 或其他 URL query 一起使用 `https://rsshub.app/bilibili/user/coin/2267573.atom?filter=微小微|赤九玖|暴走大事件`
- 和 filter 或其他 URL query 一起使用 - `https://rsshub.app/bilibili/user/coin/2267573.atom?filter=微小微|赤九玖|暴走大事件`
### debug