Site Home / Forum / Developers / V2 API Development
V2 API Development
Posted: 02 Mar 2020 08:36
zag
Posts: 3,942 Joined: 2020
I'm currently working on V2 of the API, it will be totally new and much better than V1. Current plans
- Reduce API methods
- Livescore directly linking to events and teams
- Simplified naming
- More filter parameters for each method
- api-football stats
- better tables
- Event Status
Let me know if you have any comments or feature requests
Status: Alpha - everything may change!
Posted: 08 Mar 2020 09:19
zag
Posts: 3,942 Joined: 2020
Any more ideas before I start on this?
New livescore API is going to be awesome
Posted: 09 Mar 2020 20:30
zag
Posts: 3,942 Joined: 2020
Test Livescore should include Soccer, NBA, NHL, Golf and a few others at some point.
Just some musings from working with the new livescores api today.
Events immediately disappear when they go full time, it would be nice if these could be persisted for another 10 minutes or so, so that data can be captured. Not sure if this is in your control but just a thought.
Posted: 22 Apr 2020 23:16
zag
Posts: 3,942 Joined: 2020
Again a minor one,
Event (679226) kicked off at midnight UK time on Wednesday night/Thursday morning but the live scores api stated kick off was at 11pm of the day before and kept overwriting my changes on this event
Posted: 26 Apr 2020 13:57
zag
Posts: 3,942 Joined: 2020
Another update.
There seems to be no support for HT messages, events just go to 45 mins and stay there until the second half kicks off.
Not sure if it’s just the data from the Belarusian league or if that’s the way the data always is
Posted: 27 Apr 2020 15:35
zag
Posts: 3,942 Joined: 2020
Hey,
Let me know when V2 is ready, and I can update the GraphQL wrapper accordingly.
Posted: 16 May 2020 17:56
zag
Posts: 3,942 Joined: 2020
Be great to have lineups from the v2 endpoint, hopefully including a formation (e.g 4-4-2)
Posted: 22 May 2020 10:58
zag
Posts: 3,942 Joined: 2020
Do you have an ETA of other endpoints than livescore? And a list of endpoints for V2 ready for testing?
I'd be happy to try it out as there is quite a lot of things I can think of to improve the data and as I'm building my app I'm sure I'll find some gaps worth catering for
Posted: 22 May 2020 11:01
zag
Posts: 3,942 Joined: 2020
Do you have an ETA of other endpoints than livescore? And a list of endpoints for V2 ready for testing?
I'd be happy to try it out as there is quite a lot of things I can think of to improve the data and as I'm building my app I'm sure I'll find some gaps worth catering for
No ETA but keep posting ideas and I will incorporate them. General rule is to make things simpler and more powerful.
Posted: 22 May 2020 11:19
zag
Posts: 3,942 Joined: 2020
Simpler and more powerful is definitely sounding good.
I certainly have a few ideas, here are a few below:
1) The main thing I would suggest is to use a more RESTful API rather than using query strings, not sure if that works for the data and tech you have or even for all sports, but I'm mostly (read only!) interested in soccer.
2) The other thing is using more JavaScript-y properties on responses, since it is JSON then prepending stuff with `str`, `int`, `date` or even `id` seems very backend-y!
3) Can all dates be in a standard ISO format? Probably best in full UTC ISO, that will work for anyone using it anywhere in the world, at the moment I need to append strTime to dateEvent (which is a string).
4) Might be nice and make the data a bit more user friendly if "repeated data" can be shoved into an array. When I say repeated data, I mean an example like https://www.thesportsdb.com/api/v1/json ... r=1&s=1819 shows up to 3 strTweets, which is limiting to 3, and making end users check if any have any data rather than check the length. The same could be said for lineups, they should be an array rather than needing to do string manipulation to split on the semi colon and display them as necessary.
Again, sorry if this makes me sound very opinionated! I realise it might not be possible with your data sources or tech stack but I would love to contribute ideas or even dev time to make v2 amazing, it's a great opportunity to make really huge improvements
Posted: 22 May 2020 13:30
zag
Posts: 3,942 Joined: 2020
Here are a couple more suggestions for v2:
Will there be better documentation and guaranteed schemas?
For example, I'm looking at https://www.thesportsdb.com/api/v1/json ... 328&s=1819 and I have no idea what strLocked means.
The schema seems to be a big issue, here are two Premier League games played on the same date at the same time: idEvent 602190 & 602191
https://www.diffchecker.com/r3J1XROG
As you can see there are the differences you'd expect, but also inconsistencies for `null` values and `""` empty string values:
strDescriptionEN
dateEventLocal
strResult
strTweet1
strTweet2
strTweet3
Also I see that every (the 200 under free API key) event there has `strPostponed: "no"`, which is hard to believe. Is that field and many of the others actually populated?
What does currently happen to postponed games? Do their dateEvent value get changed? I know it hard to tell at the moment cos of the lockdowns of leagues but a schema would help answer these questions and provide some self documentation.
Posted: 22 May 2020 21:23
zag
Posts: 3,942 Joined: 2020
Thanks! A lot of this stuff is in my mind already and its great to have you point out these things and some new stuff.
Some is backend database work, others is fixing our editors and sport result importers but its all possible.
This is great feedback.
I will add a new category to Trello for the specific API V2 requests.
Posted: 24 May 2020 11:49
zag
Posts: 3,942 Joined: 2020
Has the V2 endpoint gone down? Should be some live games currently but showing null
Posted: 24 May 2020 14:01
zag
Posts: 3,942 Joined: 2020
Has the V2 endpoint gone down? Should be some live games currently but showing null
Thanks for the headsup, bug has been fixed with date format.
Posted: 24 May 2020 14:16
zag
Posts: 3,942 Joined: 2020
Nice one, cheers
Posted: 27 May 2020 07:56
zag
Posts: 3,942 Joined: 2020
Hi,
it's great that now we can identify a game with it's idEvent, but V2 include fewer information then V1 (to be more specific - red and yellow cards given during the match and players that scored).
is there any chance to add that information to V2?
zag
Posted: 31 Jul 2020 14:58
cydalby
Posts: 346 Joined: 2020
Afternoon mate, with the ever exciting final rounds of the Champions/Europa league coming up, is there any chance we could expedite some of the new features on the V2 api? Really wanting to get them new shiny features from api-football!
Posted: 04 Aug 2020 20:39
cydalby
Posts: 346 Joined: 2020
Just noticed that the V2 live scores api returns strProgress: 0’ when the game went into extra time.