[关闭]
@sewise-dev 2019-04-22T07:59:42.000000Z 字数 4666 阅读 594

飞派学院api接口文档

飞派


更新历史

编号 版本 说明 作者 日期
1 v1.0 1.创建文档 Seven 2019-04-17


目录


【备注】

1. 全局返回码说明

每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回码信息调试接口,排查错误。

返回码 说明
-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}
}


1.比赛

1.1 报名(新增/编辑)

接口地址

/v1/matchApi/signUp

HTTP Content-Type / 请求方式

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(编辑时必传)
HTTP 响应状态

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": "操作成功"
}

1.2 赛事列表

接口地址

/v1/matchApi/list

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
page Integer 页数
pageSize Integer 页码
order String 排序mchId DESC
q String 搜索关键词
startDate String 开始时间
endDate String 开始时间
HTTP 响应状态

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
}
]
}
}

1.3 赛事详情

接口地址

/v1/matchApi/info/{mchId}

HTTP Content-Type / 请求方式

application/json
GET

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mchId Integer 赛事索引id
HTTP 响应状态

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束带结发是李方军

"
}
}

1.4 项目列表

接口地址

/v1/matchEventApi/list

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mchId Integer 赛事索引id
q String 搜索关键词
HTTP 响应状态

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
}
]
}
}

1.5 项目详情

接口地址

/v1/matchEventApi/info/{mcheId}

HTTP Content-Type / 请求方式

application/json
GET

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mcheId Integer 项目索引id
HTTP 响应状态

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"
}
}

1.6 我的报名

接口地址

/v1/matchApi/MyEntryList

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
role Integer 角色:1.选手 2.裁判
HTTP 响应状态

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"
}
]
}
}

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注