0

ESPN API 是否返回指向任何运动的球员图像的链接?我需要显示播放器图像以及我能够成功检索的其他数据。如果没有,是否有另一种推荐的方法来检索这些图像?

4

1 回答 1

1

我实际上不知道 ESPN 有一个 API。棒极了。

文档中,您可以通过响应中的headshots属性找到图像(如果可用):

headshots   Collection of athlete headshots as specified below, each containing href, width, and height attributes. Soccer, recruiting, and WNBA not currently supported. Note: clients apps must be responsible for handling missing headshots as not every athlete has one.               
full 600x436 athlete headshot               
xlarge 350x254 athlete headshot             
large 65x90 athlete headshot                
medium 43x60 athlete headshot               
small 34x48 athlete headshot                
xsmall 28x38 athlete headshot               
fantasy 200x145 athlete headshot

还有一个 Video API,但它看起来不像是针对运动员的。

于 2013-10-08T20:59:14.003 回答