Skip to content
ruirui edited this page Aug 16, 2015 · 8 revisions

SERVER API

RESTFUL

  • input: POST JSON String $req
  • output: JSON String $resp

使用 GET / POST / PUT / DELETE

  • /ucapi/circle (GET)
  • /ucapi/circle/user_id/self (GET)
  • /ucapi/circle/user_id/friend (GET)
  • /ucapi/feed (CR)
  • /ucapi/feed/:feed_id (URD)
  • /ucapi/like/
  • /ucapi/reply
  • /ucapi/message

format:

  • $resp['h'] - header. key/value array, for response headers information

  • $resp['h']['ret'] - error number. 0 for succ, others means error. error code is predefined in both js & php

  • $resp['b'] - body. array, for response information. could be an array of [] or {}

userinfo:
{
  "id":1,
  "name":"blues",
  "nick":"阿布",
  "avatar":"http://17salsa.com/center/data/avatar/000/00/00/01_real_avatar_small.jpg",
  "sex":1 // male
}
Clone this wiki locally