vasqued2 / ha-teamtracker

Home Assistant integration that provides real-time scores in multiple professional (NBA, NFL, NHL, MLB, MLS, and more), college (NCAA), and international (soccer, golf, tennis, mma, racing) sports using ESPN APIs.
173 stars 20 forks source link

Add CFL to your API list #104

Closed Albuca closed 1 year ago

Albuca commented 1 year ago

Figure its a longshot, but couldn't hurt to ask!

It appears that the CFL does exist as far as ESPN is concerned (or at least, I have been unable to find any CFL team on their website), and therefore cannot be tracked using your integration.

The CFL does however, have its own API and does allow for an API key to be requested for use by individuals.

What are the chances that your integration can be easily modified, and add this different API to the list?

API documentation: http://api.cfl.ca/docs Key Request: http://api.cfl.ca/key-request

vasqued2 commented 1 year ago

ESPN has an API. Use a Custom API Configuration.

Details in the README and here: https://github.com/vasqued2/ha-teamtracker/wiki/Custom-API-Configurations

- platform: teamtracker
  league_id: "XXX"
  team_id: "WBB"
  sport_path: "football"
  league_path: "cfl"
  name: "Blue Bombers"
Albuca commented 1 year ago

Right on, thanks @vasqued2!

Albuca commented 1 year ago

It looks like ESPN has moved the CFL endpoint over to TSN: Link to comment

Does anyone has any idea why ESPN doesn't return any events for the new CFL season? It worked for the previous one. Here are the URLs that I've used which are basically the same, just the dates parameter has a different value:

  1. 2022
  2. 2023

EDIT: In case someone else is wondering about this, it seems that ESPN has moved their CFL scores/schedule to a partially owned subsidiary, The Sports Network. The schedule is provided by Bell Media and here is an example of a request to fetch the first week schedule.

With this change, is TeamTracker able to access the API endpoint, or am I SOL this season?

vasqued2 commented 1 year ago

Unfortunately, the JSON structure of new API is completely different from ESPNs and is not compatible with TeamTracker. Sorry.