Changes between Version 1 and Version 2 of pconline_3.6.0/intf


Ignore:
Timestamp:
08/16/2013 02:19:41 PM (13 years ago)
Author:
leijingtang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pconline_3.6.0/intf

    v1 v2  
    1 todo 
     1=== 1.基本约定 === 
     2{{{ 
     31.当接口处理正常时,HTTP STATUS CODE 返回给200。包括有正常的业务数据和数据为空的情况。 
     4 
     52.当接口处理异常时,HTTP STATUS CODE 返回给500,并且给出具体的错误信息。 
     6    { 
     7        "uri" : "/intf/albums-by-type.jsp", 
     8        "error-desc":"Need you follow uid.", 
     9        "user-notice":"给用户的提示放在这里" 
     10    } 
     11 
     12     
     133.接口默认的字符编码是UTF-8,接口需要实现对req-enc和resp-enc参数的支持。在JSP的最顶部,实现类似下面的代码: 
     14 
     15        String queryString = request.getQueryString(); 
     16        String requestEncoding = getParam(queryString,"req_enc"); 
     17        String responseEncoding = getParam(queryString,"resp_enc"); 
     18        if(isNotBlank(requestEncoding)){ 
     19            request.setCharacterEncoding(requestEncoding); 
     20        } 
     21        if(isNotBlank(responseEncoding)){ 
     22            response.setCharacterEncoding(responseEncoding); 
     23        } 
     24 
     254.所有有写操作的数据接口,必须用POST方式提交,在接口里需要判断提交方式,拒绝GET的调用请求。 
     26 
     275.接口中的JSON字符串,key都用双引号("")包裹,value是字符串类型时,也用双引号("")包裹;是数字类型时,不用引号。 
     28 
     29}}} 
     30 
     31 
     32== 2.接口列表 == 
     33 
     34=== 2.1 [=#point201 资讯栏目]=== 
     35{{{ 
     36参考:http://trac.pc.com.cn/iphone/wiki/pcauto_pconline_4.0.0/intf#point202 
     37}}} 
     38 
     39=== 2.2 [=#point202 同步内容下载]=== 
     40 
     41=== 2.3 [=#point201 同步内容上传]=== 
     42 
     43=== 2.4 [=#point201 帖子页]=== 
     44 
     45=== 2.5 [=#point201 帖子列表]=== 
     46 
     47=== 2.6 [=#point201 帖子页回复楼层]=== 
     48 
     49=== 2.7 [=#point201 图集列表]=== 
     50 
     51=== 2.8 [=#point201 专栏]=== 
     52 
     53=== 2.9 [=#point201 文章]=== 
     54 
     55=== 2.10 [=#point201 获取用户信息]=== 
     56 
     57=== 2.11 [=#point201 用户体验计划]=== 
     58 
     59=== 2.12 [=#point201 产品库产品分类重构]=== 
     60