@sewise-dev
2019-04-17T02:23:52.000000Z
字数 8005
阅读 532
飞派
编号 | 版本 | 说明 | 作者 | 日期 |
---|---|---|---|---|
1 | v1.0 | 1.创建文档 | Seven | 2019-04-16 |
每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回码信息调试接口,排查错误。
返回码 | 说明 |
---|---|
-1 | 系统繁忙,此时请开发者稍候再试 |
0 | 请求失败 |
1 | 请求成功 |
200 | 响应成功 |
403 | 禁止访问 |
404 | 异常错误 |
500 | 数据验证错误 |
40001 | 不合法的凭证,或者access_token无效。 |
40004 | 不合法请求 |
HTTP请求状态返回格式
返回字段 | 字段类型 | 说明 |
---|---|---|
status | Integer | 请求返回码(详细请见状态表) |
message | String | 返回描述 |
data | Array | 返回结果 |
错误样例
{
"status": 40013,
"message": {"0":"invalid appid"}
}
成功样例
{
"status": 200,
"data": {"access_token":"ACCESS_TOKEN","expires_in":7200}
}
/v1/matchWeb/statistics
application/json
GET
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/statistics
Response
{
"status": 200,
"data": {
"playersCount": 0,
"refereesCount": 0,
"todayCount": 0,
"signOutCount": 0
}
}
/v1/matchWeb/save
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mchId 否 Integer 赛事索引id(编辑时必传) mchName 是 String 赛事名称 startDate 是 String 赛事开始时间 endDate 是 String 赛事结束时间 cover 否 String 封面 place 否 String 比赛地点 introduce 否 String 赛事介绍 schedule 否 String 赛事日程
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/save
Response
{
"status": 200,
"message": "操作成功",
"data": []
}
/v1/matchWeb/list
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 page 否 Integer 页数 pageSize 否 Integer 页码 order 否 String 排序mchId DESC q 否 String 搜索关键词 startDate 否 String 开始时间 endDate 否 String 开始时间
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/list
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": 1,
"pagesize": 20,
"total_record": 2,
"record": [
{
"mchId": "2",
"mchName": "2019全国青少年无人机大赛2222",
"cover": "http://www.taobao.com/132323/231111111111111111111141.jpg",
"place": "深圳湾体育中心2",
"startDate": "2019-04-16 10:59:12",
"endDate": "2019-04-22 10:59:22",
"playersCount": 0,
"refereesCount": 0
},
{
"mchId": "1",
"mchName": "2019全国青少年无人机大赛",
"cover": "http://www.taobao.com/132323/2341.jpg",
"place": "深圳湾体育中心",
"startDate": "2019-04-16 10:59:12",
"endDate": "2019-04-22 10:59:22",
"playersCount": 0,
"refereesCount": 0
}
]
}
}
/v1/matchWeb/info/{mchId}
application/json
GET
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mchId 是 Integer 赛事索引id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/info/2
Response
{
"status": 200,
"data": {
"mchId": "2",
"mchName": "2019全国青少年无人机大赛2222",
"cover": "http://www.taobao.com/132323/231111111111111111111141.jpg",
"place": "深圳湾体育中心2",
"startDate": "2019-04-16 10:59:12",
"endDate": "2019-04-22 10:59:22",
"introduce": "2222222的世纪东方我单开放假是11111111111111111111111111111111111111111111两地分居哦是我介绍的飞机熬时间的会计师的分类铠甲书
",
"schedule": "22222222lio90w等死蜗牛的司法局《232isd9fsdfij束带结发是李方军
"
}
}
/v1/matchWeb/delete/{mchId}
application/json
GET
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mchId 是 Integer 赛事索引id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/delete/2
Response
{
"status": 200,
"message": "操作成功"
}
/v1/matchEventWeb/save
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mcheId 否 Integer 项目索引id(编辑时必传) mchId 是 Integer 赛事索引id mcheName 是 String 项目名称 startTime 否 String 开赛时间 registerFee 否 String 报名费
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchEventWeb/save
Response
{
"status": 200,
"message": "操作成功",
"data": []
}
/v1/matchEventWeb/list
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mchId 否 Integer 赛事索引id q 否 String 搜索关键词
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchEventWeb/list
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": 1,
"pagesize": 20,
"total_record": 2,
"record": [
{
"mcheId": "2",
"mcheName": "飞翼花式三角绕标赛",
"registerFee": "65.00",
"startTime": "2019-04-16 15:16:09",
"playerCount": 0,
"boysCount": 0,
"girlsCount": 0
},
{
"mcheId": "1",
"mcheName": "悬浮纸飞机绕标挑战赛",
"registerFee": "50.00",
"startTime": "2019-04-16 15:14:02",
"playerCount": 0,
"boysCount": 0,
"girlsCount": 0
}
]
}
}
/v1/matchEventWeb/info/{mcheId}
application/json
GET
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mcheId 是 Integer 项目索引id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchEventWeb/info/2
Response
{
"status": 200,
"data": {
"mcheId": "2",
"mchId": "1",
"mcheName": "飞翼花式三角绕标赛",
"registerFee": "65.00",
"startTime": "2019-04-16 15:16:09"
}
}
/v1/matchEventWeb/delete/{mcheId}
application/json
GET
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mcheId 是 Integer 项目索引id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchEventWeb/delete/2
Response
{
"status": 200,
"message": "操作成功"
}
/v1/refereeWeb/search
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 q 是 Integer 搜索关键词
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/refereeWeb/search
Response
{
"status": 200,
"data": [
{
"userId": "2199",
"username": "13715234552",
"trueName": "呵呵"
}
]
}
/v1/refereeWeb/save/{role}
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 role 是 Integer 角色:1.选手 2.裁判 mchId 是 Integer 赛事索引id mcheId 是 Integer 项目索引id uId 是 Integer 裁判userId sex 是 Integer 性别:0.男 1.女 birthday 否 String 生日(2019-04-16) unit 否 String 所属单位 mcheyId 否 String 参赛索引id(编辑时必传)
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/refereeWeb/save
Response
{
"status": 200,
"message": "操作成功"
}
/v1/refereeWeb/list/{role}
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 role 是 Integer 角色:1.选手 2.裁判 page 否 Integer 页数 pageSize 否 Integer 页码 order 否 String 排序mcheyId DESC q 否 String 搜索关键词 startDate 否 String 开始时间 endDate 否 String 结束时间 mchId 否 Integer 赛事索引id mcheId 否 Integer 项目索引id sex 否 Integer 性别:0.男 1.女 age 否 Integer 年龄
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/refereeWeb/list/2
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": 1,
"pagesize": 20,
"total_record": 1,
"record": [
{
"mcheyId": "4",
"userId": "2155",
"username": "18807531020",
"fullname": "18807531020",
"role": "2",
"sex": "0",
"mobile": "18888888888",
"birthday": "1989-04-16 00:00:00",
"age": "30",
"unit": "深圳中学",
"mchId": "1",
"mchName": "2019全国青少年无人机大赛",
"mcheId": "3",
"mcheName": "飞翼花式三角绕标赛",
"creationDate": "2019-04-16 18:11:28"
}
]
}
}
/v1/refereeWeb/delete/{mcheyId}
application/json
GET
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mcheyId 是 Integer 报名索引id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/refereeWeb/delete/2
Response
{
"status": 200,
"message": "操作成功"
}