国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

電競CSGO數據API接口 - 【聯賽列表】API調用示例代碼

microelec / 1467人閱讀

摘要:電競的聯賽列表接口,在線接口文檔聯賽列表獲取返回內容這里為了方便測試我使用了一份本地文件,使用時應替換為真實接口返回內容返回數據如下部分成功

電競CSGO的【聯賽列表】接口,在線接口文檔

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: https://www.feijing88.com
 */
public class CsgoLeague {
 
    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.getLeagueList().forEach(System.out::println);
 
        } catch (Throwable t) {
            t.printStackTrace();
        }
    }
 
    /**
     * 獲取API返回內容
     * 

* Note: 這里為了方便測試我使用了一份本地文件,使用時應替換為真實接口返回內容 */ private static String getContent() { try { StringBuilder builder = new StringBuilder(); List lines = Files.readAllLines(Paths.get("./src/main/resources/CsgoLeague.json"), StandardCharsets.UTF_8); lines.forEach(builder::append); return builder.toString(); } catch (Throwable t) { t.printStackTrace(); return ""; } } public static class Respond { @JSONField(name = "code") private int code; @JSONField(name = "message") private String message; @JSONField(name = "data") private List leagueList; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public List getLeagueList() { return leagueList; } public void setLeagueList(List leagueList) { this.leagueList = leagueList; } } public static class League { @JSONField(name = "league_id") private int leagueId; @JSONField(name = "logo") private String logo; @JSONField(name = "name") private String name; @JSONField(name = "country") private String country; @JSONField(name = "location") private String location; @JSONField(name = "start_time") private long startTime; @JSONField(name = "end_time") private long endTime; @JSONField(name = "team_ids") private List teamIds; @JSONField(name = "status") private int status; @Override public String toString() { return "League{" + "leagueId=" + leagueId + ", logo="" + logo + """ + ", name="" + name + """ + ", country="" + country + """ + ", location="" + location + """ + ", startTime=" + startTime + ", endTime=" + endTime + ", teamIds=" + teamIds + ", status=" + status + "}"; } public int getLeagueId() { return leagueId; } public void setLeagueId(int leagueId) { this.leagueId = leagueId; } public String getLogo() { return logo; } public void setLogo(String logo) { this.logo = logo; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public long getStartTime() { return startTime; } public void setStartTime(long startTime) { this.startTime = startTime; } public long getEndTime() { return endTime; } public void setEndTime(long endTime) { this.endTime = endTime; } public List getTeamIds() { return teamIds; } public void setTeamIds(List teamIds) { this.teamIds = teamIds; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } } }

API 返回數據如下(部分):

