当前位置:   article > 正文

V2EX 的 API_v2ex api

v2ex api

V2EX Non-official API list

V2EX非官方API列表,仅供参考,欢迎补充。

Site

取网站信息

/api/site/info.json

  1. {
  2. "title" : "V2EX",
  3. "slogan" : "way to explore",
  4. "description" : "创意工作者们的社区",
  5. "domain" : "www.v2ex.com"
  6. }

取网站状态

/api/site/stats.json

  1. {
  2. "topic_max" : 126172,
  3. "member_max" : 71033
  4. }

Node

取所有节点

/api/nodes/all.json

  1. [
  2. {
  3. "id" : 1,
  4. "name" : "babel",
  5. "url" : "http://www.v2ex.com/go/babel",
  6. "title" : "Project Babel",
  7. "title_alternative" : "Project Babel",
  8. "topics" : 1102,
  9. "header" : "Project Babel \u002D 帮助你在云平台上搭建自己的社区",
  10. "footer" : "V2EX 基于 Project Babel 驱动。Project Babel 是用 Python 语言写成的,运行于 Google App Engine 云计算平台上的社区软件。Project Babel 当前开发分支 2.5。最新版本可以从 \u003Ca href\u003D\u0022http://github.com/livid/v2ex\u0022 target\u003D\u0022_blank\u0022\u003EGitHub\u003C/a\u003E 获取。",
  11. "created" : 1272206882
  12. }
  13. ]

取节点信息

/api/nodes/show.json

参数(选其一) 
id节点id
name节点名
  1. {
  2. "id" : 2,
  3. "name" : "v2ex",
  4. "url" : "http://www.v2ex.com/go/v2ex",
  5. "title" : "V2EX",
  6. "title_alternative" : "V2EX",
  7. "topics" : 2000,
  8. "header" : "这里讨论和发布关于 V2EX 站点发展。",
  9. "footer" : null,
  10. "created" : 1272207021
  11. }

Topic

取最新主题

/api/topics/latest.json

  1. [
  2. {
  3. "id" : 128177,
  4. "title" : "vim\u002Dtranslator",
  5. "url" : "http://www.v2ex.com/t/128177",
  6. "content" : "一个轻巧的vim下的翻译和发音插件,依赖于 google\u002Dtranslator\u002Dcli,或者其他的命令行翻译,查询工具。发音取自google...\u000D\u000A\u000D\u000Ahttps://github.com/farseer90718/vim\u002Dtranslator\u000D\u000A\u000D\u000A功能比较简单。暂时只是实现了个人的需求...",
  7. "content_rendered" : "一个轻巧的vim下的翻译和发音插件,依赖于 google\u002Dtranslator\u002Dcli,或者其他的命令行翻译,查询工具。发音取自google...\u003Cbr /\u003E\u003Cbr /\u003E\u003Ca target\u003D\u0022_blank\u0022 href\u003D\u0022https://github.com/farseer90718/vim\u002Dtranslator\u0022 rel\u003D\u0022nofollow\u0022\u003Ehttps://github.com/farseer90718/vim\u002Dtranslator\u003C/a\u003E\u003Cbr /\u003E\u003Cbr /\u003E功能比较简单。暂时只是实现了个人的需求...",
  8. "replies" : 0,
  9. "member" : {
  10. "id" : 67060,
  11. "username" : "farseer2014",
  12. "tagline" : "",
  13. "avatar_mini" : "//cdn.v2ex.com/avatar/6766/2b3d/67060_mini.png?m=1408121347",
  14. "avatar_normal" : "//cdn.v2ex.com/avatar/6766/2b3d/67060_normal.png?m=1408121347",
  15. "avatar_large" : "//cdn.v2ex.com/avatar/6766/2b3d/67060_large.png?m=1408121347"
  16. },
  17. "node" : {
  18. "id" : 17,
  19. "name" : "create",
  20. "title" : "分享创造",
  21. "title_alternative" : "Create",
  22. "url" : "http://www.v2ex.com/go/create",
  23. "topics" : 2621,
  24. "avatar_mini" : "//cdn.v2ex.com/navatar/70ef/df2e/17_mini.png?m=1388448923",
  25. "avatar_normal" : "//cdn.v2ex.com/navatar/70ef/df2e/17_normal.png?m=1388448923",
  26. "avatar_large" : "//cdn.v2ex.com/navatar/70ef/df2e/17_large.png?m=1388448923"
  27. },
  28. "created" : 1408122614,
  29. "last_modified" : 1408122614,
  30. "last_touched" : 1408122434
  31. }
  32. ]

