Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,17 +44,17 @@ def get_Competition_Code(competition_name: str)-> str:
|
|
44 |
return None
|
45 |
|
46 |
@tool
|
47 |
-
def search_Competition_Matches_Results_By_Date(competition_name: str,
|
48 |
"""A tool that fetch football games results for a given competition from a specified date.
|
49 |
Args:
|
50 |
competition_name: A string representing the full name of the competition, e.g., "Premier League" or "Bundesliga".
|
51 |
-
date_str: A string representing the
|
52 |
"""
|
53 |
|
54 |
competition_code = get_Competition_Code(competition_name)
|
55 |
|
56 |
# Create the URL using an f-string
|
57 |
-
url = f'https://api.football-data.org/v4/competitions/{competition_code}/matches?matchday={
|
58 |
print(url)
|
59 |
# Set up the headers with your API token.
|
60 |
headers = {
|
|
|
44 |
return None
|
45 |
|
46 |
@tool
|
47 |
+
def search_Competition_Matches_Results_By_Date(competition_name: str, matchday: int)-> dict:
|
48 |
"""A tool that fetch football games results for a given competition from a specified date.
|
49 |
Args:
|
50 |
competition_name: A string representing the full name of the competition, e.g., "Premier League" or "Bundesliga".
|
51 |
+
date_str: A string representing the matchday for which to retrieve match results format: Integer /[1-4]+[0-9]*/.
|
52 |
"""
|
53 |
|
54 |
competition_code = get_Competition_Code(competition_name)
|
55 |
|
56 |
# Create the URL using an f-string
|
57 |
+
url = f'https://api.football-data.org/v4/competitions/{competition_code}/matches?matchday={matchday}'
|
58 |
print(url)
|
59 |
# Set up the headers with your API token.
|
60 |
headers = {
|