primaeval
Posts: 1
Joined: Thu Jul 06, 2017 3:58 pm

Is the API broken right now?

Sun Jul 09, 2017 9:10 am

Hi
I'm getting a lot of json errors. I tried using the 1 api key and the one in the kodi addon metadata.thesportsdb.com just to verify.
eg
http://www.thesportsdb.com/api/v1/json/ ... hp?id=4391
response
<br />
<b>Notice</b>: Undefined variable: round in <b>C:\inetpub\thesportsdb\api\v1\json\8235861265252\eventsnextleague.php</b> on line <b>15</b><br />
{"events":null}

and
http://www.thesportsdb.com/api/v1/json/ ... 328&s=1617
response
{"events":[{"idEvent":"508731","...
}]}<br />
<b>Notice</b>: Undefined index: all in <b>C:\inetpub\thesportsdb\api\v1\json\8235861265252\eventsseason.php</b> on line <b>36</b><br />

User avatar
zag
Site Admin
Posts: 699
Joined: Tue Oct 11, 2016 9:43 am

Re: Is the API broken right now?

Mon Jul 10, 2017 9:19 am

Probably no scheduled events planned for NFL as our script only syncs past results in that sport.

I added an event manually and the API is working now.

I will check the 2nd API error. Looks like a data bug.

veloso11
Posts: 1
Joined: Mon Mar 19, 2018 10:07 pm

Re: Is the API broken right now?

Mon Mar 19, 2018 11:02 pm

I can't seem to make a php curl request to any of the url provided. Can you please help me?

User avatar
zag
Site Admin
Posts: 699
Joined: Tue Oct 11, 2016 9:43 am

Re: Is the API broken right now?

Tue Mar 20, 2018 2:30 pm

Working fine here, Just copy this into a browser url:

https://www.thesportsdb.com/api/v1/json ... ?t=Arsenal

Not sure about curl sorry, it should work as expected.

User avatar
zag
Site Admin
Posts: 699
Joined: Tue Oct 11, 2016 9:43 am

Re: Is the API broken right now?

Tue Mar 20, 2018 2:32 pm

With PHP you can just do this:

Code: Select all

<?php
$url = 'https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=Arsenal';
$JSON = file_get_contents($url);

// echo the JSON (you can echo this to JavaScript to use it there)
echo $JSON;

// You can decode it to process it in PHP
$data = json_decode($JSON);
var_dump($data);
?>

Return to “Developers”