| | Posted: 11 Mar 2017 12:47 | |
zag
Posts: 3,551 Joined: 2020
| | Hi.
Let's discuss what could be fixed/changed in current v1 API.
Empty fields in LiveScores items are not empty strings but empty json objects. Could it be fixed?
All lookups consist of list of items? Why not just one item?
Site has history for players. Is it available in API?
I missed list of sports and its thumbs in API so i have to use my local list in code:
{"Football","https://www.thesportsdb.com/images/sports/football.jpg"},
{"Basketball","https://www.thesportsdb.com/images/sports/basketball.jpg"},
{"Rugby","https://www.thesportsdb.com/images/sports/rugby.jpg"},
{"American Football","https://www.thesportsdb.com/images/sports/american_football.jpg"},
{"Motorsport","https://www.thesportsdb.com/images/sports/motorsport.jpg"},
{"Ice Hockey","https://www.thesportsdb.com/images/sports/ice_hockey.jpg"},
{"Fighting","https://www.thesportsdb.com/images/sports/fighting.jpg"},
{"Baseball","https://www.thesportsdb.com/images/sports/baseball.jpg"},
{"Golf","https://www.thesportsdb.com/images/sports/golf.jpg"},
{"Tennis","https://www.thesportsdb.com/images/sports/tennis.jpg"},
{"Cricket","https://www.thesportsdb.com/images/sports/cricket.jpg"},
{"Cycling","https://www.thesportsdb.com/images/sports/cycling.jpg"}
What about adding such construction in API? Yes, I saw list of leagues but I miss images anyway.
I wrote some thought on old forum and forgot them.
I hope to give some suggestions later.
| |
|
| | Posted: 31 Mar 2017 13:26 | |
zag
Posts: 3,551 Joined: 2020
| | Yep not forgotten about this, its on my list
| |
|
| | Posted: 07 Jan 2018 19:23 | |
zag
Posts: 3,551 Joined: 2020
| | Some more words from me.
I don't know why API needs root objects since they useless in my opinion and they could mislead devs.
Look at this stat:
eventsnext.php, eventsnextleague.php, lookupevent.php, eventspastleague.php - "events" root element
eventslast.php - "results" root element
searchevents.php, searchfilename.php - "event" root element
Also I need Alternate leagues names in allleagues.php or even maybe search by league name including alternate names.
And it will be cool to search events by "Arsenal_vs_Chelsea" where Arsenal both home and away team and the same for Chelsea.
| |
|
| | Posted: 10 Jan 2018 15:00 | |
zag
Posts: 3,551 Joined: 2020
| | Must have forgotten this again
- I've added alternate league names to all_leagues.php
- New API method https://www.thesportsdb.com/api/v1/json/1/all_sports.php
I agree with the other stuff, but some are breaking changes so will have to wait for v2 of the api.
I will also look into the events home and away, that should be possible without breaking things.
| |
|
| | Posted: 10 Jan 2018 20:31 | |
zag
Posts: 3,551 Joined: 2020
| |
- New API method https://www.thesportsdb.com/api/v1/json/1/all_sports.php
- I've added alternate league names to all_leagues.php
Yeah, no problem. Those cosmetic changes will make my code for API implementation cleaner and it will remove some almost duplicate classes.
| |
|
| | Posted: 28 Jan 2018 10:35 | |
zag
Posts: 3,551 Joined: 2020
| | Must have forgotten this again
- New API method https://www.thesportsdb.com/api/v1/json/1/all_sports.php}
| |
|
| | Posted: 30 Jan 2018 22:16 | |
zag
Posts: 3,551 Joined: 2020
| | On the other hand, search methods return list of data with empty params.
Is it expected behaviour?
| |
|
| | Posted: 31 Jan 2018 20:44 | |
zag
Posts: 3,551 Joined: 2020
| | I will be dropping some thought here for time to time
Event.strTime doesn't have single format I suppose
| |
|
| | Posted: 02 Feb 2018 16:29 | |
zag
Posts: 3,551 Joined: 2020
| | Nope, sadly the time zones are messed up all over the place. Its hard because many sources use different timing formats.
| |
|
| | Posted: 02 Feb 2018 17:21 | |
zag
Posts: 3,551 Joined: 2020
| | }
Along with Football - Soccer problem all_sports.php has https:// in urls. So If I add https:// to images I could download all artwork except these. If I don't add https:// I could download only sports thumbs. Should I additional check for url or all urls will be of the same ormat?
thx
| |
|
| | Posted: 03 Feb 2018 09:54 | |
zag
Posts: 3,551 Joined: 2020
| | Thanks, fixed both now hopefully.
Let me know if you find any more hard coded https:// strings on the API. They should all be gone now.
| |
|
| | Posted: 08 Mar 2018 20:46 | |
zag
Posts: 3,551 Joined: 2020
| | Look at this two links
https://www.thesportsdb.com/api/v1/json ... hp?id=4346
https://www.thesportsdb.com/api/v1/json ... 4346&s=all
| |
|
| | Posted: 09 Mar 2018 10:32 | |
zag
Posts: 3,551 Joined: 2020
| | No idea what I was thinking there haha!
Think its fixed now.
| |
|
| | Posted: 09 Mar 2018 10:43 | |
zag
Posts: 3,551 Joined: 2020
| | No idea what I was thinking there haha!
Think its fixed now.
Probably, you've moved seasons to separate method one day and forgot about old way
Btw, in lookupleague.php seasons were properly sorted. Could we have this in search_all_seasons.php?
| |
|
| | Posted: 09 Mar 2018 10:56 | |
zag
Posts: 3,551 Joined: 2020
| | Sure all done.
Removed the old way and updated the API instructions.
| |
|
| | Posted: 09 Mar 2018 11:12 | |
zag
Posts: 3,551 Joined: 2020
| | Sure all done.
Removed the old way and updated the API instructions.
Thx
Btw, API guides on site and on forum are differ in listing methods a little. As I remeber besides different sets of parameters api.php misses searchloves.php description and forum api misses all_sports.php
| |
|
| | Posted: 09 Mar 2018 17:04 | |
zag
Posts: 3,551 Joined: 2020
| | Yes plan is to remove the forum instructions, I just need to double check I didn't miss anything
I'm also taking new API requests if you need any non breaking changes added.
I already added {eventname} +{full date} lookup today from another request.
| |
|
| | Posted: 09 Mar 2018 22:59 | |
zag
Posts: 3,551 Joined: 2020
| | I'm also taking new API requests if you need any non breaking changes added.
| |
|
| | Posted: 15 Mar 2018 16:50 | |
zag
Posts: 3,551 Joined: 2020
| | https://www.thesportsdb.com/api/v1/json ... d=4328&r=1 is working but
https://www.thesportsdb.com/api/v1/json ... d=4370&r=1 is not
| |
|
| | Posted: 15 Mar 2018 20:36 | |
zag
Posts: 3,551 Joined: 2020
| | https://www.thesportsdb.com/api/v1/json/1/eventsround.php?id=4328&r=1 is working but
https://www.thesportsdb.com/api/v1/json ... d=4370&r=1 is not
Works fine.
EDIT: OK forget the above, I managed to look up the most recent season depending on the last event. It wont be perfect, but its the best that I can think of or now Both queries should work now.
| |
|
| | Posted: 15 Mar 2018 22:07 | |
zag
Posts: 3,551 Joined: 2020
| |
Works fine.
EDIT: OK forget the above, I managed to look up the most recent season depending on the last event. It wont be perfect, but its the best that I can think of or now Both queries should work now.
Hmmm, that was not the way I though it could work.
I'm using it in importer so I thought it could return all r1 events for all years if somehow grabber found league and round in filename but not the season to let user choose from round 1 alternatives for many years.
Nvm, sorry. I'll use only cases with league+season+round provided
| |
|