200
成功
League{leagueId=9866, logo="http://qn.feijing88.com/feijing-home/egame/image/20190514/49cd2c63e3834fa2a92df8f1d02ec390.png", name="DreamHack Open Sevilla 2019", country="Spain", location="Sevilla, Spain", startTime=1576234800000, endTime=1576407600000, teamIds=[], status=2}
League{leagueId=9342, logo="http://qn.feijing88.com/feijing-home/egame/image/20190801/a50756930fbe44b68b35c1e63febfe70.jpg", name="Gamers Club Masters IV", country="Brazil", location="Sorocaba, S?o Paulo", startTime=1576148400000, endTime=1577012400000, teamIds=[], status=0}
League{leagueId=9253, logo="http://qn.feijing88.com/feijing-home/egame/image/20190624/06280d3da7e640708ff86179eee76ffb.jpg", name="ESL Pro League Season 10 Finals", country="Denmark", location="Odense, Denmark", startTime=1575630000000, endTime=1575802800000, teamIds=[], status=2}
League{leagueId=9868, logo="http://qn.feijing88.com/feijing-home/egame/image/20190514/7190e798f3d84ce2b52902f09dbc2349.png", name="DreamHack Open Winter 2019", country="Sweden", location="J?nk?ping, Sweden", startTime=1575025200000, endTime=1575198000000, teamIds=[], status=0}
League{leagueId=9240, logo="http://qn.feijing88.com/feijing-home/egame/image/20190711/b340bbdf32554914961b4a1e328a3c9b.png", name="CS:GO Asia Championships 2019", country="China", location="Shanghai, China", startTime=1574334000000, endTime=1574593200000, teamIds=[9425, 5761, 9428], status=2}
League{leagueId=9867, logo="http://qn.feijing88.com/feijing-home/egame/image/20190514/04e44a98f9564a4983568ae8b95bc506.png", name="DreamHack Open Atlanta 2019", country="United States", location="Atlanta, Georgia, USA", startTime=1573815600000, endTime=1573988400000, teamIds=[], status=0}
League{leagueId=9246, logo="http://qn.feijing88.com/feijing-home/egame/image/20190713/7a21b891f3fd493c94c19e17d82d543c.jpg", name="eXTREMESLAND 2019 Asia Finals", country="China", location="Shanghai, China", startTime=1573729200000, endTime=1573988400000, teamIds=[], status=2}
League{leagueId=9307, logo="http://qn.feijing88.com/feijing-home/egame/image/20190627/2f20036ba3a84bbb90815f1acb8c2dbf.jpg", name="BLAST Pro Series Copenhagen 2019", country="Denmark", location="Copenhagen, Denmark", startTime=1572606000000, endTime=1572692400000, teamIds=[1538, 2221, 9204, 9966], status=2}
League{leagueId=9348, logo="http://qn.feijing88.com/feijing-home/egame/image/20190801/aad3efd47ed64a1a922ae1b56dbc3996.png", name="ESL LA League Season 5 Finals", country="Brazil", location="S?o Paulo", startTime=1572084000000, endTime=1572170400000, teamIds=[], status=2}
League{leagueId=9275, logo="http://qn.feijing88.com/feijing-home/egame/image/20190521/5860289be57d46dc88eaa30bac90bb45.png", name="Logitech G Challenge 2019", country="Mexico", location="Mexico City, Mexico", startTime=1571997600000, endTime=1571997600000, teamIds=[], status=2}

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/109984.html

相關文章

  • 電競CSGO數據API接口 - 【聯賽列表API調用示例代碼

    摘要:電競的聯賽列表接口,在線接口文檔聯賽列表獲取返回內容這里為了方便測試我使用了一份本地文件,使用時應替換為真實接口返回內容返回數據如下部分成功 電競CSGO的【聯賽列表】接口,在線接口文檔 import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.annotation.JSONField; import java.ni...

    BaronZhang 評論0 收藏0
  • 電競CSGO數據API接口 - 【戰隊數據列表API調用示例代碼

    摘要:戰隊列表獲取返回內容這里為了方便測試我使用了一份本地文件,使用時應替換為真實接口返回內容 https://www.xxe.io/import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.annotation.JSONField; import java.nio.charset.StandardCharsets;import...

    Me_Kun 評論0 收藏0
  • 電競CSGO數據API接口 - 【戰隊數據列表API調用示例代碼

    摘要:戰隊列表獲取返回內容這里為了方便測試我使用了一份本地文件,使用時應替換為真實接口返回內容 https://www.xxe.io/import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.annotation.JSONField; import java.nio.charset.StandardCharsets;import...

    Amio 評論0 收藏0
  • 電競CSGO數據API接口 - 【最近賽事列表API調用示例代碼

    摘要:最近賽事列表獲取返回內容這里為了方便測試我使用了一份本地文件,使用時應替換為真實接口返回內容 https://www.xxe.io/import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.annotation.JSONField; import java.nio.charset.StandardCharsets;impo...

    Channe 評論0 收藏0
  • 電競數據API接口 - 【英雄聯盟聯賽列表API調用示例代碼

    摘要:英雄聯盟的聯賽列表接口代碼示例,可注冊查看在線文檔英雄聯盟詳情頁聯賽列表獲取返回內容這里為了方便測試我使用了一份本地文件,使用時應替換為真實接口返回內容返回數據如下部分成功亞洲洲際賽亞洲洲際賽韓國首爾歐美洲際賽歐美洲際賽洛杉磯夏季賽夏季 英雄聯盟的【聯賽列表】接口代碼示例,可注冊查看在線文檔:英雄聯盟詳情頁 import com.alibaba.fastjson.JSON; impor...

    amc 評論0 收藏0

發表評論

0條評論

microelec

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<