use filters with Rest api

16 views
Skip to first unread message

omar ahmed

unread,
Jun 23, 2019, 8:23:34 AM6/23/19
to Django users
it's my first time to use REST APIs ... now i try to retrieve data from "https://www.football-data.org"
i want to list teams for a particular competition ..
so in docs it was sample ... and i should to use these filters season={YEAR}
stage={STAGE} but i don't know how ..thanks
connection = http.client.HTTPConnection('api.football-data.org')
headers = { 'X-Auth-Token': '72ae860eeabb435d9efef739f853b4fe' }
connection.request('GET', '/v2/competitions/2021/teams', None, headers)
response = json.loads(connection.getresponse().read().decode())
Reply all
Reply to author
Forward
0 new messages