@a5635268
2018-03-06T13:30:00.000000Z
字数 10507
阅读 3878
接口文档
参数默认都是必传的,非必传的会有说明
都是通过POST方式请求
成功的status状态都为0
api
http://gameapi.chamshare.cn/member/Publics/sendSms
params
{"mobile" : "18221998888"}
response
{
"status": 5,
"data": [],
"message": "手机号码格式不正确"
}
api
http://gameapi.chamshare.cn/member/Publics/getWxInfo
params
{
"code": "asdf",
}
response
{
"status": 0,
"data": {
// 微信的那堆用户数据
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/member/Publics/register
params
{
"open_id": "N5Jh)@8cyefL)+UAc5?7s&kfPcl*7*AM<K%PE(%JK*z4ivhA@E",
"nickname": "微信昵称",
"avatar": "微信头像",
"mobile": "17947654687",
"sex": 1 //1男2女,通过接口获得
}
response
{
"status": 0,
"data": {
"token": "386bXzjJW/hCecyJtniMLYr4nRVqynnNdArTZzQsAw" ,
"team_id": 1,
"role": 0 // 0吃瓜群众 1队长 2副队长 3队员
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/member/Publics/login
params
// 因为前端用了vue,其实这里也就是通过openid换取token的过程
// 前端得到token以后存在session里面,过期之后再去请求微信接口得到以下数据来换取token
{
"open_id": "jVc*Wg9*i4CND:at]r={XXDB&x]<6T3E6z17+s/egc(NA?l73u",
"nickname": "微信昵称", // 未免用户在微信端更新了自己的头像和昵称,所以再登录的时候同步一下;
"avatar": "微信头像"
}
response
{
"status": 0,
"data": {
"token": "386bXzjJW/hCecyJtniMLYr4nRVqynnNdArTZzQsAw" ,
"team_id": 1,
"role": 0 // 0吃瓜群众 1队长 2副队长 3队员
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/member/Member/profile
params
{
"token": "token",
"realname": "周孝刚2",
"idcard": "522730198802020056" //身份证号
}
数据太难造了,等测试的时候,直接读出来吧
api
http://gameapi.chamshare.cn/member/Member/myConcern
params
{
"token": "kkkk",
"page": 1, // 默认
"page_size": 20, //默认
"type" : // 0所有,1未开始,2进行中,3已结束
}
返回值和赛程列表一模一样
api
http://gameapi.chamshare.cn/member/Member/myMatch
params
{
"token": "kkkk",
"page": 1, // 默认
"page_size": 20, //默认
"type": 1, // 1待审核,2待比赛,3已结束
}
返回值和赛程列表一模一样,上面的状态值自己添加(选择的时候就已经知道是什么状态了)
api
http://gameapi.chamshare.cn/member/Member/myApply
params
{
"token": "kkkk",
}
response
{
"status": 0,
"data": [
{
"apply_id": 1,
"squad_id": 3,
"event_id": 3,
"event_name": "电竞跨年吃鸡夜",
"banner": "http://gamemp.chamshare.cn/d/file/content/2017/12/5a40c55100794.jpg",
"apply_status": 2, // 报名状态 1,正在进行中,2未开始,3已结束
"confirm_status": 0, // 0未审核 1已审核
"apply_status_text": "报名未开始"
}
],
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/member/Member/addComment
params
{
"token": "kkkk",
"object_id": 1, // 赛事或赛程ID
"comment_type": 2, // 评论类型, 1: 赛事. 2: 赛程
"content": "hahahahahah"
}
api
http://gameapi.chamshare.cn/member/Member/concernCourse
params
{
"token": "kkkk",
"course_id": 1, // 赛程ID
}
取消关注
api
http://gameapi.chamshare.cn/member/Member/unfollowCourse
params
{
"token": "kkkk",
"course_id": 1, // 赛程ID
}
api
http://gameapi.chamshare.cn/member/Member/commentList
params
{
"token": "kkkk",
"object_id": 1, // 赛事或赛程ID
"comment_type": 2 // 评论类型, 1: 赛事. 2: 赛程
}
response
{
"status": 0,
"data": {
"count": 5,
"list": [
{
"comment_id": 5,
"member_id": 11,
"content": "hahahahahah",
"create_time": "2017-11-15 17:02:48",
"nickname": "gangge",
"avatar": "取配置的链接" //头像
}
]
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/Member/Team/query
params
// 可以加page_size来限制取出个数,用于首页
response
{
"team_id": 5,
"team_name": "WE",
"team_leader_id": 11, // 队长ID
"nationality": "中国",
"logo": "http://game.chamshare.cn/static/image/skt.png",
"introduce": "WE,一只有强大底蕴的战队", //介绍
"notice": "公告公告公告公告公告公告公告公告公告公告公告公告公告",
"team_leader_name": "gangge"
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/checkJoin
params
// token
api
http://gameapi.chamshare.cn/Member/TeamOperate/myTeam
params
{
"token": "token"
}
response
{
"team_id": 5,
"team_name": "WE",
"team_leader_id": 11, // 队长ID
"nationality": "中国",
"logo": "http://game.chamshare.cn/static/image/skt.png",
"introduce": "WE,一只有强大底蕴的战队", //介绍
"notice": "公告公告公告公告公告公告公告公告公告公告公告公告公告",
"team_leader_name": "gangge"
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/build
params
{
"token": "token",
"team_name": "战队名称",
"logo": "logo地址",
"introduce": "战队描述"
}
数据太难造了,等测试的时候,直接读出来吧
api
http://gameapi.chamshare.cn/Member/TeamOperate/uploadLogo
params
{
"token": "token"
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/join
params
{
"token": "token",
"team_id": "战队ID"
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/editInfo
params
{
"token": "token",
"team_id": 5,
"team_name": "战队名称222",
"introduce": "战队简介",
"logo" : "战队图标"
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/editNotice
params
{
"token": "token",
"team_id": 5,
"notice": "战队名称222"
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/transfer
params
{
"token": "token",
"to_member_id": 11, // 要转让给的人
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/viceCaptainTotal
params
{
"token": "token",
"team_id": 5,
}
response
{
"status": 0,
"data": {
"count": 0 //副队长人数
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/promote
params
{
"token": "token",
"to_member_id": 11, // 提升谁
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/demotion
params
{
"token": "token",
"to_member_id": 11, // 降谁
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/expel
params
{
"token": "token",
"to_member_id": 11, // 开除谁
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/confirm
params
{
"token": "token",
"to_member_id": 15, // 审核谁
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/teamMemberList
params
{
"token": "token",
"team_id": 15, // 战队ID
}
response
{
"status": 0,
"data": {
"count": 1,
"list": [
{
"member_id": 11,
"team_id": 5, //战队ID
"role": 1, // 角色ID 1队长 2副队长 3队员
"nickname": "gangge",
"logo": "配置地址logo地址",
"role_confirm_status": 0 //审核状态: 0是未审核 1是已审核
}
]
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/event/Course/query
params
// 都非必传
{
"token": sadfasdf,
"team_id": ,
"is_recent": 1,
}
api
http://gameapi.chamshare.cn/Member/TeamOperate/recruit
params
{
"token": sadfasdf,
"url": '当前页面的URL',
}
api
http://gameapi.chamshare.cn/event/Event/listForFront
params
// 都非必传
{
"game_id": 2, //非必传
}
response
{
"status": 0,
"data": [
{
"event_id": 2,
"event_name": "事件名称",
"logo": "配置地址赛事logo",
"state": 1, // 1进行中,2未开始,3已结束
"apply_state": 0 // 报名状态 1进行中
}
],
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/event/Event/detail
params
{
"event_id": 1,
}
response
// my_opponent : 我的对手
api
http://gameapi.chamshare.cn/event/Contest/bonusList
params
{
"contest_id": 1,
}
response
`bonus_name` '奖项名称',
`allowe_num` '奖项名额',
`award` '奖励'
api
http://gameapi.chamshare.cn/event/Course/query
params
{
"token": 'sadfasdf',
"event_id": 1,
"game_id": 1,
"page": 1,
"page_size": 1,
"is_recent": 1 //是否取最近的,1是 是的话就只取开始时间大于现在的
}
response
{
"course_id": 16,
"course_name": "比赛",
"squad_id": 15, // 分组
"video": "videovideovideo", // 视频
"object_id1": 6, //战队或队员ID
"object_id2": 12,
"score1": -1, //比分,-1是弃权
"score2": 0,
"apply_type": 1, //战队或队员
"is_over": 0, // 是否已结束 1是0否
"event_logo": "配置地址/d/file/content/2017/11/5a1294f5f3984.jpg", // 赛事id
"tournament_name": "1v1单挑赛",
"event_start_time": "2017-11-27 18:21:16",
"object_id1_logo": "http://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIjz2mMk3ibWhFcycgyGP5uN3ml2icPKqRnNKdkoazQIVZt3z41YSEv8JTKWLMvrXK3ibSIibcUPQfQpA/0", // 战队或队员LOGO
"object_id2_logo": "http://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIjz2mMk3ibWhFcycgyGP5uN3ml2icPKqRnNKdkoazQIVZt3z41YSEv8JTKWLMvrXK3ibSIibcUPQfQpA/0",
"object_id1_name": "清风未醉", // 战队或队员名称
"object_id2_name": "清风未醉",
"is_follow": 0, // 是否关注 1是0否
"follow_count": 0 // 关注数量
}
api
http://gameapi.chamshare.cn/event/Course/detail
params
{
"token": sadfasdf,
"course_id" : ,
}
api
http://gameapi.chamshare.cn/member/Member/support
params
{
"token": sadfasdf,
"course_id" : 2 ,
"object_id": // 战队ID或队员ID
}
api
http://gameapi.chamshare.cn/member/Member/supportTop
params
{
"token": sadfasdf,
"course_id" : 2
}
response
# 按贡献值contribution从高到底排序
{
"status": 0,
"data": [
{
"member_id": 6,
"count": "30",
"nickname": "测试1",
"contribution": "http://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIjz2mMk3ibWhFcycgyGP5uN3ml2icPKqRnNKdkoazQIVZt3z41YSEv8JTKWLMvrXK3ibSIibcUPQfQpA/0 "
},
{
"member_id": 22,
"count": "18",
"nickname": "测试号不要动",
"contribution": "http://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIjz2mMk3ibWhFcycgyGP5uN3ml2icPKqRnNKdkoazQIVZt3z41YSEv8JTKWLMvrXK3ibSIibcUPQfQpA/0 "
}
],
"message": "调用成功"
}
后续根据具体的资源来定位
api
http://gameapi.chamshare.cn/event/Contest/query
params
{
"event_id": 1, //赛事ID
}
response
{
"status": 0,
"data": [
{
"contest_id": 5, // 项目ID
"game_id": 4,
"game_name": "王者荣耀",
'min_apply_num': "最少报名人数",
'maxapply_num': "同上面的字段一起保存起来,下个界面用",
"apply_type": // 允许报名的类型 1个人 2团队
}
],
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/event/Area/query
params
{
"contest_id": 1, //项目ID
}
response
{
"status": 0,
"data": [
{
"area_id": 3,
"area_name": "华东",
"content": "赛区说明赛区说明赛区说明赛区说明" , // 一个字段包含
"squads": [
{
"squad_id": 7,
"squad_name": "死亡组"
},
{
"squad_id": 8,
"squad_name": "天使组"
},
{
"squad_id": 9,
"squad_name": "平民组"
}
}
],
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/member/Member/apply
params
{
"token": "kkkk",
"squad_id": 14, //分组ID
"apply_type": 2 //报名类型
}
response
{
"status": 0,
"data": {
"apply_id": "4"
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/member/Member/teamMembers
params
{
"token": "kkkk",
"team_id": 14, // 可以不传,不传时取当前登录者所在的战队
}
response
{
"status": 0,
"data": {
"count": 9,
"list": [
{
"member_id": 19,
"nickname": "gangge",
"avatar": "配置地址",
"nationality": "国际",
"realname": "真实姓名",
"mobile": "10014864298",
"idcard": "身份证号码",
"is_complete": 0 // 是否完善资料,1完善 0不完善
}
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/member/Member/detail
params
{
"token": "kkkk",
"member_id": 14, // 要查的会员详情,不传就取自己的
}
response
{
"status": 0,
"data": {
"member_id": 1,
"mobile": "18852600625",
"nationality": "中国",
"realname": "田亚",
"idcard": "632356231595365362" // 身份证号,没有证件类型
},
"message": "调用成功"
}
如果是个人报名就添加自己
api
http://gameapi.chamshare.cn/member/Member/applyList
params
{
"token": "22222",
"list": [
// 如果是个人报名就添加自己
{
"apply_id": 1, //报名ID
"member_id": 11,
"player_name": "王大锤" // 游戏ID
},
{
"apply_id": 1,
"member_id": 12,
"player_name": "王二锤"
}
]
}
params
{
"token": "22222",
"apply_id": 14
}
response
{
"apply_id": 14,
"member_id": 1,
"squad_id": 18,
"apply_type": 2,
"confirm_status": 0,
"confirm_status_text": "未审核", // 参赛资格
"gameName": "守望先锋",
"eventName": "《绝地求生》亚洲邀请赛",
"members": [
{
"apply_list_id": 29,
"member_id": 2,
"team_id": 1,
"player_name": "给哦啊",
"realname": "田亚",
"idcard": "632356231595365362",
"nationality": "中国",
"mobile": "18822223333"
}
]
}
传入以下参数即可:
{
"token": sadfasdf,
"team_id": 1, // 当前这个人所在的战队,上面的接口有返回;
"is_recent": 1,
}
api
http://gameapi.chamshare.cn/game/Game/query
params
空
response
{
"status": 0,
"data": {
"count": 1,
"list": [
{
"game_id": 2,
"game_name": "游戏名称",
"logo": "游戏logo",
"introduce": "游戏简介"
}
]
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/adverse/adverse/query
params
空
response
{
"status": 0,
"data": {
"count": 4,
"list": [
{
"id": 27,
"title": "会员福利",
"img": "sq_img/201709/59c21cf6c2bf7.png",
"link": "",
"type":1 ,// 1滚动Banner , 2赛事报名Banne 3,公告
}
},
"message": "调用成功"
}
api
http://gameapi.chamshare.cn/member/Publics/getAppid
params
空