Project Babel API 讨论

2010-07-24 01:16:12 +08:00
 Livid
用这个帖子来讨论一下大家希望看到的 API 接口吧。

这是目前有的 3 个:

http://v2ex.appspot.com/api/stats
http://v2ex.appspot.com/member/Livid.json
http://v2ex.appspot.com/n/babel.json
4071 次点击
所在节点    Project Babel
4 条回复
Sai
2010-07-24 01:21:02 +08:00
我觉得api命名太过分数,统一到/api下也方便以后分布式扩展吧
Livid
2010-07-24 01:25:52 +08:00
嗯,那么关于 URL 规则,我目前想到的:

/api/users/show.json?username=Livid
/api/users/show.json?id=1

/api/nodes/show.json?name=babel
/api/nodes/show.json?id=1
/api/nodes/show.json?all=yes

/api/topics/show.json?id=1
/api/topics/show.json?node_id=1
/api/topics/show.json?node_id=1&page=1

/api/replies/show.json?id=1
/api/replies/show.json?topic_id=1
darcy
2010-07-24 01:31:24 +08:00
可以这样吗?
/api/users/username[.json|.xml]
/api/topics/id[.json|.xml]
darcy
2010-07-24 01:31:53 +08:00
既然都是show,那就能不能不show

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/832

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX