Urgent.News

What's breaking now, across thousands of outlets.

Tech

Live scores from leagues no US scoreboard carries

Live scores from leagues no US scoreboard carries nichedb.dev/c/sports has two live score sources now. It used to have one, and that one only knew about the games American networks broadcast. The new one came out of a $9 a month TheSportsDB membership we already had. Every workaround in our sports code was written against limits that membership lifts, and nobody had gone back to check. What the…

The source material discusses the limitations of live sports scores available through US-based scoreboards. It highlights that live scores from leagues not covered by American networks are not typically available on standard scoreboards. Previously, there was only one source for live scores, which was limited to games broadcast on American networks. However, with the introduction of a $9 a month membership to TheSportsDB, two live score sources became available.

The new source provides more comprehensive coverage, offering access to 1,544 leagues with detailed team rosters and live scores. The API allows for searching all teams and leagues in a single request, significantly reducing the number of requests needed compared to the previous method. The live scores endpoint provides real-time data for games being played around the world, with requests returning information in a compact format.

The source also points out differences between the new and old live score sources. The new source offers more detailed information, such as the clock, venue, odds, and play-by-play updates. However, ESPN's scoreboard provides deeper coverage in terms of data depth, including clock information, venue details, and play-by-play updates. Yet, ESPN restricts cloud egress, limiting the amount of data that can be pulled at once.

One of the key takeaways from the source is the need to handle league and team naming differently. The new source requires matching league display names exactly, while the old source could rely on human-typed names. Additionally, the API key is now passed in an X-API-KEY header instead of the URL path, which provides a small privacy improvement as request URLs are now safe to log.

The source concludes by mentioning that while the technical aspects of the implementation are interesting, the real value lies in the fact that the API key was already set in production while the code was still designed for the free tier's limitations. This highlights the importance of re-evaluating code assumptions when upgrading to a paid API key.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Thursday 24 September →