取热议主题

/api/topics/hot.json

  1. [
  2. {
  3. "id" : 130248,
  4. "title" : "今晚罗永浩和王自如优酷对质,大家预测谁会赢?",
  5. "url" : "http://www.v2ex.com/t/130248",
  6. "content" : "世界杯后遗症……想预测结果\u000D\u000A\u000D\u000A附图,不知道能不能看到\u000D\u000Ahttp://ww2.sinaimg.cn/bmiddle/61c921e5jw1ejrbvfjdvej20ri1fmahf.jpg",
  7. "content_rendered" : "世界杯后遗症……想预测结果\u003Cbr /\u003E\u003Cbr /\u003E附图,不知道能不能看到\u003Cbr /\u003E\u003Ca target\u003D\u0022_blank\u0022 href\u003D\u0022http://ww2.sinaimg.cn/bmiddle/61c921e5jw1ejrbvfjdvej20ri1fmahf.jpg\u0022 target\u003D\u0022_blank\u0022\u003E\u003Cimg src\u003D\u0022http://ww2.sinaimg.cn/bmiddle/61c921e5jw1ejrbvfjdvej20ri1fmahf.jpg\u0022 class\u003D\u0022imgly\u0022 style\u003D\u0022max\u002Dwidth: 660px\u003B\u0022 border\u003D\u00220\u0022 /\u003E\u003C/a\u003E",
  8. "replies" : 218,
  9. "member" : {
  10. "id" : 52028,
  11. "username" : "sniper1211",
  12. "tagline" : "",
  13. "avatar_mini" : "//cdn.v2ex.com/avatar/1574/5f4c/52028_mini.png?m=1396973137",
  14. "avatar_normal" : "//cdn.v2ex.com/avatar/1574/5f4c/52028_normal.png?m=1396973137",
  15. "avatar_large" : "//cdn.v2ex.com/avatar/1574/5f4c/52028_large.png?m=1396973137"
  16. },
  17. "node" : {
  18. "id" : 687,
  19. "name" : "smartisanos",
  20. "title" : "Smartisan OS",
  21. "title_alternative" : "Smartisan OS",
  22. "url" : "http://www.v2ex.com/go/smartisanos",
  23. "topics" : 97,
  24. "avatar_mini" : "//cdn.v2ex.com/navatar/7f5d/04d1/687_mini.png?m=1364402617",
  25. "avatar_normal" : "//cdn.v2ex.com/navatar/7f5d/04d1/687_normal.png?m=1364402617",
  26. "avatar_large" : "//cdn.v2ex.com/navatar/7f5d/04d1/687_large.png?m=1364402617"
  27. },
  28. "created" : 1409134584,
  29. "last_modified" : 1409149779,
  30. "last_touched" : 1409199522
  31. }
  32. ]

取主题信息

/api/topics/show.json

