└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # V2EX Non-official API list 2 | V2EX非官方API列表,仅供参考,欢迎补充。 3 | 4 | # Site 5 | 6 | ### 取网站信息 7 | 8 | **/api/site/info.json** 9 | 10 | ``` 11 | { 12 | "title" : "V2EX", 13 | "slogan" : "way to explore", 14 | "description" : "创意工作者们的社区", 15 | "domain" : "www.v2ex.com" 16 | } 17 | ``` 18 | 19 | ### 取网站状态 20 | 21 | **/api/site/stats.json** 22 | 23 | ``` 24 | { 25 | "topic_max" : 126172, 26 | "member_max" : 71033 27 | } 28 | ``` 29 | 30 | # Node 31 | 32 | ### 取所有节点 33 | 34 | **/api/nodes/all.json** 35 | 36 | ``` 37 | [ 38 | 39 | { 40 | "id" : 1, 41 | "name" : "babel", 42 | "url" : "http://www.v2ex.com/go/babel", 43 | "title" : "Project Babel", 44 | "title_alternative" : "Project Babel", 45 | "topics" : 1102, 46 | "header" : "Project Babel \u002D 帮助你在云平台上搭建自己的社区", 47 | "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 获取。", 48 | "created" : 1272206882 49 | } 50 | ] 51 | ``` 52 | 53 | ### 取节点信息 54 | 55 | **/api/nodes/show.json** 56 | 57 | | 参数(选其一) | | 58 | | ------------- | ------------- | 59 | | id | 节点id | 60 | | name | 节点名 | 61 | 62 | 63 | ``` 64 | { 65 | "id" : 2, 66 | "name" : "v2ex", 67 | "url" : "http://www.v2ex.com/go/v2ex", 68 | "title" : "V2EX", 69 | "title_alternative" : "V2EX", 70 | "topics" : 2000, 71 | 72 | "header" : "这里讨论和发布关于 V2EX 站点发展。", 73 | 74 | 75 | "footer" : null, 76 | 77 | "created" : 1272207021 78 | } 79 | ``` 80 | 81 | # Topic 82 | 83 | ### 取最新主题 84 | 85 | **/api/topics/latest.json** 86 | 87 | ``` 88 | [ 89 | 90 | { 91 | "id" : 128177, 92 | "title" : "vim\u002Dtranslator", 93 | "url" : "http://www.v2ex.com/t/128177", 94 | "content" : "一个轻巧的vim下的翻译和发音插件,依赖于 google\u002Dtranslator\u002Dcli,或者其他的命令行翻译,查询工具。发音取自google...\u000D\u000A\u000D\u000Ahttps://github.com/farseer90718/vim\u002Dtranslator\u000D\u000A\u000D\u000A功能比较简单。暂时只是实现了个人的需求...", 95 | "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功能比较简单。暂时只是实现了个人的需求...", 96 | "replies" : 0, 97 | "member" : { 98 | "id" : 67060, 99 | "username" : "farseer2014", 100 | "tagline" : "", 101 | "avatar_mini" : "//cdn.v2ex.com/avatar/6766/2b3d/67060_mini.png?m=1408121347", 102 | "avatar_normal" : "//cdn.v2ex.com/avatar/6766/2b3d/67060_normal.png?m=1408121347", 103 | "avatar_large" : "//cdn.v2ex.com/avatar/6766/2b3d/67060_large.png?m=1408121347" 104 | }, 105 | "node" : { 106 | "id" : 17, 107 | "name" : "create", 108 | "title" : "分享创造", 109 | "title_alternative" : "Create", 110 | "url" : "http://www.v2ex.com/go/create", 111 | "topics" : 2621, 112 | "avatar_mini" : "//cdn.v2ex.com/navatar/70ef/df2e/17_mini.png?m=1388448923", 113 | "avatar_normal" : "//cdn.v2ex.com/navatar/70ef/df2e/17_normal.png?m=1388448923", 114 | "avatar_large" : "//cdn.v2ex.com/navatar/70ef/df2e/17_large.png?m=1388448923" 115 | }, 116 | "created" : 1408122614, 117 | "last_modified" : 1408122614, 118 | "last_touched" : 1408122434 119 | } 120 | ] 121 | ``` 122 | 123 | ### 取热议主题 124 | 125 | **/api/topics/hot.json** 126 | ``` 127 | [ 128 | 129 | { 130 | "id" : 130248, 131 | "title" : "今晚罗永浩和王自如优酷对质,大家预测谁会赢?", 132 | "url" : "http://www.v2ex.com/t/130248", 133 | "content" : "世界杯后遗症……想预测结果\u000D\u000A\u000D\u000A附图,不知道能不能看到\u000D\u000Ahttp://ww2.sinaimg.cn/bmiddle/61c921e5jw1ejrbvfjdvej20ri1fmahf.jpg", 134 | "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", 135 | "replies" : 218, 136 | "member" : { 137 | "id" : 52028, 138 | "username" : "sniper1211", 139 | "tagline" : "", 140 | "avatar_mini" : "//cdn.v2ex.com/avatar/1574/5f4c/52028_mini.png?m=1396973137", 141 | "avatar_normal" : "//cdn.v2ex.com/avatar/1574/5f4c/52028_normal.png?m=1396973137", 142 | "avatar_large" : "//cdn.v2ex.com/avatar/1574/5f4c/52028_large.png?m=1396973137" 143 | }, 144 | "node" : { 145 | "id" : 687, 146 | "name" : "smartisanos", 147 | "title" : "Smartisan OS", 148 | "title_alternative" : "Smartisan OS", 149 | "url" : "http://www.v2ex.com/go/smartisanos", 150 | "topics" : 97, 151 | "avatar_mini" : "//cdn.v2ex.com/navatar/7f5d/04d1/687_mini.png?m=1364402617", 152 | "avatar_normal" : "//cdn.v2ex.com/navatar/7f5d/04d1/687_normal.png?m=1364402617", 153 | "avatar_large" : "//cdn.v2ex.com/navatar/7f5d/04d1/687_large.png?m=1364402617" 154 | }, 155 | "created" : 1409134584, 156 | "last_modified" : 1409149779, 157 | "last_touched" : 1409199522 158 | } 159 | ] 160 | ``` 161 | 162 | ### 取主题信息 163 | 164 | **/api/topics/show.json** 165 | 166 | | 参数 | | 167 | | ------------- | ------------- | 168 | | id | 主题id(必选) | 169 | 170 | ``` 171 | [{ 172 | 173 | "id" : 1000, 174 | "title" : "Google App Engine x MobileMe", 175 | "url" : "http://www.v2ex.com/t/1000", 176 | "content" : "从现在开始,新上传到 V2EX 的头像将存储在 MobileMe iDisk 中。这是 V2EX 到目前为之所用到的第三个云。\u000D\u000A\u000D\u000A得益于这个架构升级,现在头像上传之后,将立刻在全站的所有页面更新。", 177 | "content_rendered" : "从现在开始,新上传到 V2EX 的头像将存储在 MobileMe iDisk 中。这是 V2EX 到目前为之所用到的第三个云。\u000D\u000A\u003Cbr /\u003E\u000D\u000A\u003Cbr /\u003E得益于这个架构升级,现在头像上传之后,将立刻在全站的所有页面更新。", 178 | "replies" : 14, 179 | "member" : { 180 | "id" : 1, 181 | "username" : "Livid", 182 | "tagline" : "Beautifully Advance", 183 | "avatar_mini" : "//cdn.v2ex.com/avatar/c4ca/4238/1_mini.png?m=1401650222", 184 | "avatar_normal" : "//cdn.v2ex.com/avatar/c4ca/4238/1_normal.png?m=1401650222", 185 | "avatar_large" : "//cdn.v2ex.com/avatar/c4ca/4238/1_large.png?m=1401650222" 186 | }, 187 | "node" : { 188 | "id" : 1, 189 | "name" : "babel", 190 | "title" : "Project Babel", 191 | "url" : "http://www.v2ex.com/go/babel", 192 | "topics" : 1102, 193 | "avatar_mini" : "//cdn.v2ex.com/navatar/c4ca/4238/1_mini.png?m=1370299418", 194 | "avatar_normal" : "//cdn.v2ex.com/navatar/c4ca/4238/1_normal.png?m=1370299418", 195 | "avatar_large" : "//cdn.v2ex.com/navatar/c4ca/4238/1_large.png?m=1370299418" 196 | }, 197 | "created" : 1280192329, 198 | "last_modified" : 1335004238, 199 | "last_touched" : 1280285385 200 | 201 | }] 202 | ``` 203 | 204 | ### 根据提供信息取主题 205 | 206 | **/api/topics/show.json** 207 | 208 | | 参数(选其一) | | 209 | | ------------- | ------------- | 210 | | username | 根据用户名取该用户所发表主题 | 211 | | node_id | 根据节点id取该节点下所有主题 | 212 | | node_name | 根据节点名取该节点下所有主题 | 213 | 214 | 215 | # Replies 216 | 217 | ### 取主题回复 218 | 219 | **/api/replies/show.json** 220 | 221 | | 参数 | | 222 | | ------------- | ------------- | 223 | | topic_id | 主题id(必选) | 224 | | page | | 225 | | page_size | | 226 | 227 | ``` 228 | [ 229 | 230 | { 231 | "id" : 1, 232 | "thanks" : 5, 233 | "content" : "很高兴看到 v2ex 又回来了,等了你半天发第一贴了,憋死我了。\u000D\u000A\u000D\u000Anice work~", 234 | "content_rendered" : "很高兴看到 v2ex 又回来了,等了你半天发第一贴了,憋死我了。\u003Cbr /\u003E\u003Cbr /\u003Enice work~", 235 | "member" : { 236 | "id" : 4, 237 | "username" : "Jay", 238 | "tagline" : "", 239 | "avatar_mini" : "//cdn.v2ex.com/avatar/a87f/f679/4_mini.png?m=1325831331", 240 | "avatar_normal" : "//cdn.v2ex.com/avatar/a87f/f679/4_normal.png?m=1325831331", 241 | "avatar_large" : "//cdn.v2ex.com/avatar/a87f/f679/4_large.png?m=1325831331" 242 | }, 243 | "created" : 1272207477, 244 | "last_modified" : 1335092176 245 | } 246 | ] 247 | ``` 248 | 249 | # Members 250 | 251 | ### 取用户信息 252 | 253 | **/api/members/show.json** 254 | 255 | | 参数 | | 256 | | ------------- | ------------- | 257 | | username | 用户名(必选) | 258 | 259 | ``` 260 | { 261 | "status" : "found", 262 | "id" : 16147, 263 | "url" : "http://www.v2ex.com/member/djyde", 264 | "username" : "djyde", 265 | "website" : "https://djyde.github.io", 266 | "twitter" : "", 267 | "location" : "", 268 | "tagline" : "", 269 | "bio" : "喜欢摄影和写作的程序员。", 270 | "avatar_mini" : "//cdn.v2ex.com/avatar/ed4c/1b66/16147_mini.png?m=1329639748", 271 | "avatar_normal" : "//cdn.v2ex.com/avatar/ed4c/1b66/16147_normal.png?m=1329639748", 272 | "avatar_large" : "//cdn.v2ex.com/avatar/ed4c/1b66/16147_large.png?m=1329639748", 273 | "created" : 1328075793 274 | } 275 | ``` 276 | --------------------------------------------------------------------------------