V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Livid
272.76D
573.01D
V2EX  ›  Wunder

根据节点名获取指定节点的最新主题的 JSON 格式

  •  
  •   Livid ·
    PRO
    · Jan 22 · 1271 views
    This topic created in 109 days ago, the information mentioned may be changed or developed.

    比如本节点的 URL 名是 wunder:

    https://www.v2ex.com/go/wunder

    那么可以这样获得这个节点的最新主题的 JSON 格式:

    https://www.v2ex.com/api/topics/show.json?node_name=wunder
    
    7 replies    2026-04-08 17:47:26 +08:00
    JoeJoeJoe
        1
    JoeJoeJoe  
    PRO
       Jan 22
    刚才测试了一下, 展示了最新的 10 条数据.
    Livid
        2
    Livid  
    MOD
    OP
    PRO
       Jan 22   ❤️ 1
    @JoeJoeJoe

    /api/topics/show.json 是一个最早的 1.0 简易接口。

    如果需要翻页,那么需要使用带有 token rate limit 的 2.0 接口:

    https://www.v2ex.com/help/api
    JoeJoeJoe
        3
    JoeJoeJoe  
    PRO
       Feb 3
    站长, v2.0 的 api 接口: topics/:topic_id 的返回值中能否添加'收藏'和'感谢'的字段?

    目前好像是没有这俩字段, 但是有回复数.

    SingeeKing
        4
    SingeeKing  
    PRO
       Apr 8   ❤️ 1
    2.0 API 能否添加下作者的相关信息?
    Livid
        5
    Livid  
    MOD
    OP
    PRO
       Apr 8
    @SingeeKing 具体是指哪个接口?
    Livid
        6
    Livid  
    MOD
    OP
    PRO
       Apr 8   ❤️ 1
    @JoeJoeJoe

    这两个字段已经加入:

    - stars
    - thanks
    SingeeKing
        7
    SingeeKing  
    PRO
       Apr 8   ❤️ 1
    @Livid #5 就是这个

    获取指定节点下的主题
    GET nodes/:node_name/topics
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3317 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 12:35 · PVG 20:35 · LAX 05:35 · JFK 08:35
    ♥ Do have faith in what you're doing.