V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
tonghuashuai
V2EX  ›  问与答

有两个移动 API 的问题烦请各位指导一下

  •  
  •   tonghuashuai · Oct 20, 2014 · 2496 views
    This topic created in 4215 days ago, the information mentioned may be changed or developed.

    我在做一个网站,现在要提供移动端接口

    1. 手机 API 的登录验证通用的方法有哪些啊,查了一下都是介绍 OAuth 的
    2. API 的版本怎么管理?现在的移动端要修改很多接口,那就需要在一个 app 中同时使用老版和新版接口,初步想法如下:

      http://mobile.xxx.com/v1/xxx 代表第一版
      http://mobile.xxx.com/v2/xxx 代表第二版

    不知道这样会不会很山寨

    2 replies    2014-10-20 12:56:05 +08:00
    icanfork
        1
    icanfork  
       Oct 20, 2014
    /api/2/user
    humiaozuzu
        2
    humiaozuzu  
       Oct 20, 2014
    1. 嫌麻烦就用网站通用的 cookie,不嫌麻烦就 oauth2
    2. 大版本 versioning 用 api.xxx.com/v1/
    小版本的 versioning 用 api.xxx.com/v1/notifications_v1_2
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   796 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 22:07 · PVG 06:07 · LAX 15:07 · JFK 18:07
    ♥ Do have faith in what you're doing.