Livid
378.3D
538.42D

Project Babel API 讨论

  •  
  •   Livid ·
    PRO
    · Jul 24, 2010 · 4958 views
    This topic created in 5834 days ago, the information mentioned may be changed or developed.
    用这个帖子来讨论一下大家希望看到的 API 接口吧。

    这是目前有的 3 个:

    http://v2ex.appspot.com/api/stats
    http://v2ex.appspot.com/member/Livid.json
    http://v2ex.appspot.com/n/babel.json
    4 replies    1970-01-01 08:00:00 +08:00
    Sai
        1
    Sai  
       Jul 24, 2010
    我觉得api命名太过分数,统一到/api下也方便以后分布式扩展吧
    Livid
        2
    Livid  
    MOD
    OP
    PRO
       Jul 24, 2010
    嗯,那么关于 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
        3
    darcy  
       Jul 24, 2010
    可以这样吗?
    /api/users/username[.json|.xml]
    /api/topics/id[.json|.xml]
    darcy
        4
    darcy  
       Jul 24, 2010
    既然都是show,那就能不能不show
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4230 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 05:30 · PVG 13:30 · LAX 22:30 · JFK 01:30
    ♥ Do have faith in what you're doing.