0: 成功
1:失败
1 :以到达最后一页
2:成功且不是最后一页
0:没有内容
{
"Content-Type": "application/json"
}
请求
{
"username": "aaa",
"password": "123456"
}
响应
{
"message": "",
"status": 0
}
{
"message": "",
"status": 1,
"token": ""
}
{
"Content-Type": "application/json"
}
请求
{
"username": "aaa",
"password": "123456"
}
响应
{
"message": "",
"status": 0
}
{
"message": "",
"status": 1
}
headers
{
"Authorization": "passport token"
}
示例
{
"isPrivate": true,
"isStory": true,
"eventDate": "2019-11-22 11:00",
"content": "ccc",
"title": "ttt",
"placeNumber": 1
}
响应
{
"message": "",
"status": 1
}
示例 /api/ground/events?pageNumber=1&place=1
不加place参数返回所有地点的公开内容
响应:
{
"message": "",
"code": 0
}
{
"code": 1,
"events": [
{
"author": "aaa",
"content": "ccc",
"event_date": "2019-11-22 11:00",
"is_private": false,
"is_story": true,
"place_number": 1,
"post_date": "2019-11-22 11:00",
"title": "tttt",
"event_id": 2
},
{
"author": "aaa",
"content": "ccc",
"event_date": "2019-11-22 11:00",
"is_private": false,
"is_story": true,
"place_number": 1,
"post_date": "2019-11-22 11:00",
"title": "tttt",
"event_id": 1
}
],
"message": "已经是最后一页"
}
示例 /api/user/history?username=aaa&pageNumber=1 headers
{
"Authorization": "passport token"
}
响应
{
"code": 1,
"events": [
{
"author": "aaa",
"content": "ccc",
"event_date": "2019-11-22 11:00",
"is_private": false,
"is_story": true,
"place_number": 1,
"post_date": "2019-11-22 10:40",
"title": "tttt",
"event_id": 3
},
{
"author": "aaa",
"content": "ccc",
"event_date": "2019-11-22 11:00",
"is_private": false,
"is_story": true,
"place_number": 1,
"post_date": "2019-11-22 11:00",
"title": "tttt",
"event_id": 2
},
{
"author": "aaa",
"content": "ccc",
"event_date": "2019-11-22 11:00",
"is_private": true,
"is_story": true,
"place_number": 1,
"post_date": "2019-11-22 11:00",
"title": "tttt",
"event_id": 1
}
],
"message": "已经是最后一页"
}
{
"message": "",
"code": 0
}
headers
{
"Authorization": "passport token"
}
{
"eid":1,
"commentContent":"afwawfawfawf"
}
{
"message": "发送成功",
"status": 1
}
示例 /api/event/comments?eid=1
响应
{
"comments": [
{
"comment_author": "aaa",
"comment_content": "afwawfawfawf",
"title_of_event": "tttt"
},
{
"comment_author": "aaa",
"comment_content": "afwawfawfaaeaefaefwf",
"title_of_event": "tttt"
},
{
"comment_author": "aaa",
"comment_content": "afwawfawfaaeafawawfaefaefwf",
"title_of_event": "tttt"
}
],
"message": "获取成功",
"status": 1
}
{
"message": "",
"status": 0
}
示例 /api/user/comments?username=aaa
响应
{
"comments": [
{
"comment_author": "aaa",
"comment_content": "afwawfawfawf",
"title_of_event": "tttt"
},
{
"comment_author": "aaa",
"comment_content": "afwawfawfaaeaefaefwf",
"title_of_event": "tttt"
},
{
"comment_author": "aaa",
"comment_content": "afwawfawfaaeafawawfaefaefwf",
"title_of_event": "tttt"
}
],
"message": "获取成功",
"status": 1
}
{
"message": "",
"status": 0
}
{
"username": "aaa",
"password": "123456",
"newPassword": "12345"
}
响应
{
"message": "修改成功",
"status": 1
}
{
"message": "修改失败",
"status": 0
}
示例 : /api/username?username=aaa" 响应
{
"message": "用户名已存在",
"status": 0
}
{
"message": "用户名不能为空",
"status": 0
}
{
"message": "用户名可用",
"status": 1
}