@sewise-dev
2019-04-22T07:59:42.000000Z
字数 4666
阅读 594
飞派
编号 | 版本 | 说明 | 作者 | 日期 |
---|---|---|---|---|
1 | v1.0 | 1.创建文档 | Seven | 2019-04-17 |
每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回码信息调试接口,排查错误。
返回码 | 说明 |
---|---|
-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/matchApi/signUp
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 mchId 是 Integer 赛事索引id mcheId 是 Integer 项目索引id sex 否 Integer 性别:0.男 1.女 role 否 Integer 角色:1.选手 2.裁判 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/matchApi/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/matchApi/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/matchApi/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/matchApi/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/matchEventApi/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/matchEventApi/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/matchEventApi/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/matchEventApi/info/2
Response
{
"status": 200,
"data": {
"mcheId": "2",
"mchId": "1",
"mcheName": "飞翼花式三角绕标赛",
"registerFee": "65.00",
"startTime": "2019-04-16 15:16:09"
}
}
/v1/matchApi/MyEntryList
application/json
POST
参数 必选 类型 说明 RequestBody access_token 是 String 用户授权签名 role 否 Integer 角色:1.选手 2.裁判
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
message | String | 返回错误信息 |
data | Array | 返回结果 |
Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchApi/MyEntryList
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": 1,
"pagesize": 20,
"total_record": 1,
"record": [
{
"mcheyId": "6",
"userId": "2123",
"username": "18807530909",
"fullname": "18807530909",
"role": "1",
"sex": "0",
"mobile": "18666666666",
"birthday": "1995-04-16 00:00:00",
"age": "24",
"unit": "深圳中学2",
"mchId": "1",
"mchName": "2019全国青少年无人机大赛",
"mcheId": "3",
"mcheName": "飞翼花式三角绕标赛",
"creationDate": "2019-04-17 10:23:03"
}
]
}
}