导航栏: 首页 评论列表

API

默认分类 2013/12/19 01:35

Campus back-end API

General response objects

USER

{
    "id": "user id",
    "name": "nick name",
    "avatar": "avatar_url"
}

POST

{
    "id": "post id",
    "user": USER,
    "media_type": "text, photo, video, audio",
    "media_url": "media url",
    "thumbnail_url": "thumbnail url",
    "upyun_id": "upyun id",
    "title": "caption of this creation",
    "text": "text content",
    "time": "create time",
    "comments": LIST OF COMMENT,
    "likes": LIST OF LIKE,
    "is_commented": true,
    "is_liked": false
}

GROUP

{
    "id": "group id",
    "name": "group name",
    "sub_groups": LIST OF GROUP // TBD
}

USER_PROFILE

{
    "background_url" : "photos/videos url",
    "background_type" : "photo/video",
    "avatars": LIST OF PHOTO URL,
    "name": "nick name",
    "words": "short words",
    "school": "school name",
    "friends": LIST OF FRIEND,
    "following": LIST OF FOLLOWING USER,
    "follower": LIST OF FOLLOWER,
    "posts": LIST OF POSTS,
    "basic_info": {},
    "about_me": {},
    "topic_list": {}
}

CHATROOM

{
    "id": "chat id",
    "type": "user/group",
    "user_id": "user id",
    "group_id": "group id",
    "users": LIST OF USER
}

RESTful API list

GET /groups

LIST OF GROUP

GET /groups/{GID}

GROUP

GET /posts/geo/{GEO} OPEN

LIST OF POST

GET /posts/groups/{GID}

LIST OF POST

GET /posts/tags/{HTID}

LIST OF POST

GET /posts/{PID}

POST

POST /posts


GET /chats

GET /chats/{CID}

POST /chats/{CID}

GET /notification


POST /users/weibo

GET /users/verification_code

PUT /users

GET /users/{UID}

USER

GET /users/detail/{UID}

USER_DETAIL

POST /contacts/


GET /friends/{UID}


GET /follow/{UID}


>> 留言评论