[关闭]
@chenwei123 2016-06-27T03:17:51.000000Z 字数 1565 阅读 632

EduCloud

edu


1. 查看个人信息

Description

用户查询个人资料

Method and URL Structure

Method Resource URL
GET /users/get_user_info/

Request Parameters

Name Description Required Default
username 用户账号 Yes
password 用户密码 Yes

cURL Example

  1. http://127.0.0.1:8000/educloud/users/get_user_info/?username=15670502158&password=123456

Response Parameters

Name Description
ret 标示是否成功。ok, 成功; failed, 失败
reason 返回信息(失败原因或成功通知 )
item 返回个人信息

JSON Response

  1. {
  2. "item": {
  3. "major": "",
  4. "thumb": "http://ww1.sinaimg.cn/crop.0.0.1080.1080.1024/006cxmWbjw8evactf4t2ij30u00u0jtj.jpg",
  5. "show": "no",
  6. "mobile": "15201052252",
  7. "description": "",
  8. "sex": "female",
  9. "address": "河南省永城市",
  10. "position": "teacher",
  11. "banner": "http://ww1.sinaimg.cn/crop.0.0.1080.1080.1024/006cxmWbjw8evactf4t2ij30u00u0jtj.jpg",
  12. "name": "陈微"
  13. },
  14. "reason": "查看成功",
  15. "ret": "ok"
  16. }

2. 修改个人信息

Description

用户修改个人资料

Method and URL Structure

Method Resource URL
GET /users/update_user_info/

Request Parameters

Name Description Required Default
username 用户账号 Yes
password 用户密码 Yes
name 用户姓名 No
sex 用户性别 No
mobile 用户手机号 NO
address 用户住址 NO
thumb 用户头像 NO
banner 老师banner No
description 老师简介 No
major 老师专业 No

cURL Example

  1. http://127.0.0.1:8000/educloud/users/update_user_info/?username=15201052252&password=123456&name=陈微

Response Parameters

Name Description
ret 标示是否成功。ok, 成功; failed, 失败
reason 返回信息(失败原因或成功通知 )
item 返回个人信息

JSON Response

  1. {
  2. "item": {
  3. "major": "",
  4. "thumb": "http://ww1.sinaimg.cn/crop.0.0.1080.1080.1024/006cxmWbjw8evactf4t2ij30u00u0jtj.jpg",
  5. "show": "no",
  6. "mobile": "15201052252",
  7. "description": "",
  8. "sex": "female",
  9. "address": "河南省永城市",
  10. "position": "teacher",
  11. "banner": "http://ww1.sinaimg.cn/crop.0.0.1080.1080.1024/006cxmWbjw8evactf4t2ij30u00u0jtj.jpg",
  12. "name": "陈微"
  13. },
  14. "reason": "查看成功",
  15. "ret": "ok"
  16. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注