api - Reddit API 中的 Children 参数是什么?

标签 api reddit

我正在尝试使用 Reddit API 获取特定故事的评论列表。

我正在使用 API 调用 POST api/morechildren 并且不知道要为 Children 参数添加什么内容。文档说它必须是“以逗号分隔的评论 ID 列表”。我不知道评论ID是什么样的,有人知道这是什么吗?如果是这样,请提供一个例子......

最佳答案

I am not sure what the comment IDs look like, is there anyone that knows what this is?

评论 ID 类似于 t1_BASE36IDBASE36ID 是提交响应中 children 下列出的值。例如,如果您获取 URL http://www.reddit.com/r/redditdev/comments/w60cs/using_morechildren_without_praw/.json?limit=2 json 响应的一部分是:

kind: "Listing",
data: {
  modhash: "reswq423o8daa6014e3fbf914e0572a5fe6c17a66b599e0671",
  children: [
    {
      kind: "more",
      data: {
        count: 9,
        parent_id: "t1_c5akqs1",
        children: [
          "c5anb3r",
          "c5b9z4g"
        ],
        name: "t1_c5anb3r",
        id: "c5anb3r"
      }
    }
  ],
  after: null,
  before: null
}

您需要将该子 BASE36ID 列表转换为 t1_c5anb3r,t1_c5b9z4g

关于api - Reddit API 中的 Children 参数是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19391307/

相关文章:

api - 内部带有变量的字符串,可以动态改变

javascript - reddit 无法预览我的 gif

javascript - 如何使用 GreaseMonkey 脚本覆盖 (css) 元类属性?

api - reddit api 分页 : before is always null

ruby - 将 OAuth 与 Reddit 结合使用时出现 401 错误代码

api - Gmail.Users.Messages.remove(me, id) - 未找到错误

android - Jelly Bean 中 Android 系统栏的新 API?

api - 通过 HTTP API 访问 Drupal 站点

Python:TypeError: 'Comment' 类型的参数不可迭代

c++ - 如何使用 API 将 map<string,string> 传递给 py?