电竞DOTA2数据API接口 - 【比赛详情】API调用示例代码

本文提供野子电竞数据平台的DOTA2【比赛详情】API调用示例,展示如何获取和解析选手基本信息,适用于电竞数据爱好者和开发者。
该文章已生成可运行项目,

分享使用 野子电竞数据 http://www.xxe.io 接口调用的示例代码,接的是DOTA2的【比赛详情】数据接口.

请求方法:

GET https://api.xxe.io/?resource=game&func=info&id=111&appKey=88888888&timestamp=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"
}

本文章已经生成可运行项目
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值