数据应用文章详情
篮球数据API接口 - 【即时赔率】API调用示例代码
在线接口调用,需注册下
/**
* 获取 篮球即时指数.篮球全场赔率接口
* 在线接口文档: https://v1.feijing88.com/doc/list
*/
public BasketballFullOdds fetchBasketballFullOdds() {
String content = fetchString("http://test.win007.com/lq/LqOdds.aspx");
MixString partMix = new MixString(content, "$");
MixString rfMix = new MixString(partMix[2], ";");
MixString opMix = new MixString(partMix[3], ";");
MixString dxMix = new MixString(partMix[4], ";");
return new BasketballFullOdds(
rfMix.list.stream().map( it -> {
MixString oddsMix = new MixString(it);
return new BasketballYpOdds(
oddsMix[0],
oddsMix[1],
oddsMix[2],
oddsMix[3],
oddsMix[4],
oddsMix[5],
oddsMix[6],
oddsMix[7],
oddsMix[8],
oddsMix[9],
oddsMix[10]
);
}).collect(Collectors.toList()),
opMix.list.stream().map( it -> {
MixString oddsMix = new MixString(it)
return new BasketballOpOdds(
oddsMix[0],
oddsMix[1],
oddsMix[2],
oddsMix[3],
oddsMix[4],
oddsMix[5]
);
}).collect(Collectors.toList()),
dxMix.list.stream().map( it -> {
MixString oddsMix = new MixString(it)
return new BasketballDxOdds(
oddsMix[0],
oddsMix[1],
oddsMix[2],
oddsMix[3],
oddsMix[4],
oddsMix[5],
oddsMix[6],
oddsMix[7],
oddsMix[8],
oddsMix[9],
oddsMix[10]
);
}).collect(Collectors.toList())
);
}
相关推荐

立即测试

购买咨询