Site
Home / Forum / Developers / League details by name

League details by name


Posted: 07 Feb 2017 15:45

wayner
Posts: 13
Joined: Feb 2017

Does the API support getting league details by name, something kind of like this:
thesportsdb.com/api/v1/json/{APIKEY}/lookupleague.php?name=NBA

Or would you have to parse the league id?

How would you get the JSON details for the NBA, just given the name "NBA Basketball"?

Posted: 07 Feb 2017 20:23

zag
Posts: 1,558
Joined: Oct 2016

Use the all leagues API method to lookup the name, then use the ID to get all the details is probably the best way to do it.

https://www.thesportsdb.com/api/v1/json/ ... eagues.php

then

https://www.thesportsdb.com/api/v1/json/ ... hp?id=4346

Saying that, the league names don't really change so you could of course just keep a local list of these in your app.

Posted: 07 Feb 2017 21:03

wayner
Posts: 13
Joined: Feb 2017

Can I request a league name change. "American NFL" seems inconsistent with the rest of the naming of North American leagues. There is no other NFL in the list of leagues so you don't really need the "American" adjective. You don't have American NBA for example.

Posted: 08 Feb 2017 12:13

zag
Posts: 1,558
Joined: Oct 2016

Agreed, Sure done.


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)