Reddit 是一个社交平台,用户可以在基于主题的社区(称为 subreddit)中分享和讨论内容。
在 Sim 中,您可以使用 Reddit 集成功能来:
- 获取帖子:从任何 subreddit 中检索帖子,并提供排序选项(热门、新帖、顶帖、上升)以及按时间筛选顶帖(今天、本周、本月、今年、所有时间)。
- 获取评论:从特定帖子中获取评论,并提供排序和设置评论数量的选项。
这些操作使您的代理能够访问和分析 Reddit 内容,作为自动化工作流程的一部分。
将 Reddit 集成到工作流程中。阅读帖子、评论和搜索内容。提交帖子、投票、回复、编辑以及管理您的 Reddit 账户。
通过不同的排序选项从 subreddit 中获取帖子
| 参数 | 类型 | 必需 | 描述 |
|---|
subreddit | string | 是 | 要获取帖子内容的 subreddit 名称(不包括 r/ 前缀) |
sort | string | 否 | 帖子排序方法:"hot"、"new"、"top" 或 "rising"(默认值:"hot") |
limit | number | 否 | 返回的最大帖子数量(默认值:10,最大值:100) |
time | string | 否 | "top" 排序帖子使用的时间筛选器:"day"、"week"、"month"、"year" 或 "all"(默认值:"day") |
after | string | 否 | 用于分页的项目后续 fullname |
before | string | 否 | 用于分页的项目之前 fullname |
count | number | 否 | 列表中已查看项目的计数(用于编号) |
show | string | 否 | 显示通常会被过滤的项目(例如:"all") |
sr_detail | boolean | 否 | 在响应中展开 subreddit 详细信息 |
| 参数 | 类型 | 描述 |
|---|
subreddit | string | 获取帖子的 subreddit 名称 |
posts | array | 包含标题、作者、URL、评分、评论数量和元数据的帖子数组 |
从特定的 Reddit 帖子中获取评论
| 参数 | 类型 | 必需 | 描述 |
|---|
postId | string | 是 | 要获取评论的 Reddit 帖子 ID |
subreddit | string | 是 | 帖子所在的 subreddit(不包括 r/ 前缀) |
sort | string | 否 | 评论排序方法:"confidence"、"top"、"new"、"controversial"、"old"、"random"、"qa"(默认值:"confidence") |
limit | number | 否 | 返回的最大评论数量(默认值:50,最大值:100) |
depth | number | 否 | 线程中子树的最大深度(控制嵌套评论级别) |
context | number | 否 | 包含的父评论数量 |
showedits | boolean | 否 | 显示评论的编辑信息 |
showmore | boolean | 否 | 在响应中包含 "加载更多评论" 元素 |
showtitle | boolean | 否 | 在响应中包含提交标题 |
threaded | boolean | 否 | 以线程/嵌套格式返回评论 |
truncate | number | 否 | 截断评论深度的整数 |
after | string | 否 | 用于分页的项目后续 fullname |
before | string | 否 | 用于分页的项目之前 fullname |
count | number | 否 | 列表中已查看项目的计数(用于编号) |
| 参数 | 类型 | 描述 |
|---|
post | object | 帖子信息,包括 ID、标题、作者、内容和元数据 |
从 subreddit 获取有争议的帖子
| 参数 | 类型 | 必需 | 描述 |
|---|
subreddit | string | 是 | 要从中获取帖子的 subreddit 名称(不带 r/ 前缀) |
time | string | 否 | 有争议帖子的时间筛选:"hour"、"day"、"week"、"month"、"year" 或 "all"(默认:"all") |
limit | number | 否 | 返回帖子的最大数量(默认:10,最大:100) |
after | string | 否 | 用于分页的项目后面的完整名称 |
before | string | 否 | 用于分页的项目前面的完整名称 |
count | number | 否 | 列表中已查看项目的计数(用于编号) |
show | string | 否 | 显示通常会被过滤的项目(例如:"all") |
sr_detail | boolean | 否 | 在响应中展开 subreddit 详细信息 |
| 参数 | 类型 | 描述 |
|---|
subreddit | string | 获取帖子的 subreddit 名称 |
posts | array | 包含标题、作者、URL、评分、评论数量和元数据的有争议帖子数组 |
在 subreddit 中搜索帖子
| 参数 | 类型 | 必需 | 描述 |
|---|
subreddit | string | 是 | 要搜索的 subreddit 名称(不带 r/ 前缀) |
query | string | 是 | 搜索查询文本 |
sort | string | 否 | 搜索结果的排序方法:"relevance"、"hot"、"top"、"new" 或 "comments"(默认值:"relevance") |
time | string | 否 | 搜索结果的时间筛选:"hour"、"day"、"week"、"month"、"year" 或 "all"(默认值:"all") |
limit | number | 否 | 返回帖子的最大数量(默认值:10,最大值:100) |
restrict_sr | boolean | 否 | 限制搜索仅在指定的 subreddit 中(默认值:true) |
after | string | 否 | 用于分页的项目后续 fullname |
before | string | 否 | 用于分页的项目之前 fullname |
count | number | 否 | 列表中已查看项目的计数(用于编号) |
show | string | 否 | 显示通常会被过滤的项目(例如:"all") |
| 参数 | 类型 | 描述 |
|---|
subreddit | string | 执行搜索的 subreddit 名称 |
posts | array | 包含标题、作者、URL、评分、评论数量和元数据的搜索结果帖子数组 |
向 subreddit 提交一个新帖子(文本或链接)
| 参数 | 类型 | 必需 | 描述 |
|---|
subreddit | string | 是 | 要发布帖子的 subreddit 名称(不包括 r/ 前缀) |
title | string | 是 | 提交的标题(最多 300 个字符) |
text | string | 否 | 自定义帖子的文本内容(支持 markdown) |
url | string | 否 | 链接帖子的 URL(不能与文本同时使用) |
nsfw | boolean | 否 | 将帖子标记为 NSFW |
spoiler | boolean | 否 | 将帖子标记为剧透 |
send_replies | boolean | 否 | 发送回复通知到收件箱(默认值:true) |
| 参数 | 类型 | 描述 |
|---|
success | boolean | 帖子是否成功提交 |
message | string | 成功或错误信息 |
data | object | 帖子数据,包括 ID、名称、URL 和永久链接 |
对 Reddit 帖子或评论进行点赞、点踩或取消投票
| 参数 | 类型 | 必需 | 描述 |
|---|
id | string | 是 | 要投票的对象全名(例如,帖子为 t3_xxxxx,评论为 t1_xxxxx) |
dir | number | 是 | 投票方向:1(点赞),0(取消投票),或 -1(点踩) |
| 参数 | 类型 | 描述 |
|---|
success | boolean | 投票是否成功 |
message | string | 成功或错误信息 |
将 Reddit 帖子或评论保存到您的已保存项目中
| 参数 | 类型 | 必需 | 描述 |
|---|
id | string | 是 | 要保存的对象全名(例如,帖子为 t3_xxxxx,评论为 t1_xxxxx) |
category | string | 否 | 保存的分类(Reddit Gold 功能) |
| 参数 | 类型 | 描述 |
|---|
success | boolean | 保存是否成功 |
message | string | 成功或错误信息 |
| 参数 | 类型 | 描述 |
|---|
subreddit | string | Subreddit 名称 |
posts | json | 帖子数据 |
post | json | 单个帖子数据 |
comments | json | 评论数据 |
为 Reddit 帖子或评论添加回复
| 参数 | 类型 | 必需 | 描述 |
|---|
parent_id | string | 是 | 要回复的对象全名(例如,帖子为 t3_xxxxx,评论为 t1_xxxxx) |
text | string | 是 | 以 markdown 格式编写的评论文本 |
| 参数 | 类型 | 描述 |
|---|
success | boolean | 回复是否成功发布 |
message | string | 成功或错误信息 |
data | object | 评论数据,包括 ID、名称、永久链接和正文 |
编辑您自己的 Reddit 帖子或评论的文本
| 参数 | 类型 | 必需 | 描述 |
|---|
thing_id | string | 是 | 要编辑的事物完整名称(例如,帖子为 t3_xxxxx,评论为 t1_xxxxx) |
text | string | 是 | 新的文本内容,支持 markdown 格式 |
| 参数 | 类型 | 描述 |
|---|
success | boolean | 编辑是否成功 |
message | string | 成功或错误信息 |
data | object | 更新后的内容数据 |
删除您自己的 Reddit 帖子或评论
| 参数 | 类型 | 必需 | 描述 |
|---|
id | string | 是 | 要删除的事物完整名称(例如,帖子为 t3_xxxxx,评论为 t1_xxxxx) |
| 参数 | 类型 | 描述 |
|---|
success | boolean | 删除是否成功 |
message | string | 成功或错误信息 |
订阅或取消订阅一个 subreddit
| 参数 | 类型 | 必需 | 描述 |
|---|
subreddit | string | 是 | subreddit 的名称(不带 r/ 前缀) |
action | string | 是 | 要执行的操作:"sub" 表示订阅,"unsub" 表示取消订阅 |
| 参数 | 类型 | 描述 |
|---|
success | boolean | 订阅操作是否成功 |
message | string | 成功或错误信息 |