百步梯

注:所有请求的header加上uuid,如{'uuid':1},表示用id=1的用户的身份,

返回status=1表示请求成功,0表示失败,msg为请求结果, data为数据


文章

1. 发布文章 http://localhost:8000/api/article  POST

参数

content:sdddsdsasad  文章内容

title:sdsdssd 标题

返回: 

{'status'=>1,'msg'=>'修改成功','data'=>$article} data为保存的文章信息


2. 更新文章 http://localhost:8000/api/article/id    (id为文章的id)  PUT

参数

content:sdddsdsasad  文章内容

title:sdsdssd 标题

3. 文章列表 http://superlin.cc:8000/api/article GET 20篇文章一页

参数:

page:1 第几页

follow:0、1 是否只看用户关注的人的文章

4.文章详情 http://superlin.cc:8000/api/article/id   (id为文章id) GET

5.删除文章 http://superlin.cc:8000/api/article/id  DELETE


个人资料

1.详情  http://superlin.cc:8000/api/profile/id (id为用户id) GET

{

"status": 1,

"data": {

"id": 1,

"name": "LinSuper",

"email": "scut_linchao@163.com",

"created_at": "2016-10-17 03:50:00",

"updated_at": "2016-10-17 06:15:39",

"follower_count": "1", 粉丝数

"followee_count": "1", 关注数

"profile": {   

"id": 1,

"user_id": "1",

"image_url": "hehhe",

"desc": "sdsdsd",

"created_at": "2016-10-17 17:32:16",

"updated_at": "2016-10-17 17:32:16"

}

}

}

2.编辑  http://superlin.cc:8000/api/profile   POST

参数

image_url : "http://sdsdd.png" 头像

desc: "test" 个人简介


文件上传

1.上传 http://superlin.cc:8000/api/fileUpload  POST

参数

file : 文件

返回

{

"url": "file/0034590d867a6afea30ea1adad8fba6a.png", 

"status": 1

}



关注

1.关注  http://localhost:8000/api/follow  POST

参数

user_id 要关注的用户的id


2.取消关注  http://localhost:8000/api/unfollow  POST

参数

user_id 要取消关注的用户的id

3. 获取关注列表 http://localhost:8000/api/followerList   GET

参数

user_id 要查询的用户的id

page 列表第几页

4. 获取关注列表 http://localhost:8000/api/followeeList  GET

参数

user_id 要查询的用户的id

page 列表第几页



文章评论

1.发表 http://localhost:8000/api/article/id/comment   (id为文章id) POST

参数

content:评论内容

reply_comment_id:回复评论的id,可不传

2. 获取文章评论 http://localhost:8000/api/article/id/comments   GET

参数

page:第几页


点赞

1. http://localhost:8000/api/like  POST

参数

article_id:文章id


收藏

http://superlin.cc:8000/api/backup POST

参数

article_id:文章id

收藏文章的列表

http://superlin.cc:8000/api/backup/articles  GET

参数

page: 第几页


消息

1. 获取系统通知 http://superlin.cc:8000/api/message?type=unread  GET 未读消息

http://superlin.cc:8000/api/message?type=all GET 所有消息

2. 将所有系统消息标记为已读

http://superlin.cc:8000/api/message/clear PUT

3. 发送私信 http://superlin.cc:8000/api/message/send  POST

参数

user_id 要发送的用户id

content 要发送的文本

4. 接受未读私信 http://superlin.cc:8000/api/message/receive GET

5. 将未读私信标记为已读,用于接收到私信后回调

http://superlin.cc:8000/api/message/confirmChatMessage?message_id=a14e28d3-7098-44ba-a449-0fd443815c2c  GET

参数

message_id 消息的id,可以有多条,用“,”分割开,例如message_id=a14e28d3-7098-44ba-a449-0fd443815c2c,a14e28d3-7098-44ba-a449-0fd443815c2c

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,915评论 18 139
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,242评论 25 708
  • sqlmap用户手册 说明:本文为转载,对原文中一些明显的拼写错误进行修正,并标注对自己有用的信息。 ======...
    wind_飘阅读 2,098评论 0 5
  • http://192.168.136.131/sqlmap/mysql/get_int.php?id=1 当给sq...
    xuningbo阅读 10,421评论 2 22
  • Cocoapods 安装 1、$sudo gem installcocoa pods 出现问题:ERROR: Er...
    那是什么阅读 273评论 0 0