Site
Home / Forum / Developers / Is the API broken right now?

Is the API broken right now?


Posted: 09 Jul 2017 09:10

primaeval
Posts: 1
Joined: Jul 2017

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
https://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
https://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 />

Posted: 10 Jul 2017 09:19

zag
Posts: 1,558
Joined: Oct 2016

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.

Posted: 19 Mar 2018 23:02

veloso11
Posts: 1
Joined: Mar 2018

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

Posted: 20 Mar 2018 14:30

zag
Posts: 1,558
Joined: Oct 2016

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.

Posted: 20 Mar 2018 14:32

zag
Posts: 1,558
Joined: Oct 2016

With PHP you can just do this:

<?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);
?>



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