Site
Home / Forum / Developers / Check when event is finished / final score timeline

Check when event is finished / final score timeline


Posted: 01 Jan 2021 00:59
jacob3809
Posts: 11
Joined: 2020-12-31

I noticed the strStatus or whatnot doesn't reliably show "FT" or "Full Time" or the like. Sometimes it seem to be null the next day or whatever.

Side-note - if I need to just wait until say 5 hours after start time (safe bet it's over) then can I be confident that the score has been updated to the final score after a certain amount of time? How quick does that typically happen?

Posted: 01 Jan 2021 12:35

zag
Posts: 3,323
Joined: 2020-03-23

I noticed the strStatus or whatnot doesn't reliably show "FT" or "Full Time" or the like. Sometimes it seem to be null the next day or whatever.

Side-note - if I need to just wait until say 5 hours after start time (safe bet it's over) then can I be confident that the score has been updated to the final score after a certain amount of time? How quick does that typically happen?


Yeh this has been mentioned a few times by people, its one of those issues that I need to fix really.

The reason strStatus is not always updated is we use different sources that don't always have that detail for some sports.

I think the most recent Basketball livescores should do that, I will see if other sports are possible.

jacob3809
Posted: 01 Jan 2021 22:22
jacob3809
Posts: 11
Joined: 2020-12-31

Cool man! I am PHP dev who just had my client Patreon-up to get an API key - awesome service.

I was going to try to extrapolate whether a game is done... maybe 8 hours after gametime will be reliable? I'm sure this wouldn't happen for the Super Bowl... but what about Boonies U v Shittown College ya know? For some sports 0-0 is a possible outcome so if I get 0-0 and "null" status after 8 hours is there a way for me to tell if the game is "officially decided"?

It's a really dope platform - not trying to take anything away from ya! A lot of games are giving me "FT" for status. I just have games like sitting there waiting to be "resolved" at some point where I would ideally be able to confirm they are updated/finished/etc. so I can "process" that game and move on.

So confirming it's not postponed and then waiting like 8 hours maybe is best bet?

Thanks!

Posted: 02 Jan 2021 22:54

zag
Posts: 3,323
Joined: 2020-03-23

Cool man! I am PHP dev who just had my client Patreon-up to get an API key - awesome service.

I was going to try to extrapolate whether a game is done... maybe 8 hours after gametime will be reliable? I'm sure this wouldn't happen for the Super Bowl... but what about Boonies U v Shittown College ya know? For some sports 0-0 is a possible outcome so if I get 0-0 and "null" status after 8 hours is there a way for me to tell if the game is "officially decided"?

It's a really dope platform - not trying to take anything away from ya! A lot of games are giving me "FT" for status. I just have games like sitting there waiting to be "resolved" at some point where I would ideally be able to confirm they are updated/finished/etc. so I can "process" that game and move on.

So confirming it's not postponed and then waiting like 8 hours maybe is best bet?

Thanks!


Well yes I thought this solution as well but its a bit of a hack

Ideally I would like to fix the database strStatus field.

What sport are you testing with?

Posted: 03 Jan 2021 00:18
jacob3809
Posts: 11
Joined: 2020-12-31

I'm using NFL, NBA, MLB, NCAA D1 Football, NCAA D1 Basketball, EPL and UEFA right now.



Posted: 03 Jan 2021 00:27
jacob3809
Posts: 11
Joined: 2020-12-31

I guess I'll go with X hours past gametime, no strPostponed, and score isn't 0-0 for now.

I guess soccer are the ones that 0-0 will not confirm game was played... although I can check a bunch of fields like cards and stuff I guess to see if data was entered other than score.

What might be a "safe bet" time limit on how quickly final scores typically go up if I were to use this hack?

Give 'er maybe 6 hours past game start and - assuming the game not postponed - the final score should be up?

Thanks!
Jacob

zag
Posted: 04 Jan 2021 09:43
MaximeGo31
Posts: 64
Joined: 2020-08-13

Hi,
Personally, I only look at the results of the major European soccer leagues. To find out if a match is really over, you can watch (if you have Patreon) if the match is not in live matches (and the match start date has passed). The only time it didn't work was if a match was stopped during the game (example: Paris SG - Istanbul BB in the Champions League), indeed it no longer appeared in matches with result in live (https://www.thesportsdb.com/api/v2/json/APIKEY/livescore.php?s=Soccer) and in match results (https://www.thesportsdb.com/api/v1/json /1/eventspastleague.php?id=4480) it was reported as discontinued.

Otherwise by waiting 10 hours after the start of the match, I always had the good results.

Be careful, don't necessarily base yourself on the red cards ... they are often null.

I hope I could help you,

Maxime

(Sorry if my text is not perfect, I use Google translate)

zag
Posted: 04 Jan 2021 16:18
cydalby
Posts: 335
Joined: 2020-06-16

I use a hard check for football full time by checking if the start time is over 2 hours ago. This covers for extended ET/Penalties but won’t apply if the game is still available in the live scores api

Posted: 04 Jan 2021 16:41
jacob3809
Posts: 11
Joined: 2020-12-31

Hey, thank you both so much. That's really helpful - I am patreon but I wasn't hip to the "live match" thing. Who knows whether it will work for some of these bush-league NCAA games but I'm going to check it out. Thanks!!!


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 9 (Total: 9)