Reddit-APP-API

按分类获取Reddit APP feed/Fetch Reddit APP Topic Feed

Changed on

[中文]

用途:

  • 获取指定 topic(社区分类)的 feed
  • 一般流程: 先调 /fetch_explore_feed 获取所有 topicId,然后选一个 topicId 调这个接口

参数:

  • topic_id: 分类ID,格式 "tx1_XXXXX",从 /fetch_explore_feed 返回的 topics[].id 取
  • scheme_name: 分类 scheme,App 默认用 "communities_tab_taxonomy_topics_default"
  • sort: 排序方式
  • time: 时间范围
  • need_format: 是否清洗

注意:

  • APP接口的ID格式与Web接口不同,需要添加类型前缀
  • 分类ID前缀: tx1_ (例如: tx1_29m4k39)
  • scheme_name 是 Reddit 内部分类体系标识,默认值即可

[English]

Purpose:

  • Fetch the feed for a specific Reddit community topic
  • Typical flow: call /fetch_explore_feed first to get topicIds, then pass one here

Parameters:

  • topic_id: Topic ID, format "tx1_XXXXX", get from /fetch_explore_feed response's topics[].id
  • scheme_name: Topic scheme, App defaults to "communities_tab_taxonomy_topics_default"
  • sort: Sort method
  • time: Time range
  • need_format: Whether to clean

[示例/Example]

topic_id="tx1_29m4k39" scheme_name="communities_tab_taxonomy_topics_default" sort="BEST" time="ALL" need_format=false

get/api/v1/reddit/app/fetch_topic_feed

Request

  • Base URL
    https://api.tikhub.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Query parameters

languagestring

返回内容使用的语言,采用 IETF 语言标签;默认 en-US / Preferred response language as an IETF language tag; default: en-US

topic_idstring required

分类ID/Topic ID (从 /fetch_explore_feed 的 topics 拿)

scheme_namestring

分类 scheme/Topic scheme name (默认 App 用 communities_tab_taxonomy_topics_default)

sort'BEST' | 'HOT' | 'NEW' | 'TOP' | 'CONTROVERSIAL' | 'RISING'

排序方式/Sort method: BEST, HOT, NEW, TOP, CONTROVERSIAL

time'ALL' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'

时间范围/Time range: ALL, HOUR, DAY, WEEK, MONTH, YEAR

need_formatboolean

是否需要清洗数据/Whether to clean and format the data

Response

Successful Response

codeinteger

HTTP status code | HTTP状态码

request_idstring nullable

Unique request identifier | 唯一请求标识符

messagestring

Response message (EN-US) | 响应消息 (English)

message_zhstring

Response message (ZH-CN) | 响应消息 (中文)

supportstring

Support message | 支持消息

timestring

The time the response was generated | 生成响应的时间

time_stampinteger

The timestamp the response was generated | 生成响应的时间戳

time_zonestring

The timezone of the response time | 响应时间的时区

docsstring nullable

Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接

cache_messagestring nullable

Cache message (EN-US) | 缓存消息 (English)

cache_message_zhstring nullable

Cache message (ZH-CN) | 缓存消息 (中文)

cache_urlstring nullable

The URL to access the cached result | 访问缓存结果的 URL

routerstring

The endpoint that generated this response | 生成此响应的端点

paramsunknown
dataunknown

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • breaking

      the query request parameter sort was restricted to a list of enum values

    • breaking

      the query request parameter time was restricted to a list of enum values

    • breaking

      for the query request parameter scheme_name, the minLength was increased from 0 to 1

    • breaking

      for the query request parameter topic_id, the minLength was increased from 0 to 5

    • breaking

      added the pattern ^[a-z0-9_]+$ to the query request parameter scheme_name

    • breaking

      added the pattern ^tx1_[a-z0-9]{1,16}$ to the query request parameter topic_id

    • warning

      for the query request parameter scheme_name, the maxLength was set to 100

    • warning

      for the query request parameter topic_id, the maxLength was set to 20

    • info

      added the new optional query request parameter language

    • info

      added the new enum value ALL to the query request parameter time

    • info

      added the new enum value BEST to the query request parameter sort

    • info

      added the new enum value CONTROVERSIAL to the query request parameter sort

    • info

      added the new enum value DAY to the query request parameter time

    • info

      added the new enum value HOT to the query request parameter sort

    • info

      added the new enum value HOUR to the query request parameter time

    • info

      added the new enum value MONTH to the query request parameter time

    • info

      added the new enum value NEW to the query request parameter sort

    • info

      added the new enum value RISING to the query request parameter sort

    • info

      added the new enum value TOP to the query request parameter sort

    • info

      added the new enum value WEEK to the query request parameter time

    • info

      added the new enum value YEAR to the query request parameter time