获取Reddit APP帖子评论/Fetch Reddit APP Post Comments
Changed on[中文]
用途:
- 获取Reddit APP指定帖子下的评论
参数:
- post_id: 帖子ID,格式如 "t3_XXXXXX"
- sort_type: 排序方式,支持CONFIDENCE, NEW, TOP, HOT, CONTROVERSIAL, OLD, RANDOM
- after: 分页参数,获取下一页时使用,在commentForest里的最后一个评论节点中可以找到,例如$.data.postInfoById.commentForest.trees[-1].more.cursor
返回:
- 指定帖子下的评论JSON数据
注意:
- APP接口的ID格式与Web接口不同,需要添加类型前缀
- 帖子ID前缀: t3_ (例如: t3_1ojnvca)
[English]
Purpose:
- Fetch comments under a specified Reddit APP post
Parameters:
- post_id: Post ID, format like "t3_XXXXXX"
- sort_type: Sort method, supports HOT, NEW, TOP, BEST, CONTROVERSIAL
- after: Pagination parameter for fetching the next page, can be found in the last comment node in commentForest, e.g., $.data.postInfoById.commentForest.trees[-1].more.cursor
Returns:
- JSON data of comments under the specified post
Note:
- APP API ID format differs from Web API, requires type prefix
- Post ID prefix: t3_ (e.g., t3_1ojnvca)
[示例/Example]
post_id="t3_1ojnvca" sort_type="CONFIDENCE" after="" need_format=false
Request
- Base URLhttps://api.tikhub.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Query parameters
返回内容使用的语言,采用 IETF 语言标签;默认 en-US / Preferred response language as an IETF language tag; default: en-US
帖子ID/Post ID
排序方式/Sort method: CONFIDENCE, NEW, TOP, HOT, CONTROVERSIAL, OLD, RANDOM
分页参数/Pagination parameter for fetching next page
是否需要清洗数据/Whether to clean and format the data
Response
Successful Response
Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- breaking
the
queryrequest parametersort_typewas restricted to a list of enum values - breaking
for the
queryrequest parameterpost_id, the minLength was increased from0to4 - breaking
added the pattern
^t3_[a-z0-9]{1,17}$to thequeryrequest parameterpost_id - warning
for the
queryrequest parameterafter, the maxLength was set to4096 - warning
for the
queryrequest parameterpost_id, the maxLength was set to20 - info
added the new optional
queryrequest parameterlanguage - info
added the new enum value
CONFIDENCEto thequeryrequest parametersort_type - info
added the new enum value
CONTROVERSIALto thequeryrequest parametersort_type - info
added the new enum value
HOTto thequeryrequest parametersort_type - info
added the new enum value
NEWto thequeryrequest parametersort_type - info
added the new enum value
OLDto thequeryrequest parametersort_type - info
added the new enum value
RANDOMto thequeryrequest parametersort_type - info
added the new enum value
TOPto thequeryrequest parametersort_type
- breaking