tabliss icon indicating copy to clipboard operation
tabliss copied to clipboard

Additional Sports?

Open jlnxr opened this issue 4 years ago • 2 comments

NBA widget is cool, any possibility of a version for other major sports leagues? Personally I'd love to get NHL scores. Not sure what's involved in that.

jlnxr avatar Jul 05 '21 16:07 jlnxr

Hi @jlnxr, adding a new sport is quite involved and requires access to an API to pull the sporting data from. The NBA widget was not created by me, but from a (very) dedicated fan.

If anyone has a reliable access to an API that supplied data for their sport, then you are halfway there. Unfortunately, that's the tricky part!

joelshepherd avatar Mar 26 '22 09:03 joelshepherd

Hi @jlnxr, adding a new sport is quite involved and requires access to an API to pull the sporting data from. The NBA widget was not created by me, but from a (very) dedicated fan.

If anyone has a reliable access to an API that supplied data for their sport, then you are halfway there. Unfortunately, that's the tricky part!

ESPN has a lot of endpoints for grabbing scores. Here are some of the API links that could help you implement other sports and leagues: https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b

As for NHL and MLB, they both use MLB services for their API and there is some endpoint documentation online. If there is more specific information you need to find to display on a widget, I could probably help find them.

MLB schedule: https://statsapi.mlb.com/api/v1/schedule?sportId=1 NHL schedule: https://statsapi.web.nhl.com/api/v1/schedule

cococow123 avatar Jun 01 '22 20:06 cococow123