Site
Home / Forum / Developers / [BUG]: lookup_all_teams.php not returning all teams in "_no League"

[BUG]: lookup_all_teams.php not returning all teams in "_no League"


Posted: 16 Sep 2019 15:10

zag


Posts: 3,511
Joined: 2020

I've run into a bug when trying to query all teams in league by ID.
Not all teams categorized in the "_No League" https://www.thesportsdb.com/api/v1/json/1/lookup_all_teams.php?id=4367 endpoint.
For example both "Slavia Prague" and "SV Salzburg" are listed on the league page, but neither are returned by the endpoint.
Please advise or fix.
p.s I have not observed this happening with other league but have not checked extensively.

Posted: 16 Sep 2019 18:48

zag


Posts: 3,511
Joined: 2020

Yes that method is limited to 50 teams for performance reasons.

Do you have a particular use case for looking up all the teams in the _No league?

Its basically just a place to put teams not associated with a league that play in cup competitions. Hopefully over time we will support more leagues such as Polish, Czech and Austrian.

Posted: 17 Sep 2019 08:42

zag


Posts: 3,511
Joined: 2020

I'd like to be able to have team details per event without having to do a subsequent query per team ID. I need to iterate over this data within a graph of rdf triples, so storing and structuring the data ahead of time is essential. So far I have been periodically importing all teams per league into my db, which significantly reduces the number of calls to the api.
I believe my use case shows that the 50 teams limitation actually has the inverse effect on performance. For that reason would you consider overriding that limitation ? Note that upon completion of dev and testing I would be subscribing on patreon for access to livescores.

Posted: 17 Sep 2019 13:26

zag


Posts: 3,511
Joined: 2020

I'd like to be able to have team details per event without having to do a subsequent query per team ID. I need to iterate over this data within a graph of rdf triples, so storing and structuring the data ahead of time is essential. So far I have been periodically importing all teams per league into my db, which significantly reduces the number of calls to the api.
I believe my use case shows that the 50 teams limitation actually has the inverse effect on performance. For that reason would you consider overriding that limitation ? Note that upon completion of dev and testing I would be subscribing on patreon for access to livescores.


Yes agreed, I will see what I can do.

EDIT: I think I may just give any Patreon private keys unlimited data returns and leave the test key as it is for now. A lot of people still use the test key so this change could have unintended consequences


Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 4 (Total: 4)