Site
Home / Forum / Developers / Filter by country

Filter by country


Posted: 28 Sep 2019 15:27

ozbodd
Posts: 1
Joined: Sep 2019

Hi all

New to this and testing. Is it possible to get the TV event data by one country? I am not sure how to filter the results below just for the UK

'https://www.thesportsdb.com/api/v1/json/1/eventstv.php?d='+todayOnTv;

Cheers
Steve

Posted: 29 Sep 2019 09:46

zag
Posts: 1,558
Joined: Oct 2016

Morning,

This isn't possible at the moment but could be a nice feature for sure! I will look into it.

EDIT: unfortunately we don't store the TV station country in the TV Listing table.

The only thing I can think of is to store a local whitelist of channels and filter by that. For example:

"BT Sport 1 HD" and "Sky Sports Football" are UK only channels.

EDIT2: Actually scratch that we DO store the country I will see what I can do.....

Posted: 29 Sep 2019 10:08

zag
Posts: 1,558
Joined: Oct 2016

Ok this is a cool feature so I implemented it

Examples:

https://www.thesportsdb.com/api/v1/json/1/eventstv.php?d=2019-09-28&a=United%20States
https://www.thesportsdb.com/api/v1/json/1/eventstv.php?d=2019-09-28&a=United%20Kingdom
https://www.thesportsdb.com/api/v1/json/1/eventstv.php?d=2019-09-28&a=United%20Kingdom&s=Cycling


As always this feature is in beta and might change or have bugs

Let me know....

EDIT: I also normalized a few channel countries as some were USA or United States. Now they are all United States going forward.


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