Septzzz's picture
Upload folder using huggingface_hub (part 21)
7c747b3 verified
Raw
History Blame Contribute Delete
71.2 kB
import requests
import json
from datetime import date, datetime, timedelta
import os
from typing import Optional, Dict, Union, List
def cuptrees(offset: str='0', league_id: str='eq.1136', season_id: str='eq.1173', limit: str='50', is_id: str='eq.13902', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all cup knock outs.
You can use `id` from the `seasons` or `leagues` endpoint to get the wanted cup knock out tree.
Fields in rounds:
Field | Explanation
--- | ---
`order` | The order of the round
`description` | The description of the round
`blocks` | The blocks of the round
`finished` | If the event is finished
`order` | The order of the block
`home_team_score` | The score of the home team
`away_team_score` | The score of the away team
`has_next_round_link` | If the event has next round
`event_in_progress` | If the event is in play
`series_start_date_timestamp` | The start date of the event
`automatic_progression` | If the event has automatic progression
`participants` | The participants of the block (event)
`team_id` | The id of the team
`winner` | If the team is winner of the block
`order` | The order of the participants
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated after every finished match.<br />**Recommended Calls**: 1 call after finished match.
### Use Cases
Get one cup knock out from the `id`<br />`https://aussie-rules.sportdetect.com/cuptrees?id=eq.{id}`<br /><br />Get cups from the `season_id`<br />`https://aussie-rules.sportdetect.com/cuptrees?season_id=eq.{season_id}`<br /><br />Get cups from the `league_id`<br />`https://aussie-rules.sportdetect.com/cuptrees?league_id=eq.{league_id}`"
offset: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
season_id: The id of the season. example:`eq.{season_id}`
limit: Limiting and Pagination
is_id: The id of the cup tree. example:`eq.{id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/cuptrees"
querystring = {}
if offset:
querystring['offset'] = offset
if league_id:
querystring['league_id'] = league_id
if season_id:
querystring['season_id'] = season_id
if limit:
querystring['limit'] = limit
if is_id:
querystring['id'] = is_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def standings(limit: str='50', offset: str='0', league_id: str='eq.931', type: str='eq.away', is_id: str='eq.73876', season_id: str='eq.1154', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all standings.
For the type argument you can search by: **home**, **away** and **total**.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated after every finished match.<br />**Recommended Calls**: 1 call per finished match.
### Use Cases
Get all standings<br />`https://aussie-rules.sportdetect.com/standings`<br /><br />Get the standing from the `id`<br />`https://aussie-rules.sportdetect.com/standings?id=eq.{id}`<br /><br />Get the standing from the `league_id`<br />`https://aussie-rules.sportdetect.com/standings?league_id=eq.{league_id}`<br /><br />Get the standing from the `league_id` and `season_id`<br />`https://aussie-rules.sportdetect.com/standings?league_id=eq.{league_id}&season_id=eq.{season_id}`<br /><br />Get the standing from the `league_id`, `season_id` and `type`<br />`https://aussie-rules.sportdetect.com/standings?league_id=eq.{league_id}&season_id=eq.{season_id}&type=eq.{type}`"
limit: Limiting and Pagination
offset: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
type: The type of the standing. example:`eq.{type}`
is_id: The id of the standing. example:`eq.{id}`
season_id: The id of the season. example:`eq.{season_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/standings"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if league_id:
querystring['league_id'] = league_id
if type:
querystring['type'] = type
if is_id:
querystring['id'] = is_id
if season_id:
querystring['season_id'] = season_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def money(limit: str='50', offset: str='0', is_id: str='eq.85', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all money values.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
### Use Cases
Get the money from the `id`<br />`https://aussie-rules.sportdetect.com/money?id=eq.{id}`"
limit: Limiting and Pagination
offset: Limiting and Pagination
is_id: The id. example:`eq.{id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/money"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if is_id:
querystring['id'] = is_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def leagues_info_last_season_top_scorers(limit: str='50', league_id: str='eq.1', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all last top scorers of the leagues and the cups.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call after every finished season.
### Use Cases
Get the top scorers from the `league_id`<br />`https://aussie-rules.sportdetect.com/leagues-info-last-season-top-scorers?league_id=eq.{league_id}`"
limit: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/leagues-info-last-season-top-scorers"
querystring = {}
if limit:
querystring['limit'] = limit
if league_id:
querystring['league_id'] = league_id
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def leagues_info_last_season_attendance(offset: str='0', league_id: str='eq.1', limit: str='50', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all last season attendance of the leagues and the cups.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call after every finished season.
### Use Cases
Get the last season attendance from the `league_id`<br />`https://aussie-rules.sportdetect.com/leagues-info-last-season-attendance?league_id=eq.{league_id}`"
offset: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
limit: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/leagues-info-last-season-attendance"
querystring = {}
if offset:
querystring['offset'] = offset
if league_id:
querystring['league_id'] = league_id
if limit:
querystring['limit'] = limit
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def leagues_info_largest_stadium(offset: str='0', limit: str='50', league_id: str='eq.1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all largest stadiums of of the leagues and the cups.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call per month.
### Use Cases
Get the largest stadium from the `league_id`<br />`https://aussie-rules.sportdetect.com/leagues-info-largest-stadium?league_id=eq.{league_id}`"
offset: Limiting and Pagination
limit: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/leagues-info-largest-stadium"
querystring = {}
if offset:
querystring['offset'] = offset
if limit:
querystring['limit'] = limit
if league_id:
querystring['league_id'] = league_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def leagues_info_promotions(limit: str='50', league_id: str='eq.1', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all promotions of the leagues and the cups.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call per day.
### Use Cases
Get the promotions from the `league_id`<br />`https://aussie-rules.sportdetect.com/leagues-info-promotions?league_id=eq.{league_id}`"
limit: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/leagues-info-promotions"
querystring = {}
if limit:
querystring['limit'] = limit
if league_id:
querystring['league_id'] = league_id
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def tv_channels(limit: str='50', is_id: str='eq.1', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all tv channels for every country.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a week.<br />**Recommended Calls**: 1 call per hour.
### Use Cases
Get all tv channels<br />`https://aussie-rules.sportdetect.com/tv-channels`<br /><br />Search the tv channels by the `name`<br />`https://aussie-rules.sportdetect.com/tv-channels?name=like.*Sportklub*`<br /><br />Get the tv channels by the `id`<br />`https://aussie-rules.sportdetect.com/tv-channels?id=eq.{id}`"
limit: Limiting and Pagination
is_id: The id of the tv channel. example:`eq.{id}`
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/tv-channels"
querystring = {}
if limit:
querystring['limit'] = limit
if is_id:
querystring['id'] = is_id
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def leagues(limit: str='50', offset: str='0', category_id: str='eq.224', is_id: str='eq.931', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all leagues and cups.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call per hour.
You can get the image of the league by calling the following url: `https://images.sportdetect.com/{hash_image}.png`
### Use Cases
Get all leagues<br />`https://aussie-rules.sportdetect.com/leagues`<br /><br />Search the leagues by the `name`<br />`https://aussie-rules.sportdetect.com/leagues?name=like.*Championship*`<br /><br />Get the leagues from the `id`<br />`https://aussie-rules.sportdetect.com/leagues?id=eq.{id}`<br /><br />Get the leagues from the `category_id`<br />`https://aussie-rules.sportdetect.com/leagues?category_id=eq.{category_id}`"
limit: Limiting and Pagination
offset: Limiting and Pagination
category_id: The id of the category. example:`eq.{category_id}`
is_id: The id of the league. example:`eq.{id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/leagues"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if category_id:
querystring['category_id'] = category_id
if is_id:
querystring['id'] = is_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events_tv_channels(alpha2: str='eq.AU', limit: str='50', offset: str='0', event_id: str='eq.4379', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all tv channels for every event from all countries.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call per hour.
### Use Cases
Get all tv channels for the event by the `event_id`<br />`https://aussie-rules.sportdetect.com/events-tv-channels?event_id=eq.{event_id}`<br /><br />Get all tv channels for the event by the `event_id` and `alpha2`<br />`https://aussie-rules.sportdetect.com/events-tv-channels?event_id=eq.{event_id}&alpha2=eq.{alpha2}`"
alpha2: The alpha2 of the country. example:`eq.{alpha2}`
limit: Limiting and Pagination
offset: Limiting and Pagination
event_id: The id of the event. example:`eq.{event_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events-tv-channels"
querystring = {}
if alpha2:
querystring['alpha2'] = alpha2
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if event_id:
querystring['event_id'] = event_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def leagues_info_tv_partners(offset: str='0', league_id: str='eq.1', limit: str='50', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all tv partners of the leagues and the cups.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call per day.
### Use Cases
Get the tv partners from the `league_id`<br />`https://aussie-rules.sportdetect.com/leagues-info-tv-partners?league_id=eq.{league_id}`"
offset: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
limit: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/leagues-info-tv-partners"
querystring = {}
if offset:
querystring['offset'] = offset
if league_id:
querystring['league_id'] = league_id
if limit:
querystring['limit'] = limit
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def leagues_info_official_organisation(limit: str='50', offset: str='0', league_id: str='eq.1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return official organisations of the leagues and the cups.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call per day.
### Use Cases
Get the official organisation from the `league_id`<br />`https://aussie-rules.sportdetect.com/leagues-info-official-organisation?league_id=eq.{league_id}`"
limit: Limiting and Pagination
offset: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/leagues-info-official-organisation"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if league_id:
querystring['league_id'] = league_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events_live(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all live events from the sport.
It has the same results as the Events endpoint."
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events-live"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events_lineups(limit: str='50', is_id: str='eq.1', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all event's lineups.
With this endpoint you can see the lineups from the event. This endpoint also has `confirmed` filed to check if the lineup is confirmed.
Fields in lineup:
Field | Explanation
--- | ---
`formation` | The formation of the lineup
`player_color_primary` | The primary color of the players
`player_color_number` | The number color of the players
`player_color_outline` | The outline color of the players
`goalkeeper_color_primary` | The primary color of the goalkeeper
`goalkeeper_color_number` | The number color of the goalkeeper
`goalkeeper_color_outline` | The outline color of the goalkeeper
`players` | The players of the lineup
Fields in players:
Field | Explanation
--- | ---
`player_id` | The id of the player
`shirt_number` | The shirt number of the player
`jersey_number` | The jersey number of the player
`position` | The position of the player
`substitute` | If the player is substituted
Resons for missing the match:
Id | Reason
--- | ---
0 | Other
1 | Injured
2 | Ill
3 | Suspended
11 | YellowCard
12 | YellowRedCard
13 | RedCard
21 | OnLoan
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.
**Recommended Calls**: Several times a day.
### Use Cases
Get the lineups from the `id`<br />`https://aussie-rules.sportdetect.com/events-lineups?id=eq.{id}`"
limit: Limiting and Pagination
is_id: The id of the lineup. example:`eq.{id}`
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events-lineups"
querystring = {}
if limit:
querystring['limit'] = limit
if is_id:
querystring['id'] = is_id
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events(referee_id: str='eq.207', venue_id: str='eq.865', is_id: str='eq.659', offset: str='0', limit: str='50', season_id: str='eq.954', away_team_id: str='eq.4507', home_team_id: str='eq.4531', tournament_id: str='eq.2136', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all events.
You can use `id` from the `seasons`, `tournaments`, `rounds`, `venues`, `referees` and `teams` endpoint to get the events.
Events status codes:
`type` | `description`
--- | ---
canceled | Canceled
finished | Ended
finished | AET
finished | Removed
notstarted | Not started
postponed | Postponed
For **scores** we have fields for covering that: `current`, `display`, `period1`, `period2`, `period3`, `period4`, `normaltime`, `overtime`.
For **time extras or injuries** we have fields for covering that: **current**, **period1**, **period2**, **period3**, **period4**, **current_period_start_timestamp**.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every 10 seconds.<br />**Recommended Calls**: 1 call every 10 seconds.
### Use Cases
Get all events<br />`https://aussie-rules.sportdetect.com/events`<br /><br />Get event from the `id`<br />`https://aussie-rules.sportdetect.com/events?id=eq.{id}`<br /><br />Get events from the `season_id`<br />`https://aussie-rules.sportdetect.com/events?season_id=eq.{season_id}`<br /><br />Get events from the `tournament_id`<br />`https://aussie-rules.sportdetect.com/events?tournament_id=eq.{tournament_id}`<br /><br />Get events from the `round_id`<br />`https://aussie-rules.sportdetect.com/events?round_id=eq.{round_id}`<br /><br />Get events from the `venue_id`<br />`https://aussie-rules.sportdetect.com/events?venue_id=eq.{venue_id}`<br /><br />Get events from the `referee_id`<br />`https://aussie-rules.sportdetect.com/events?referee_id=eq.{referee_id}`<br /><br />**H2H** - Get head to head events with teams ex.(home_team_id, away_team_id)<br />`https://aussie-rules.sportdetect.com/events?or=(home_team_id.eq.{home_team_id}, away_team_id.eq.{home_team_id}, home_team_id.eq.{away_team_id}, away_team_id.eq.{away_team_id})`<br /><br />Get home team events from the `home_team_id`<br />`https://aussie-rules.sportdetect.com/events?home_team_id=eq.{home_team_id}`<br /><br />Get away team events from the `away_team_id`<br />`https://aussie-rules.sportdetect.com/events?away_team_id=eq.{away_team_id}`"
referee_id: The id of the referee. example:`eq.{referee_id}`
venue_id: The id of the venue. example:`eq.{venue_id}`
is_id: The id of the event. example:`eq.{id}`
offset: Limiting and Pagination
limit: Limiting and Pagination
season_id: The id of the season. example:`eq.{season_id}`
away_team_id: The id of the away team. example:`eq.{away_team_id}`
home_team_id: The id of the home team. example:`eq.{home_team_id}`
tournament_id: The id of the tournament. example:`eq.{tournament_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events"
querystring = {}
if referee_id:
querystring['referee_id'] = referee_id
if venue_id:
querystring['venue_id'] = venue_id
if is_id:
querystring['id'] = is_id
if offset:
querystring['offset'] = offset
if limit:
querystring['limit'] = limit
if season_id:
querystring['season_id'] = season_id
if away_team_id:
querystring['away_team_id'] = away_team_id
if home_team_id:
querystring['home_team_id'] = home_team_id
if tournament_id:
querystring['tournament_id'] = tournament_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events_graphs(limit: str='50', offset: str='0', is_id: str='eq.1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all event's graphs.
If the `value` field is a bigger number (> 0) that means that the home team had a big pressure that minute. And if the `value` field is a lower number (< 0) than it means that away team had a bigger pressure that minute. The events-graph's `id` is placed in `events` endpoint if it has the `graph_id` field.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times during a match.<br />**Recommended Calls**: Several times during a match.
### Use Cases
Get the graph from the `id`<br />`https://aussie-rules.sportdetect.com/events-graphs?id=eq.{id}`"
limit: Limiting and Pagination
offset: Limiting and Pagination
is_id: The id of the graph. example:`eq.{id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events-graphs"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if is_id:
querystring['id'] = is_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events_incidents(offset: str='0', limit: str='50', event_id: str='eq.1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all event's incidents.
For **incidents** we have many types: `goal`, `period`.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times during a match.<br />**Recommended Calls**: Several times during a match.
### Use Cases
Get the incidents from the `event_id`<br />`https://aussie-rules.sportdetect.com/events-incidents?event_id=eq.{event_id}`"
offset: Limiting and Pagination
limit: Limiting and Pagination
event_id: The id of the event. example:`eq.{event_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events-incidents"
querystring = {}
if offset:
querystring['offset'] = offset
if limit:
querystring['limit'] = limit
if event_id:
querystring['event_id'] = event_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def referees(offset: str='0', is_id: str='eq.218', country_id: str='eq.14', limit: str='50', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all referees.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: Several times a day.
### Use Cases
Get the referees from the `id`<br />`https://aussie-rules.sportdetect.com/referees?id=eq.{id}`<br /><br />Get the referees from the `country_id`<br />`https://aussie-rules.sportdetect.com/referees?country_id=eq.{country_id}`"
offset: Limiting and Pagination
is_id: The id of the referee. example:`eq.{id}`
country_id: The id of the country. example:`eq.{country_id}`
limit: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/referees"
querystring = {}
if offset:
querystring['offset'] = offset
if is_id:
querystring['id'] = is_id
if country_id:
querystring['country_id'] = country_id
if limit:
querystring['limit'] = limit
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def players(team_id: str='eq.4471', offset: str='0', limit: str='50', is_id: str='eq.42093', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all players.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: Several times a day.
You can get the image of the player by calling the following url: `https://images.sportdetect.com/{hash_image}.png`
### Use Cases
Get all players<br />`https://aussie-rules.sportdetect.com/players`<br /><br />Search the players by the `name`<br />`https://aussie-rules.sportdetect.com/players?name=like.*Cristiano*`<br /><br />Get the players from the `id`<br />`https://aussie-rules.sportdetect.com/players?id=eq.{id}`<br /><br />Get the players from the `team_id`<br />`https://aussie-rules.sportdetect.com/players?team_id=eq.{team_id}`"
team_id: The id of the team. example:`eq.{team_id}`
offset: Limiting and Pagination
limit: Limiting and Pagination
is_id: The id of the player. example:`eq.{id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/players"
querystring = {}
if team_id:
querystring['team_id'] = team_id
if offset:
querystring['offset'] = offset
if limit:
querystring['limit'] = limit
if is_id:
querystring['id'] = is_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events_managers(limit: str='50', offset: str='0', is_id: str='eq.1', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all managers from the events.
The events-manager's `id` is placed in `events` endpoint if it has the `managers_id` field.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: Several times a day.
### Use Cases
Get the manager from the `id`<br />`https://aussie-rules.sportdetect.com/events-managers?id=eq.{id}`"
limit: Limiting and Pagination
offset: Limiting and Pagination
is_id: The id of the event's managers. example:`eq.{id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events-managers"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if is_id:
querystring['id'] = is_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events_weather(limit: str='50', is_id: str='eq.1', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return the weather from the events.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: Several times a day.
### Use Cases
Get the weather from the `id`<br />`https://aussie-rules.sportdetect.com/events-weather?id=eq.{id}`"
limit: Limiting and Pagination
is_id: The id of the weather. example:`eq.{id}`
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events-weather"
querystring = {}
if limit:
querystring['limit'] = limit
if is_id:
querystring['id'] = is_id
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def categories(alpha: str='eq.AU', limit: str='50', is_id: str='eq.224', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all categories.
You can use the `alpha` field to get the specific category as a country.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every hour.<br />**Recommended Calls**: 1 call per hour.
You can get the image of the category by calling the following url: `https://images.sportdetect.com/{hash_image}.png`
### Use Cases
Get all categories<br />`https://aussie-rules.sportdetect.com/categories`<br /><br />Get one category from the `id`<br />`https://aussie-rules.sportdetect.com/categories?id=eq.{id}`<br /><br />Get all categories from the `alpha`<br />`https://aussie-rules.sportdetect.com/categories?alpha=eq.{alpha}`"
alpha: The alpha2 name of the category (_country_). example:`eq.{alpha}`
limit: Limiting and Pagination
is_id: The id of the category. example:`eq.{id}`
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/categories"
querystring = {}
if alpha:
querystring['alpha'] = alpha
if limit:
querystring['limit'] = limit
if is_id:
querystring['id'] = is_id
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def events_coverage(offset: str='0', event_id: str='eq.1', limit: str='50', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all event's coverages.
With this endpoint you can see what data does your event has.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated after every hour.<br />**Recommended Calls**: 1 call after every match.
### Use Cases
Get the event coverage from the `event_id`<br />`https://aussie-rules.sportdetect.com/events-coverage?event_id=eq.{event_id}`"
offset: Limiting and Pagination
event_id: The id of the event. example:`eq.{event_id}`
limit: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/events-coverage"
querystring = {}
if offset:
querystring['offset'] = offset
if event_id:
querystring['event_id'] = event_id
if limit:
querystring['limit'] = limit
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def tournaments(offset: str='0', league_id: str='eq.931', is_id: str='eq.2136', category_id: str='eq.224', limit: str='50', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all tournaments.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a week.<br />**Recommended Calls**: Several times a week.
### Use Cases
Get all tournaments<br />`https://aussie-rules.sportdetect.com/tournaments`<br /><br />Get the tournaments from the `id`<br />`https://aussie-rules.sportdetect.com/tournaments?id=eq.{id}`<br /><br />Get the tournaments from the `league_id`<br />`https://aussie-rules.sportdetect.com/tournaments?league_id=eq.{league_id}`<br /><br />Get the tournaments from the `category_id`<br />`https://aussie-rules.sportdetect.com/tournaments?category_id=eq.{category_id}`"
offset: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
is_id: The id of the tournament. example:`eq.{id}`
category_id: The id of the category. example:`eq.{category_id}`
limit: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/tournaments"
querystring = {}
if offset:
querystring['offset'] = offset
if league_id:
querystring['league_id'] = league_id
if is_id:
querystring['id'] = is_id
if category_id:
querystring['category_id'] = category_id
if limit:
querystring['limit'] = limit
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def seasons_info(limit: str='50', offset: str='0', season_id: str='eq.954', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all season's info.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every 1 hour.<br />**Recommended Calls**: 1 call per hour.
### Use Cases
Get the info from the `season_id`<br />`https://aussie-rules.sportdetect.com/seasons-info?season_id=eq.{season_id}`"
limit: Limiting and Pagination
offset: Limiting and Pagination
season_id: The id of the season. example:`eq.{season_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/seasons-info"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if season_id:
querystring['season_id'] = season_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def odds(market_name: str='eq.Full time', is_live: str='eq.false', choice_group: str=None, event_id: str='eq.82', limit: str='50', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all odds from bet365.
| market_name |
| --- |
| Full time |
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every 5 minutes.<br />**Recommended Calls**: 1 call per 5 minutes.
### Use Cases
Get the odds by the `event_id`<br />`https://aussie-rules.sportdetect.com/odds?event_id=eq.{event_id}`<br /><br />Get the odds by the `event_id` and `market_name`<br />`https://aussie-rules.sportdetect.com/injuries?event_id=eq.{event_id}&market_name=eq.{market_name}`<br /><br />Get the odds by the `event_id`, `market_name` and `choice_group`<br />`https://aussie-rules.sportdetect.com/injuries?event_id=eq.{event_id}&market_name=eq.{market_name}&choice_group=eq.{choice_group}`"
market_name: The name of the market type. example:`eq.{market_name}`
is_live: If the event is live. example:`eq.{is_live}`
choice_group: The group of the market. example:`eq.{choice_group}`
event_id: The id of the event. example:`eq.{event_id}`
limit: Limiting and Pagination
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/odds"
querystring = {}
if market_name:
querystring['market_name'] = market_name
if is_live:
querystring['is_live'] = is_live
if choice_group:
querystring['choice_group'] = choice_group
if event_id:
querystring['event_id'] = event_id
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def seasons(limit: str='50', offset: str='0', is_id: str='eq.954', league_id: str='eq.931', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all seasons.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every 1 month.<br />**Recommended Calls**: 1 call per month.
### Use Cases
Get all seasons<br />`https://aussie-rules.sportdetect.com/seasons`<br /><br />Get the seasons from the `id`<br />`https://aussie-rules.sportdetect.com/seasons?id=eq.{id}`<br /><br />Get the seasons from the `league_id`<br />`https://aussie-rules.sportdetect.com/seasons?league_id=eq.{league_id}`"
limit: Limiting and Pagination
offset: Limiting and Pagination
is_id: The id of the season. example:`eq.{id}`
league_id: The id of the league. example:`eq.{league_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/seasons"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if is_id:
querystring['id'] = is_id
if league_id:
querystring['league_id'] = league_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def seasons_rounds(limit: str='50', season_id: str='eq.1158', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all season's rounds.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every 1 hour.<br />**Recommended Calls**: 1 call per hour.
### Use Cases
Get the rounds from the `season_id`<br />`https://aussie-rules.sportdetect.com/seasons-rounds?season_id=eq.{season_id}`"
limit: Limiting and Pagination
season_id: The id of the season. example:`eq.{season_id}`
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/seasons-rounds"
querystring = {}
if limit:
querystring['limit'] = limit
if season_id:
querystring['season_id'] = season_id
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def news_teams(team_id: str='eq.4479', limit: str='50', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all news of the teams.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every 15 minutes.<br />**Recommended Calls**: 1 call every 15 minutes.
### Use Cases
Get the news from the `team_id`<br />`https://aussie-rules.sportdetect.com/news-teams?team_id=eq.{team_id}`"
team_id: The id of the team. example:`eq.{team_id}`
limit: Limiting and Pagination
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/news-teams"
querystring = {}
if team_id:
querystring['team_id'] = team_id
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def news_leagues(offset: str='0', limit: str='50', league_id: str='eq.931', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all news of the leagues.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every 15 minutes.<br />**Recommended Calls**: 1 call every 15 minutes.
### Use Cases
Get the news from the `league_id`<br />`https://aussie-rules.sportdetect.com/news-leagues?league_id=eq.{league_id}`"
offset: Limiting and Pagination
limit: Limiting and Pagination
league_id: The id of the league. example:`eq.{league_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/news-leagues"
querystring = {}
if offset:
querystring['offset'] = offset
if limit:
querystring['limit'] = limit
if league_id:
querystring['league_id'] = league_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def venues(country_id: str='eq.3', is_id: str='eq.1', limit: str='50', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all venues.
With geolocation attribute from `geolocations` endpoint we can see latitude and longitute of the venue.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a week.<br />**Recommended Calls**: Several times a week.
You can get the image of the venue by calling the following url: `https://images.sportdetect.com/{hash_image}.png`
### Use Cases
Get all venues<br />`https://aussie-rules.sportdetect.com/venues`<br /><br />Get the venues from the `id`<br />`https://aussie-rules.sportdetect.com/venues?id=eq.{id}`<br /><br />Get the venues from the `country_id`<br />`https://aussie-rules.sportdetect.com/venues?country_id=eq.{country_id}`"
country_id: The id of the country. example:`eq.{country_id}`
is_id: The id of the venue. example:`eq.{id}`
limit: Limiting and Pagination
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/venues"
querystring = {}
if country_id:
querystring['country_id'] = country_id
if is_id:
querystring['id'] = is_id
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def geolocations(is_id: str='eq.1', limit: str='50', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return the geolocation of the venues.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated according to the venues.<br />**Recommended Calls**: 1 call per every venue.
### Use Cases
Get the geolocation from the `id`<br />`https://aussie-rules.sportdetect.com/geolocations?id=eq.{id}`"
is_id: The id of the location. example:`eq.{id}`
limit: Limiting and Pagination
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/geolocations"
querystring = {}
if is_id:
querystring['id'] = is_id
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def countries(alpha: str='eq.NX', is_id: str='eq.1', limit: str='50', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all countries.
You can use the `alpha` field to get the country
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated every hour.<br />**Recommended Calls**: 1 call per hour.
You can get the image of the country by calling the following url: `https://images.sportdetect.com/{hash_image}.png`
### Use Cases
Get all countries<br />`https://aussie-rules.sportdetect.com/countries`<br /><br />Get the country from the `id`<br />`https://aussie-rules.sportdetect.com/countries?id=eq.{id}`<br /><br />Get all countries from the `alpha`<br />`https://aussie-rules.sportdetect.com/countries?alpha=eq.{alpha}`"
alpha: The alpha2 name of the country. example:`eq.{alpha}`
is_id: The id of the country. example:`eq.{id}`
limit: Limiting and Pagination
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/countries"
querystring = {}
if alpha:
querystring['alpha'] = alpha
if is_id:
querystring['id'] = is_id
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def managers(team_id: str='eq.4394', offset: str='0', country_id: str='eq.14', is_id: str='eq.1191', limit: str='50', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all managers.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: 1 call per hour.
You can get the image of the manager by calling the following url: `https://images.sportdetect.com/{hash_image}.png`
### Use Cases
Get the manager from the `id`<br />`https://aussie-rules.sportdetect.com/managers?id=eq.{id}`<br /><br />Get the manager from the `country_id`<br />`https://aussie-rules.sportdetect.com/managers?country_id=eq.{country_id}`<br /><br />Get the manager from the `team_id`<br />`https://aussie-rules.sportdetect.com/managers?team_id=eq.{team_id}`"
team_id: The id of the team. example:`eq.{team_id}`
offset: Limiting and Pagination
country_id: The id of the country. example:`eq.{country_id}`
is_id: The id of the manager. example:`eq.{id}`
limit: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/managers"
querystring = {}
if team_id:
querystring['team_id'] = team_id
if offset:
querystring['offset'] = offset
if country_id:
querystring['country_id'] = country_id
if is_id:
querystring['id'] = is_id
if limit:
querystring['limit'] = limit
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def teams_leagues(offset: str='0', limit: str='50', team_id: str='eq.4242', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all team's leagues.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: Several times a day.
### Use Cases
Get the leagues from the `team_id`<br />`https://aussie-rules.sportdetect.com/teams-leagues?team_id=eq.{team_id}`"
offset: Limiting and Pagination
limit: Limiting and Pagination
team_id: The id of the team. example:`eq.{team_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/teams-leagues"
querystring = {}
if offset:
querystring['offset'] = offset
if limit:
querystring['limit'] = limit
if team_id:
querystring['team_id'] = team_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def teams(limit: str='50', offset: str='0', manager_id: str='eq.1204', country_id: str='eq.14', is_id: str='eq.4447', primary_league_id: str='eq.931', tournament_id: str='eq.2136', venue_id: str='eq.870', category_id: str='eq.224', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
" "
limit: Limiting and Pagination
offset: Limiting and Pagination
manager_id: The id of the manager. example:`eq.{manager_id}`
country_id: The id of the country. example:`eq.{country_id}`
is_id: The id of the team. example:`eq.{id}`
primary_league_id: The id of the primary league
tournament_id: The id of the tournament. example:`eq.{tournament_id}`
venue_id: The id of the venue. example:`eq.{venue_id}`
category_id: The id of the category. example:`eq.{category_id}`
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/teams"
querystring = {}
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
if manager_id:
querystring['manager_id'] = manager_id
if country_id:
querystring['country_id'] = country_id
if is_id:
querystring['id'] = is_id
if primary_league_id:
querystring['primary_league_id'] = primary_league_id
if tournament_id:
querystring['tournament_id'] = tournament_id
if venue_id:
querystring['venue_id'] = venue_id
if category_id:
querystring['category_id'] = category_id
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def teams_seasons(team_id: str='eq.4242', limit: str='50', offset: str='0', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Using this endpoint you can return all team's seasons.
This endpoint uses a pagination system and the page argument allows you to switch between the various pages.
To switch pages you should use `/{endpoint}?limit={limit}&offset={offset}` ex.(`/{endpoint}?limit=15&offset=30}`) as parameters in endpoint.
> **Pagination**: 50 results per page. Enter offset and limit number to get the next results.
**Update Period**: The endpoint is updated several times a day.<br />**Recommended Calls**: Several times a day.
### Use Cases
Get the seasons from the `team_id`<br />`https://aussie-rules.sportdetect.com/teams-seasons?team_id=eq.{team_id}`"
team_id: The id of the team. example:`eq.{team_id}`
limit: Limiting and Pagination
offset: Limiting and Pagination
"""
url = f"https://aussie-rules-detect.p.rapidapi.com/teams-seasons"
querystring = {}
if team_id:
querystring['team_id'] = team_id
if limit:
querystring['limit'] = limit
if offset:
querystring['offset'] = offset
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "aussie-rules-detect.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation