Skip to content

Instantly share code, notes, and snippets.

@fanzeyi
Last active April 29, 2024 08:43
Show Gist options
  • Select an option

  • Save fanzeyi/6951803 to your computer and use it in GitHub Desktop.

Select an option

Save fanzeyi/6951803 to your computer and use it in GitHub Desktop.

Revisions

  1. fanzeyi revised this gist Oct 12, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion v2ex_api.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ None
    * description - 当前社区描述
    * domain - 社区网址

    ## Nodes
    ## Node

    ### nodes/all.json

  2. fanzeyi revised this gist Oct 12, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions v2ex_api.md
    Original file line number Diff line number Diff line change
    @@ -141,6 +141,7 @@ URL: [http://www.v2ex.com/api/members/show.json](http://www.v2ex.com/api/members

    * id - Member ID
    * username - Member name

    (以上参数任选其一)

    #### 返回值
  3. fanzeyi revised this gist Oct 12, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions v2ex_api.md
    Original file line number Diff line number Diff line change
    @@ -141,6 +141,7 @@ URL: [http://www.v2ex.com/api/members/show.json](http://www.v2ex.com/api/members

    * id - Member ID
    * username - Member name
    (以上参数任选其一)

    #### 返回值

  4. fanzeyi created this gist Oct 12, 2013.
    155 changes: 155 additions & 0 deletions v2ex_api.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,155 @@
    # V2EX API Documents

    ## Site

    ### site/stats.json

    URL: [http://www.v2ex.com/api/site/stats.json](http://www.v2ex.com/api/site/stats.json)

    获取社区统计信息。

    #### 参数

    None

    #### 返回值

    * topic_max - 当前社区话题数量
    * member_max - 当前社区用户数量

    ### site/info.json

    URL: [http://www.v2ex.com/api/site/info.json](http://www.v2ex.com/api/site/info.json)

    获取社区介绍。

    #### 参数

    None

    #### 返回值

    * title - 当前社区站名
    * slogan - 当前社区口号
    * description - 当前社区描述
    * domain - 社区网址

    ## Nodes

    ### nodes/all.json

    URL: [http://www.v2ex.com/api/nodes/all.json](http://www.v2ex.com/api/nodes/all.json)

    获取全部节点

    #### 参数

    None

    #### 返回值

    * id - 节点 ID
    * name - 节点缩略名
    * url - 节点地址
    * title - 节点名称
    * title_alternative - 备选节点名称
    * topics - 节点主题总数
    * header - 节点头部信息
    * footer - 节点脚部信息
    * created - 节点创建时间

    ### nodes/show.json

    URL: [http://www.v2ex.com/api/nodes/show.json](http://www.v2ex.com/api/nodes/show.json)

    获取单个节点信息

    #### 参数

    * id - 节点 id
    * name - 节点缩略名

    (以上参数任选其一)

    #### 返回值
    * id - 节点 ID
    * name - 节点缩略名
    * url - 节点地址
    * title - 节点名称
    * title_alternative - 备选节点名称
    * topics - 节点主题总数
    * header - 节点头部信息
    * footer - 节点脚部信息
    * created - 节点创建时间

    ## Topic

    ### topics/latest.json

    URL: [http://www.v2ex.com/api/topics/latest.json](http://www.v2ex.com/api/topics/latest.json)

    #### 参数

    None

    #### 返回值

    * id - Topic ID
    * title - Topic 标题
    * content - Topic 内容
    * content_rendered - 渲染过的 Topic 内容(比如 gist, Youtube 等)
    * replies - 回复数量

    ### topics/show.json

    URL: [http://www.v2ex.com/api/topics/show.json](http://www.v2ex.com/api/topics/show.json)

    #### 参数

    * id - Topic ID

    #### 返回值

    * id - Topic ID
    * title - Topic 标题
    * content - Topic 内容
    * content_rendered - 渲染过的 Topic 内容(比如 gist, Youtube 等)
    * replies - 回复数量

    ### replies/show.json

    URL: [http://www.v2ex.com/api/replies/show.json](http://www.v2ex.com/api/replies/show.json)

    #### 参数

    * topic_id - Topic ID

    #### 返回值

    * id - Reply ID
    * content - Reply 内容
    * content_rendered - 渲染过的 Reply 内容(比如 gist, Youtube 等)
    * thank - 感谢数量

    ## Member

    ### member/show.json

    URL: [http://www.v2ex.com/api/members/show.json](http://www.v2ex.com/api/members/show.json)

    #### 参数

    * id - Member ID
    * username - Member name

    #### 返回值

    * status
    * id
    * url
    * username
    * website
    * twitter
    * location
    * tagline
    * bio