分享使用 野子电竞数据 http://www.xxe.io 接口调用的示例代码,接的是DOTA2的【比赛详情】数据接口.
请求方法:
GET https://api.xxe.io/?resource=game&func=info&id=111&appKey=88888888×tamp=1527954400&sign=7e9e91aa*******376a1&event_id=11
接口返回
{
"data": {
"game_id": "1233675",
"match": "1224-2218-886-887-888",
"match_id": "23218",
"team_a": "23336",
"team_b": "23410",
"begin_time": "2018-05-23 21:30:00",
"player_a": [ //team_a出场队员
"6213", //队员唯一标示
"6215",
"6216",
"6217",
"7001"
],
"player_b": [
"983",
"987",
"1140",
"1788",
"5979"
],
"score": {
"a": [
"38",
"42",
""
],
"b": [
"17",
"29",
""
],
"win": [
"a",
"a"
]
},
"score_a": "2",
"score_b": "0",
"video_url": {
"svu": [
"https://player.youku.com/player.php/sid/XMzYyMzU0Mjc2MA==/v.swf",
"https://player.youku.com/player.php/sid/XMzYyMzU0Mjc2MA==/v.swf",
""
],
"svu_h5": [
"https://player.youku.com/embed/XMzYyMzU0Mjc2MA==",
"https://player.youku.com/embed/XMzYyMzU0Mjc2MA==",
""
]
},
"status": "1",
"is_live": 1,
"bo": "3",
"hot_game": "0",
"match_info": "DOTA2 ESL one 伯明翰 主赛事 小组赛",
"event_id": "24",
"event_name": "DOTA2",
"match_name": "ESL one",
"match_stage": "伯明翰-主赛事-小组赛",
"match_stage_id": "886-887-888",
"game_status": "2",
"game_type": "战队赛",
"team_a_info": {
"team_id": "336",
"name": "Spirit",
"icon": "https://static.xxe.io/pic/upload/20170316/58ca4460a0175.png",
"country_name": "俄罗斯",
},
"team_b_info": {
"team_id": "210",
"name": "EG",
"icon": "https://static.xxe.io/pic/upload/20180308/5aa0a1384772b.png",
"country_name": "美国",
},
"team_a_players": {
"6213": {
"player_id": "6213",
"team_id": "336",
"id": "Illidan",
"name": "Илья Пивцаев",
"match": "24",
"country": "82",
"country_name": "美国",
"photo": "https://static.xxe.io//pic/upload/20180117/5a5f332a8b15c.png",
"position": "1号位",
"sn": "Illidan"
},
"6215": {
"player_id": "6215",
"team_id": "336",
"id": "DkPhobos",
"name": "Alexander Kucheria",
"match": "24",
"country": "96",
"country_name": "美国",
"photo": "https://static.xxe.io//pic/upload/20180117/5a5f33952f02e.png",
"position": "3号位",
"sn": "DkPhobos"
}
},
"team_b_players": {
"983": {
"player_id": "983",
"team_id": "210",
"id": "Fear",
"name": "Clinton Loomis",
"match": "24",
"country": "101",
"country_name": "美国",
"photo": "https://static.xxe.io//pic/upload/20160808/57a8514f05e61.png",
"position": "2号位",
"sn": "Fear"
},
"987": {
"player_id": "987",
"team_id": "210",
"id": "Suma1L",
"name": "Sumail Hassan",
"match": "24",
"country": "76",
"country_name": "美国",
"photo": "https://static.xxe.io//pic/upload/20160808/57a851706f3eb.png",
"position": "3号位",
"sn": "Suma1L"
},
"1140": {
"player_id": "1140",
"team_id": "210",
"id": "Arteezy",
"name": "Artour Babaev",
"match": "24",
"country": "101",
"country_name": "美国",
"photo": "https://static.xxe.io//pic/upload/20170327/58d9087483706.png",
"position": "1号位",
"sn": "Arteezy"
}
},
"live_url": {
"1": {
"name": "火猫直播",
"url": "https://www.huomao.com/9314",
"url_h5": "https://m.huomao.com/mobile/mob_live/9314",
"name_h5": "火猫直播"
},
"2": {
"name": "火猫直播",
"url": "https://www.huomao.com/6897",
"url_h5": "https://m.huomao.com/mobile/mob_live/6897",
"name_h5": "火猫直播"
}
},
"future_games": {
"21230": [ ],
"33236": [ ]
}
},
"code": 200,
"msg": "success"
}