英雄联盟电竞数据API接口 - 【赛事列表数据】API调用示例代码

英雄联盟 电竞API专用数据接口 分享使用代码
分享使用 野子数据 http://www.yezishuju.com/ 电竞API数据接口调用的示例代码
示例演示:英雄联盟【赛事列表数据】接口
具体如下:
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;

import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

/**
@API: 赛事列表数据

@Website: http://www.yezishuju.com/yxlm/
@Website: http://www.yezishuju.com/swxf/
@Website: http://www.yezishuju.com/wzry/
*/
public class CsgoMatch {

public static void main(String[] args) {
try {
String content = getContent();
Respond rsp = JSON.parseObject(content, Respond.class);
System.out.println(rsp.code);
System.out.println(rsp.message);
rsp.getMatchList().forEach(System.out::println);

接口请求地址:

http://yezishuju.com/?resource=event&fusc=match&event_id=1

返回:

{
    "data": [
        {
            "match_id": "101", 
            "match_name": "LPL", 
            "match_desc": "LPL是中国地区英雄联盟职业联赛,是LOL在大陆地区的最高级别赛事,拥有超高人气", 
            "match_num": "5", 
            "match_sorting": "1", 
            "match_type": "2", 
            "match_bonus": "500万人民币", 
        }, 
        {
            "match_id": "102", 
            "match_name": "LCK", 
            "match_desc": "LCK是韩国英雄联盟职业联赛,被玩家成为英雄联盟最强赛区,拥有多支世界顶级强队。LCK分为春季赛和秋季赛,", 
            "match_num": "8", 
            "match_sorting": "2", 
            "match_type": "2", 
            "match_bonus": "1亿韩元", 
        }, 
        {
            "match_id": "103", 
            "match_name": "S7全球总决赛", 
            "match_desc": "英雄联盟S7全球总决赛在美国进行,S7是LOL全球各区域联赛的最终决战。S7全球总决赛总奖金100万美元,总共有20支LOL战队参与角逐", 
            "match_num": "13", 
            "match_sorting": "3", 
            "match_type": "2", 
            "match_bonus": "100美元", 
        }, 
        {
            "match_id": "104", 
            "match_name": "LMS", 
            "match_desc": "LMS是英雄联盟港澳台区域的联赛,一年氛围春季赛和夏季赛,LMS每个赛季会进行升降级", 
            "match_num": "2", 
            "match_sorting": "4", 
            "match_type": "2", 
            "match_bonus": "500万人民币", 
        }, 
        {
            "match_id": "105", 
            "match_name": "德玛西亚杯", 
            "match_desc": "德玛西亚杯是LOL在国内的杯赛性质比赛,由腾讯官方主办,每年会在不同的城市进行。参赛队伍包含LPL和LDL的邀请战队。", 
            "match_num": "15", 
            "match_sorting": "5", 
            "match_type": "2", 
            "match_bonus": "100万人民币", 
        }, 
        {
            "match_id": "106", 
            "match_name": "WCA", 
            "match_desc": "WCA世界电子竞技大赛是由宁川市政府主办的综合性电竞赛事,包含英雄联盟的多个项目的比赛,奖金高达一亿元", 
            "match_num": "8", 
            "match_sorting": "6", 
            "match_type": "2", 
            "match_bonus": "200万人民币", 
        }, 
],
    "code": "200", 
    "msg": "success"
}

你可能感兴趣的:(英雄联盟电竞数据API接口 - 【赛事列表数据】API调用示例代码)