参数 
id主题id(必选)
  1. [{
  2. "id" : 1000,
  3. "title" : "Google App Engine x MobileMe",
  4. "url" : "http://www.v2ex.com/t/1000",
  5. "content" : "从现在开始,新上传到 V2EX 的头像将存储在 MobileMe iDisk 中。这是 V2EX 到目前为之所用到的第三个云。\u000D\u000A\u000D\u000A得益于这个架构升级,现在头像上传之后,将立刻在全站的所有页面更新。",
  6. "content_rendered" : "从现在开始,新上传到 V2EX 的头像将存储在 MobileMe iDisk 中。这是 V2EX 到目前为之所用到的第三个云。\u000D\u000A\u003Cbr /\u003E\u000D\u000A\u003Cbr /\u003E得益于这个架构升级,现在头像上传之后,将立刻在全站的所有页面更新。",
  7. "replies" : 14,
  8. "member" : {
  9. "id" : 1,
  10. "username" : "Livid",
  11. "tagline" : "Beautifully Advance",
  12. "avatar_mini" : "//cdn.v2ex.com/avatar/c4ca/4238/1_mini.png?m=1401650222",
  13. "avatar_normal" : "//cdn.v2ex.com/avatar/c4ca/4238/1_normal.png?m=1401650222",
  14. "avatar_large" : "//cdn.v2ex.com/avatar/c4ca/4238/1_large.png?m=1401650222"
  15. },
  16. "node" : {
  17. "id" : 1,
  18. "name" : "babel",
  19. "title" : "Project Babel",
  20. "url" : "http://www.v2ex.com/go/babel",
  21. "topics" : 1102,
  22. "avatar_mini" : "//cdn.v2ex.com/navatar/c4ca/4238/1_mini.png?m=1370299418",
  23. "avatar_normal" : "//cdn.v2ex.com/navatar/c4ca/4238/1_normal.png?m=1370299418",
  24. "avatar_large" : "//cdn.v2ex.com/navatar/c4ca/4238/1_large.png?m=1370299418"
  25. },
  26. "created" : 1280192329,
  27. "last_modified" : 1335004238,
  28. "last_touched" : 1280285385
  29. }]

根据提供信息取主题

/api/topics/show.json

参数(选其一) 
username根据用户名取该用户所发表主题
node_id根据节点id取该节点下所有主题
node_name根据节点名取该节点下所有主题

Replies

取主题回复

/api/replies/show.json

参数 
topic_id主题id(必选)
page 
page_size 
  1. [
  2. {
  3. "id" : 1,
  4. "thanks" : 5,
  5. "content" : "很高兴看到 v2ex 又回来了,等了你半天发第一贴了,憋死我了。\u000D\u000A\u000D\u000Anice work~",
  6. "content_rendered" : "很高兴看到 v2ex 又回来了,等了你半天发第一贴了,憋死我了。\u003Cbr /\u003E\u003Cbr /\u003Enice work~",
  7. "member" : {
  8. "id" : 4,
  9. "username" : "Jay",
  10. "tagline" : "",
  11. "avatar_mini" : "//cdn.v2ex.com/avatar/a87f/f679/4_mini.png?m=1325831331",
  12. "avatar_normal" : "//cdn.v2ex.com/avatar/a87f/f679/4_normal.png?m=1325831331",
  13. "avatar_large" : "//cdn.v2ex.com/avatar/a87f/f679/4_large.png?m=1325831331"
  14. },
  15. "created" : 1272207477,
  16. "last_modified" : 1335092176
  17. }
  18. ]

Members

取用户信息

/api/members/show.json

参数 
username用户名(必选)
  1. {
  2. "status" : "found",
  3. "id" : 16147,
  4. "url" : "http://www.v2ex.com/member/djyde",
  5. "username" : "djyde",
  6. "website" : "https://djyde.github.io",
  7. "twitter" : "",
  8. "location" : "",
  9. "tagline" : "",
  10. "bio" : "喜欢摄影和写作的程序员。",
  11. "avatar_mini" : "//cdn.v2ex.com/avatar/ed4c/1b66/16147_mini.png?m=1329639748",
  12. "avatar_normal" : "//cdn.v2ex.com/avatar/ed4c/1b66/16147_normal.png?m=1329639748",
  13. "avatar_large" : "//cdn.v2ex.com/avatar/ed4c/1b66/16147_large.png?m=1329639748",
  14. "created" : 1328075793
  15. }
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/627370
推荐阅读
  

闽ICP备14008679号