joelshepherd / tabliss

A beautiful, customisable New Tab page for Firefox, Chrome, and Edge.
https://tabliss.io
GNU General Public License v3.0
2.3k stars 299 forks source link

Additional Sports? #388

Open jlnxr opened 3 years ago

jlnxr commented 3 years ago

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.

joelshepherd commented 2 years ago

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!

cococow123 commented 2 years ago

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