这里简单介绍下之前参与项目过程调取的足球比分api示例代码在线调用文档,需注册下

    /**
     * 获取 足球基础比分.当天比赛的比分数据
     * 在线接口文档: https://www.feijing88.com/doc/list?productId=1
     */
    public List<FootballMatch> fetchTodayFootballMatch() {
        List<Element> elements = fetchElementList("http://interface.win007.com/zq/today.aspx", "match");

        return elements.stream().map( it -> {
            MixString leagueMix = new MixString(it["league"]);
            MixString homeTeamMix = new MixString(it["home"]);
            MixString awayTeamMix = new MixString(it["away"]);
            return new FootballMatch(
                it["ID"],
                it["level"].toIntOr(),
                it["leagueID"],
                it["kind"].toIntOr(1),
                leagueMix[2],
                it["time"].parseSlashTimestamp(),
                it["time2"].parseSlashTimestamp(),
                it["state"].toIntOr(),
                homeTeamMix[3],
                awayTeamMix[3],
                homeTeamMix[2],
                awayTeamMix[2],
                it["homeScore"].toIntOr(),
                it["awayScore"].toIntOr(),
                it["bc1"].toIntOr(),
                it["bc2"].toIntOr(),
                it["red1"].toIntOr(),
                it["red2"].toIntOr(),
                it["yellow1"].toIntOr(),
                it["yellow2"].toIntOr(),
                it["corner1"].toIntOr(),
                it["corner2"].toIntOr(),
                it["zl"].toBoolean(),
                it["lineup"].toIntOr() == 1
            );
        });
    }

feijingdata
24 声望3 粉丝