Hi, I was trying to consume your API and I noticed that, when calling the api/fixtures/date/{date}, the ‘fixture’ object should be an array of fixtures and it is not.
Is it really by design or is it a bug?
Thanks
Join in the discussion - add comment below:
I am a beginner in learning python and want to get data from your api, and basically had it been an array of fixtures, it would be easier for me to fetch the data I need but I am stuck because of the numbers(the ids). Basically what I want is to iterate through all the ids and get, in each id, homeTeam name and awayTeam name. Any help would be appreciated.
It will be like this in the V2 planned in 2019.
All endpoints will be reviewed to return a array and not a series of objects
I can see that. IMHO, it would make much more sense and would be much easier to parse if
fixtures
was an array offixture
. Something like:Hi,
There is no bug, this is the model :
You can check our documentation at https://www.api-football.com/documentation/
This is the normal return from fixtures/date endpoints :
<pre><code>
{
“api”: {
“results”: 56,
“fixtures”: {
“664”: {
“fixture_id”: “664”,
“event_timestamp”: “1543002300”,
“event_date”: “2018-11-23T19:45:00+00:00”,
“league_id”: “3”,
“round”: “Championship - 18”,
“homeTeam_id”: “57”,
“awayTeam_id”: “60”,
“homeTeam”: “Ipswich”,
“awayTeam”: “West Brom”,
“status”: “Not Started”,
“statusShort”: “NS”,
“goalsHomeTeam”: null,
“goalsAwayTeam”: null,
“halftime_score”: null,
“final_score”: null,
“penalty”: null,
“elapsed”: “0”,
“firstHalfStart”: “0”,
“secondHalfStart”: “0”
},
“1497”: {
“fixture_id”: “1497”,
“event_timestamp”: “1542999600”,
“event_date”: “2018-11-23T19:00:00+00:00”,
“league_id”: “5”,
“round”: “Ligue 2 - 15”,
“homeTeam_id”: “98”,
“awayTeam_id”: “99”,
“homeTeam”: “Ajaccio”,
“awayTeam”: “Clermont Foot”,
“status”: “Not Started”,
“statusShort”: “NS”,
“goalsHomeTeam”: null,
“goalsAwayTeam”: null,
“halftime_score”: null,
“final_score”: null,
“penalty”: null,
“elapsed”: “0”,
“firstHalfStart”: “0”,
“secondHalfStart”: “0”
},
“1498”: {
“fixture_id”: “1498”,
“event_timestamp”: “1542999600”,
“event_date”: “2018-11-23T19:00:00+00:00”,
“league_id”: “5”,
“round”: “Ligue 2 - 15”,
“homeTeam_id”: “109”,
“awayTeam_id”: “105”,
“homeTeam”: “Beziers”,
“awayTeam”: “Valenciennes”,
“status”: “Not Started”,
“statusShort”: “NS”,
“goalsHomeTeam”: null,
“goalsAwayTeam”: null,
“halftime_score”: null,
“final_score”: null,
“penalty”: null,
“elapsed”: “0”,
“firstHalfStart”: “0”,
“secondHalfStart”: “0”
},
</code></pre>