🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## **3.11.7 前瞻分析** ### **1.历史交锋--变动列表** ~~~ /sport/api/v1/stats/changed/match/fight/201 ~~~ 接口概述:默认返回48小时内,历史交锋接口有数据变动的比赛ID。 建议频率:每天拉取一次。 | 请求参数 | 数据类型 | 是否必填 | 描述 | | -------- | -------- | -------- | -------- | | token | string | 是 | 客户密钥 | 请求url示例 ~~~ /sport/api/v1/stats/changed/match/fight/201?token=XXXXX ~~~ ~~~ { "code": 0, "data": { "matches": [ //比赛id 2259513, 2259495, 2259515, 2261916, 2248575, 2269520, 2265934, 2259493, 2259497, 2259499 ], "total": 10 }, "msg": "" } ~~~ ### **2.历史交锋--详情接口** ~~~ /sport/api/v1/stats/match/fight/{game_id}/{match_id} ~~~ 接口概述:获取两队伍的历史比赛数据。 | 请求参数 | 类型 | 是否必填 | 描述 | | --- | --- | --- | --- | | token | string | 是 | 客户密钥 | | match_num | int | 是 | 统计场数(10、20场)默认10场 | | same_side | bool | 否 | 同主客 | | current_league_only | bool | 否 | 只看当前联赛 | 请求URL示例 ~~~ /sport/api/v1/stats/match/fight/201/461500?match_num=10&token=xxxxx ~~~ ~~~ { "game_id": 202, //游戏id "match_id": 271204, //比赛id "win_rate": { //胜率 "rate": 0, //概率 "won_count": 0, //胜 "lost_count": 0, //负 "drawn_count": 1 //平 }, "handicap_rate": { //赢率 "rate": 1, "won_count": 1, "lost_count": 0, "drawn_count": 0 }, "score_rate": { //大率 "rate": 0, "won_count": 0, "lost_count": 1, "drawn_count": 0 }, "teams": [ //队伍信息 { "id": 4224, "name": "阿拉胡埃伦斯", "abbr": "阿拉胡埃伦斯", "logo": "https://example.jpeg", "icon": "https://example.jpeg" }, { "id": 4004, "name": "特温特", "abbr": "特温特", "logo": "https://example.jpegg", "icon": "https://example.jpeg" } ], "matches": [ // 历史赛程列表 { "match_id": 268828, //比赛id "wdl": "d", //胜d平l负 "handicap_count": "-0.250000", //让球数 "handicap_result": 1, //让球输赢 ( 0: -, 1:赢, 2:输, 3:走 ) "goal_count": "4.500000", //总进球走势 "goal_result": 2, //进球大小 ( 0: -, 1:大, 2:小, 3:走 ) "corner_count": 14, //角球数(仅足球有) "corner_score": "3-11", //角球比分(仅足球有) "teams": [ //队伍信息 { "team_id": 4224, //队伍id "index": 1, //队伍阵营 1主队 2客队 "score": 2, //比分 "first_half_score": 1 //半场比分 }, { "team_id": 4004, "index": 2, "score": 2, "first_half_score": 2 } ] } ] } ~~~ ***** ### **3.近期战绩--变动列表** ~~~ /sport/api/v1/stats/changed/match/analysis/201 ~~~ 接口概述:默认返回48小时内,近期数据接口有数据变动的比赛ID。 建议频率:每天拉取一次。 | 请求参数 | 数据类型 | 是否必填 | 描述 | | -------- | -------- | -------- | -------- | | token | string | 是 | 客户密钥 | 请求url示例 ~~~ /sport/api/v1/stats/changed/match/analysis/201?token=XXXXX ~~~ ~~~ { "code": 0, "data": { "matches": [ 2268461, 2263911, 2269665, 2261918 ], "total": 4 }, "msg": "" } ~~~ ### **4.近期战绩--详情接口** ~~~ /sport/api/v1/stats/match/analysis/{game_id}/{match_id} ~~~ 接口概述:获取某个队伍,最近的比赛数据。 | 请求参数 | 类型 | 是否必填 | 描述 | | --- | --- | --- | --- | | token | string | 是 | 客户密钥 | | match_num | int | 是 | 统计场数(10、20场)默认10场 | | same_side | bool | 否 | 同主客 | | current_league_only | bool | 否 | 只看当前联赛 | 请求URL示例: ~~~ /sport/api/v1/stats/match/analysis/202/461500?match_num=10&token=xxxxx ~~~ ~~~ { "game_id": 202, // 游戏id "match_id": 257007, // 比赛id "teams": [ // 队伍信息 { "id": 6920, "name": "阿根廷", "abbr": "阿根廷", "logo": "https://example.jpeg", "icon": "https://example.jpeg" }, { "id": 15598, "name": "法国", "abbr": "法国", "logo": "https://example.jpeg", "icon": "https://example.jpeg" } ], "list": [ // 近期赛程列表 { "team_id": 6920, // 队伍id "index": 1, // 队伍阵营 1主队 2客队 "win_rate": { // 胜率 "rate": 0.800000011920929, // 概率 "won_count": 4, // 胜 "lost_count": 0, // 负 "drawn_count": 1 // 平 }, "handicap_rate": { // 赢率 "rate": 0.800000011920929, "won_count": 4, "lost_count": 0, "drawn_count": 1 }, "score_rate": { // 大率 "rate": 0.20000000298023224, "won_count": 1, "lost_count": 4, "drawn_count": 0 }, "matches": [ // 赛程列表 { "match_id": 244924, // 比赛id "wdl": "w", // 胜d平l负 "handicap_count": "0.000000", // 让球数 "handicap_result": 1, // 让球输赢 ( 0: -, 1:赢, 2:输, 3:走 ) "goal_count": "3.500000", // 进球数 "goal_result": 2, // 进球大小 ( 0: -, 1:大, 2:小, 3:走 ) "corner_count": 6, // 角球数(仅足球有) "corner_score": "2-4", // 角球比分(仅足球有) "teams": [ // 队伍信息 { "team_id": 6920, // 队伍id "index": 1, // 队伍阵营 1主队 2客队 "score": 3, // 比分 "first_half_score": 2 // 半场比分 }, { "team_id": 15620, "index": 2, "score": 0, "first_half_score": 0 } ], "player_stats": [ //选手分析 "player_id": 1779, "metadata": { //选手信息 "id": 106869, //选手id "name": Xingye, //选手名称 "name_en": , //选手中文名称 "logo": xxxx, //选手logo "icon": xxxx, //选手icon "position": , //选手位置 "integral": 0, //选手评分 }, "point": 0, //得分 "field_goals_scored": 1, //投篮命中数 "three_pointers_scored": 2, //三分球命中数 "free_throws_scored": 1, //罚球命中数 "rebounds": 1, //篮板 "defensive_rebounds": 3, //防守篮板数 "offensive_rebounds": 1, //进攻篮板数 "assist": 1, //助攻 "turnovers": 2 //失误 "steals": 2 //抢断 "personal_fouls": 1 //犯规 "blocks": 1 //盖帽 ], } ] } ] } ~~~ ### **5.积分排名** ~~~ /sport/api/v1/stats/match/overview/{game_id}/{match_id} ~~~ 接口概述:获取比赛对应的赛事下的队伍积分数据 | 请求参数 | 类型 | 是否必填 | 描述 | | --- | --- | --- | --- | | token | string | 是 | 客户密钥 | ~~~ { "tables": [       {           "id": 1, //积分榜表id           "stage_id": 147, //所属阶段id           "scope": 4, //统计范围,1-赛季、2-预选赛、3-小组赛、4-季前赛、5-常规赛、6-淘汰赛(季后赛)、0-无           "name": "东部排名", //积分榜表名称           "teams": [ //球队积分项               {                   "team_id": 3163, //球队id                   "position": 1, //排名                   "won": 4, //胜场=主场胜+客场胜                   "away": "2-0", //主场:主场胜-主场负,可能不存在                   "home": "2-0", //客场:客场胜-客场负,可能不存在                   "lost": 0, //负场=主场负+客场负                   "last_10": "", //近10场胜-负(在该赛季只打了5场比赛:4-1),可能不存在                   "streaks": 4, //近期战绩(正连胜,负连败),可能不存在                   "diff_avg": 10.2, //场均净胜,可能不存在                   "division": "1-0", //赛区胜-负,该球队在该赛区的胜负数据,可能不存在                   "won_rate": 1, //胜率                   "game_back": "-", //胜场差,可能不存在                   "conference": "4-0", //东(西)部胜-负,该球队在东或西部的胜负数据,可能不存在                   "points_avg": 113, //场均得分,可能不存在                   "points_against_avg": 102.8 //场均失分,可能不存在               },               { ~~~ ### **6.未来赛程(篮球)** ~~~ /sport/api/v1/stats/match/future/{game_id}/{match_id} ~~~ 接口概述:获取队伍本场比赛之后的3场赛程数据 | 请求参数 | 类型 | 是否必填 | 描述 | | --- | --- | --- | --- | | token | string | 是 | 客户密钥 | | game_id | int | 是 | 运动ID | | match_id | int | 是 | 比赛ID | ~~~ { "game_id": 202, // 游戏id "match_id": 105135, // 比赛id "teams": [ // 队伍信息 { "id": 15432, "name": "奥地利", "abbr": "奥地利", "logo": "https://example.jpeg", "icon": "https://example.jpeg" }, { "id": 15598, "name": "法国", "abbr": "法国", "logo": "https://example.jpeg", "icon": "https://example.jpeg" } ], "matches": [ // 赛程列表 { "team_id": 15432, // 队伍id "index": 1, // 队伍阵营 1主队 2客队 "list": [ { "match_id": 106912, // 比赛id "teams": [ // 队伍信息 { "team_id": 15432, // 队伍id "index": 2, // 队伍阵营 1主队 2客队 "score": 0 // 比分 }, { "team_id": 15878, "index": 1, "score": 2 } ] } ] } ] } ~~~