Septzzz commited on
Commit
8ba3cef
·
verified ·
1 Parent(s): 7c747b3

Upload folder using huggingface_hub (part 22)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +6 -0
  2. toolbench/toolenv/tools/Sports/ipl_2023_live_scores_match_details_and_points_table_api.json +57 -0
  3. toolbench/toolenv/tools/Sports/ipl_2023_live_scores_match_details_and_points_table_api/api.py +71 -0
  4. toolbench/toolenv/tools/Sports/ipl_api.json +106 -0
  5. toolbench/toolenv/tools/Sports/ipl_api/api.py +115 -0
  6. toolbench/toolenv/tools/Sports/ipl_dashboard.json +210 -0
  7. toolbench/toolenv/tools/Sports/ipl_dashboard/api.py +71 -0
  8. toolbench/toolenv/tools/Sports/ipl_points_table.json +31 -0
  9. toolbench/toolenv/tools/Sports/ipl_points_table/api.py +29 -0
  10. toolbench/toolenv/tools/Sports/jsonodds.json +68 -0
  11. toolbench/toolenv/tools/Sports/jsonodds/api.py +134 -0
  12. toolbench/toolenv/tools/Sports/keepthescore_com.json +113 -0
  13. toolbench/toolenv/tools/Sports/kings_league_stats.json +0 -0
  14. toolbench/toolenv/tools/Sports/kings_league_stats/api.py +96 -0
  15. toolbench/toolenv/tools/Sports/kiniscore_com.json +349 -0
  16. toolbench/toolenv/tools/Sports/kiniscore_com/api.py +281 -0
  17. toolbench/toolenv/tools/Sports/kooora.json +24 -0
  18. toolbench/toolenv/tools/Sports/kooora/api.py +29 -0
  19. toolbench/toolenv/tools/Sports/la_liga_live_scores.json +213 -0
  20. toolbench/toolenv/tools/Sports/la_liga_live_scores/api.py +116 -0
  21. toolbench/toolenv/tools/Sports/laliga_standings.json +409 -0
  22. toolbench/toolenv/tools/Sports/laliga_standings/api.py +33 -0
  23. toolbench/toolenv/tools/Sports/langquoctru.json +24 -0
  24. toolbench/toolenv/tools/Sports/langquoctru/api.py +45 -0
  25. toolbench/toolenv/tools/Sports/laserforce_statistics.json +173 -0
  26. toolbench/toolenv/tools/Sports/laserforce_statistics/api.py +71 -0
  27. toolbench/toolenv/tools/Sports/lfopen_web.json +91 -0
  28. toolbench/toolenv/tools/Sports/lfopen_web/api.py +260 -0
  29. toolbench/toolenv/tools/Sports/liga_nos_live_scores.json +297 -0
  30. toolbench/toolenv/tools/Sports/liga_nos_live_scores/api.py +230 -0
  31. toolbench/toolenv/tools/Sports/ligue_1_live_scores.json +141 -0
  32. toolbench/toolenv/tools/Sports/ligue_1_live_scores/api.py +119 -0
  33. toolbench/toolenv/tools/Sports/ligue_1_standings.json +409 -0
  34. toolbench/toolenv/tools/Sports/ligue_1_standings/api.py +33 -0
  35. toolbench/toolenv/tools/Sports/live_cricket_score/api.py +50 -0
  36. toolbench/toolenv/tools/Sports/live_cricket_score_and_fantasy.json +77 -0
  37. toolbench/toolenv/tools/Sports/live_cricket_score_and_fantasy/api.py +73 -0
  38. toolbench/toolenv/tools/Sports/live_football_score/api.py +281 -0
  39. toolbench/toolenv/tools/Sports/live_golf_data.json +338 -0
  40. toolbench/toolenv/tools/Sports/live_golf_data/api.py +236 -0
  41. toolbench/toolenv/tools/Sports/live_line.json +808 -0
  42. toolbench/toolenv/tools/Sports/live_line/api.py +444 -0
  43. toolbench/toolenv/tools/Sports/live_score_api.json +357 -0
  44. toolbench/toolenv/tools/Sports/live_score_api/api.py +324 -0
  45. toolbench/toolenv/tools/Sports/live_sports/api.py +163 -0
  46. toolbench/toolenv/tools/Sports/live_sports_news.json +499 -0
  47. toolbench/toolenv/tools/Sports/live_sports_news/api.py +96 -0
  48. toolbench/toolenv/tools/Sports/live_sports_odds.json +0 -0
  49. toolbench/toolenv/tools/Sports/live_sports_odds/api.py +89 -0
  50. toolbench/toolenv/tools/Sports/liverpool_latest_articles.json +53 -0
.gitattributes CHANGED
@@ -84,3 +84,9 @@ toolbench/toolenv/tools/Sports/americanfootballapi.json filter=lfs diff=lfs merg
84
  toolbench/toolenv/tools/Sports/basketapi.json filter=lfs diff=lfs merge=lfs -text
85
  toolbench/toolenv/tools/Sports/footapi.json filter=lfs diff=lfs merge=lfs -text
86
  toolbench/toolenv/tools/Sports/football_pro.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
84
  toolbench/toolenv/tools/Sports/basketapi.json filter=lfs diff=lfs merge=lfs -text
85
  toolbench/toolenv/tools/Sports/footapi.json filter=lfs diff=lfs merge=lfs -text
86
  toolbench/toolenv/tools/Sports/football_pro.json filter=lfs diff=lfs merge=lfs -text
87
+ toolbench/toolenv/tools/Sports/os_sports_perform.json filter=lfs diff=lfs merge=lfs -text
88
+ toolbench/toolenv/tools/Sports/sofascores.json filter=lfs diff=lfs merge=lfs -text
89
+ toolbench/toolenv/tools/Sports/sofasport.json filter=lfs diff=lfs merge=lfs -text
90
+ toolbench/toolenv/tools/Sports/sportscore.json filter=lfs diff=lfs merge=lfs -text
91
+ toolbench/toolenv/tools/Sports/surebets_2.json filter=lfs diff=lfs merge=lfs -text
92
+ toolbench/toolenv/tools/Sports/transfermarkt_db.json filter=lfs diff=lfs merge=lfs -text
toolbench/toolenv/tools/Sports/ipl_2023_live_scores_match_details_and_points_table_api.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"IPL 2023 : Live Scores, Match Details, and Points Table API",
3
+ "tool_description":"IPL 2023: Live Scores, Match Details, and Points Table API is a comprehensive API that provides real-time data for all Indian Premier League 2023 matches. With endpoints to fetch match details, live scores, and points table data, IPL 2023 API is the perfect choice for developers who want to create IPL-related apps or websites. Our API is easy to integrate into any project, providing reliable and up-to-date information for all IPL 2023 matches. Whether you're building a live scorecard, a fanta...",
4
+ "title":"IPL 2023 : Live Scores, Match Details, and Points Table API",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/Garuda07/api/ipl-2023-live-scores-match-details-and-points-table-api/",
8
+ "host":"ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"getPointsTable",
12
+ "url":"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getPointsTable",
13
+ "description":"The getPointsTable endpoint returns the points table for Indian Premier League 2023. This endpoint provides the current standings of all teams participating in IPL 2023, including the total number of matches played, wins, losses, and points earned. The points are calculated based on the current tournament format, which awards two points for a win, one point for a tie or no result, and zero points for a loss. The points table is updated after each match, making it a valuable resource for fans, analysts, and broadcasters to track the progress of each team throughout the tournament. Use the data returned by this endpoint to create IPL 2023 leaderboard, tables, and graphs for analysis or display.",
14
+ "method":"GET",
15
+ "required_parameters":[],
16
+ "optional_parameters":[],
17
+ "code":"import requests\n\nurl = \"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getPointsTable\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
18
+ "statuscode":111,
19
+ "body":"",
20
+ "headers":"",
21
+ "schema":""
22
+ },
23
+ {
24
+ "name":"getLiveScore",
25
+ "url":"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getLiveScore",
26
+ "description":"The getLiveScore endpoint returns live scores of a specific match for Indian Premier League 2023. This endpoint takes a match_id parameter, which is the unique ID of the match whose live scores you want to retrieve. The endpoint provides real-time data for the match, including the current score, total overs, and the latest updates on wickets and runs. The data is updated continuously throughout the match, making it ideal for live scorecards, fantasy cricket apps, or sports betting platforms. Use the getMatchIds endpoint to fetch the match_id for the desired match.",
27
+ "method":"GET",
28
+ "required_parameters":[
29
+ {
30
+ "name":"match_id",
31
+ "type":"NUMBER",
32
+ "description":"",
33
+ "default":"1"
34
+ }
35
+ ],
36
+ "optional_parameters":[],
37
+ "code":"import requests\n\nurl = \"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getLiveScore\"\nquerystring = {\"match_id\": match_id}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
38
+ "statuscode":111,
39
+ "body":"",
40
+ "headers":"",
41
+ "schema":""
42
+ },
43
+ {
44
+ "name":"getMatchIds",
45
+ "url":"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getMatchIds",
46
+ "description":"The getMatchIds endpoint returns the details of all matches and their corresponding match IDs for Indian Premier League 2023. This endpoint provides the following information for each match: match ID, match date, teams playing, and venue. The match ID can be used to fetch live scores for a specific match using the getLiveScore endpoint. This endpoint is useful for creating match schedules, generating fixtures, or displaying a list of matches for IPL 2023.",
47
+ "method":"GET",
48
+ "required_parameters":[],
49
+ "optional_parameters":[],
50
+ "code":"import requests\n\nurl = \"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getMatchIds\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
51
+ "statuscode":111,
52
+ "body":"",
53
+ "headers":"",
54
+ "schema":""
55
+ }
56
+ ]
57
+ }
toolbench/toolenv/tools/Sports/ipl_2023_live_scores_match_details_and_points_table_api/api.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def getpointstable(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "The getPointsTable endpoint returns the points table for Indian Premier League 2023. This endpoint provides the current standings of all teams participating in IPL 2023, including the total number of matches played, wins, losses, and points earned. The points are calculated based on the current tournament format, which awards two points for a win, one point for a tie or no result, and zero points for a loss. The points table is updated after each match, making it a valuable resource for fans, analysts, and broadcasters to track the progress of each team throughout the tournament. Use the data returned by this endpoint to create IPL 2023 leaderboard, tables, and graphs for analysis or display."
12
+
13
+ """
14
+ url = f"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getpointstable"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def getlivescore(match_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "The getLiveScore endpoint returns live scores of a specific match for Indian Premier League 2023. This endpoint takes a match_id parameter, which is the unique ID of the match whose live scores you want to retrieve. The endpoint provides real-time data for the match, including the current score, total overs, and the latest updates on wickets and runs. The data is updated continuously throughout the match, making it ideal for live scorecards, fantasy cricket apps, or sports betting platforms. Use the getMatchIds endpoint to fetch the match_id for the desired match."
33
+
34
+ """
35
+ url = f"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getlivescore"
36
+ querystring = {'match_id': match_id, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def getmatchids(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "The getMatchIds endpoint returns the details of all matches and their corresponding match IDs for Indian Premier League 2023. This endpoint provides the following information for each match: match ID, match date, teams playing, and venue. The match ID can be used to fetch live scores for a specific match using the getLiveScore endpoint. This endpoint is useful for creating match schedules, generating fixtures, or displaying a list of matches for IPL 2023."
54
+
55
+ """
56
+ url = f"https://ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com/getmatchids"
57
+ querystring = {}
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "ipl-2023-live-scores-match-details-and-points-table-api.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
toolbench/toolenv/tools/Sports/ipl_api.json ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"IPL API",
3
+ "tool_description":"It is api thats gives the data about IPL(2008-2020) matches data . ",
4
+ "title":"IPL API",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":653,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":8.8,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/arunavabasudev-YBvVIHCgEmE/api/ipl-api1/",
14
+ "host":"ipl-api1.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"getPlayers",
18
+ "url":"https://ipl-api1.p.rapidapi.com/players",
19
+ "description":"getting data for the players",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[],
23
+ "code":"import requests\n\nurl = \"https://ipl-api1.p.rapidapi.com/players\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-api1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
24
+ "statuscode":111,
25
+ "body":"",
26
+ "headers":"",
27
+ "schema":""
28
+ },
29
+ {
30
+ "name":"getMatchesByTeam",
31
+ "url":"https://ipl-api1.p.rapidapi.com/match",
32
+ "description":"get all the matches by a particular team",
33
+ "method":"GET",
34
+ "required_parameters":[
35
+ {
36
+ "name":"team",
37
+ "type":"STRING",
38
+ "description":"",
39
+ "default":"Kolkata Knight Riders"
40
+ }
41
+ ],
42
+ "optional_parameters":[],
43
+ "code":"import requests\n\nurl = \"https://ipl-api1.p.rapidapi.com/match\"\nquerystring = {\"team\": team}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-api1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
44
+ "statuscode":200,
45
+ "body":{
46
+ "key1":"value",
47
+ "key2":"value"
48
+ },
49
+ "headers":{},
50
+ "schema":{}
51
+ },
52
+ {
53
+ "name":"getMatchs",
54
+ "url":"https://ipl-api1.p.rapidapi.com/match",
55
+ "description":"to get all the match details .",
56
+ "method":"GET",
57
+ "required_parameters":[],
58
+ "optional_parameters":[],
59
+ "code":"import requests\n\nurl = \"https://ipl-api1.p.rapidapi.com/match\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-api1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
60
+ "statuscode":111,
61
+ "body":"",
62
+ "headers":"",
63
+ "schema":""
64
+ },
65
+ {
66
+ "name":"getMatchByWinner",
67
+ "url":"https://ipl-api1.p.rapidapi.com/match",
68
+ "description":"get all the matches by winner",
69
+ "method":"GET",
70
+ "required_parameters":[],
71
+ "optional_parameters":[
72
+ {
73
+ "name":"winner",
74
+ "type":"STRING",
75
+ "description":"",
76
+ "default":"Kolkata Knight Riders"
77
+ }
78
+ ],
79
+ "code":"import requests\n\nurl = \"https://ipl-api1.p.rapidapi.com/match\"\nquerystring = {\"winner\": winner}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-api1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
80
+ "statuscode":111,
81
+ "body":"",
82
+ "headers":"",
83
+ "schema":""
84
+ },
85
+ {
86
+ "name":"getMatchesByCity",
87
+ "url":"https://ipl-api1.p.rapidapi.com/match",
88
+ "description":"get all the matches by **city**",
89
+ "method":"GET",
90
+ "required_parameters":[
91
+ {
92
+ "name":"city",
93
+ "type":"STRING",
94
+ "description":"",
95
+ "default":"Kolkata"
96
+ }
97
+ ],
98
+ "optional_parameters":[],
99
+ "code":"import requests\n\nurl = \"https://ipl-api1.p.rapidapi.com/match\"\nquerystring = {\"city\": city}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-api1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
100
+ "statuscode":111,
101
+ "body":"",
102
+ "headers":"",
103
+ "schema":""
104
+ }
105
+ ]
106
+ }
toolbench/toolenv/tools/Sports/ipl_api/api.py ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def getplayers(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "getting data for the players"
12
+
13
+ """
14
+ url = f"https://ipl-api1.p.rapidapi.com/players"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "ipl-api1.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def getmatchesbyteam(team: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "get all the matches by a particular team"
33
+
34
+ """
35
+ url = f"https://ipl-api1.p.rapidapi.com/match"
36
+ querystring = {'team': team, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "ipl-api1.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def getmatchs(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "to get all the match details ."
54
+
55
+ """
56
+ url = f"https://ipl-api1.p.rapidapi.com/match"
57
+ querystring = {}
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "ipl-api1.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def getmatchbywinner(winner: str='Kolkata Knight Riders', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ "get all the matches by winner"
75
+
76
+ """
77
+ url = f"https://ipl-api1.p.rapidapi.com/match"
78
+ querystring = {}
79
+ if winner:
80
+ querystring['winner'] = winner
81
+
82
+ headers = {
83
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
84
+ "X-RapidAPI-Host": "ipl-api1.p.rapidapi.com"
85
+ }
86
+
87
+
88
+ response = requests.get(url, headers=headers, params=querystring)
89
+ try:
90
+ observation = response.json()
91
+ except:
92
+ observation = response.text
93
+ return observation
94
+
95
+ def getmatchesbycity(city: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
96
+ """
97
+ "get all the matches by **city**"
98
+
99
+ """
100
+ url = f"https://ipl-api1.p.rapidapi.com/match"
101
+ querystring = {'city': city, }
102
+
103
+ headers = {
104
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
105
+ "X-RapidAPI-Host": "ipl-api1.p.rapidapi.com"
106
+ }
107
+
108
+
109
+ response = requests.get(url, headers=headers, params=querystring)
110
+ try:
111
+ observation = response.json()
112
+ except:
113
+ observation = response.text
114
+ return observation
115
+
toolbench/toolenv/tools/Sports/ipl_dashboard.json ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"IPL Dashboard",
3
+ "tool_description":"This is rest api for IPL (Indian Premier League)",
4
+ "title":"IPL Dashboard",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/giriaakash00/api/ipl-dashboard/",
8
+ "host":"ipl-dashboard.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Get all the matches of a specific team for a specific year",
12
+ "url":"https://ipl-dashboard.p.rapidapi.com/team/{teamname}/matches?year=2014",
13
+ "description":"Fetch all the matches of a team for specific year",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"teamName",
18
+ "type":"string",
19
+ "description":"",
20
+ "default":"Mumbai Indians"
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://ipl-dashboard.p.rapidapi.com/team/{teamname}/matches?year=2014\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-dashboard.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
25
+ "statuscode":200,
26
+ "body":{
27
+ "key1":"value",
28
+ "key2":"value"
29
+ },
30
+ "headers":{},
31
+ "schema":{
32
+ "type":"array",
33
+ "items":{
34
+ "type":"object",
35
+ "properties":{
36
+ "id":{
37
+ "type":"integer"
38
+ },
39
+ "city":{
40
+ "type":"string"
41
+ },
42
+ "date":{
43
+ "type":"string"
44
+ },
45
+ "playerOfMatch":{
46
+ "type":"string"
47
+ },
48
+ "venue":{
49
+ "type":"string"
50
+ },
51
+ "team1":{
52
+ "type":"string"
53
+ },
54
+ "team2":{
55
+ "type":"string"
56
+ },
57
+ "tossWinner":{
58
+ "type":"string"
59
+ },
60
+ "tossDecision":{
61
+ "type":"string"
62
+ },
63
+ "matchWinner":{
64
+ "type":"string"
65
+ },
66
+ "result":{
67
+ "type":"string"
68
+ },
69
+ "resultMargin":{
70
+ "type":"string"
71
+ },
72
+ "umpire1":{
73
+ "type":"string"
74
+ },
75
+ "umpire2":{
76
+ "type":"string"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ },
82
+ {
83
+ "name":"Get specific team latest 4 matches",
84
+ "url":"https://ipl-dashboard.p.rapidapi.com/team/{teamname}",
85
+ "description":"Fetch specific IPL team latest 4 matches data by providing team name as parameter in url.",
86
+ "method":"GET",
87
+ "required_parameters":[
88
+ {
89
+ "name":"teamName",
90
+ "type":"string",
91
+ "description":"",
92
+ "default":"Mumbai Indians"
93
+ }
94
+ ],
95
+ "optional_parameters":[],
96
+ "code":"import requests\n\nurl = \"https://ipl-dashboard.p.rapidapi.com/team/{teamname}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-dashboard.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
97
+ "statuscode":200,
98
+ "body":{
99
+ "key1":"value",
100
+ "key2":"value"
101
+ },
102
+ "headers":{},
103
+ "schema":{
104
+ "type":"array",
105
+ "items":{
106
+ "type":"object",
107
+ "properties":{
108
+ "id":{
109
+ "type":"integer"
110
+ },
111
+ "teamName":{
112
+ "type":"string"
113
+ },
114
+ "totalMatches":{
115
+ "type":"integer"
116
+ },
117
+ "totalWins":{
118
+ "type":"integer"
119
+ },
120
+ "matches":{
121
+ "type":"null"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ },
127
+ {
128
+ "name":"Get Teams",
129
+ "url":"https://ipl-dashboard.p.rapidapi.com/team",
130
+ "description":"Fetch all the IPL teams.",
131
+ "method":"GET",
132
+ "required_parameters":[],
133
+ "optional_parameters":[],
134
+ "code":"import requests\n\nurl = \"https://ipl-dashboard.p.rapidapi.com/team\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-dashboard.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
135
+ "statuscode":200,
136
+ "body":{
137
+ "key1":"value",
138
+ "key2":"value"
139
+ },
140
+ "headers":{},
141
+ "schema":{
142
+ "type":"object",
143
+ "properties":{
144
+ "id":{
145
+ "type":"integer"
146
+ },
147
+ "teamName":{
148
+ "type":"string"
149
+ },
150
+ "totalMatches":{
151
+ "type":"integer"
152
+ },
153
+ "totalWins":{
154
+ "type":"integer"
155
+ },
156
+ "matches":{
157
+ "type":"array",
158
+ "items":{
159
+ "type":"object",
160
+ "properties":{
161
+ "id":{
162
+ "type":"integer"
163
+ },
164
+ "city":{
165
+ "type":"string"
166
+ },
167
+ "date":{
168
+ "type":"string"
169
+ },
170
+ "playerOfMatch":{
171
+ "type":"string"
172
+ },
173
+ "venue":{
174
+ "type":"string"
175
+ },
176
+ "team1":{
177
+ "type":"string"
178
+ },
179
+ "team2":{
180
+ "type":"string"
181
+ },
182
+ "tossWinner":{
183
+ "type":"string"
184
+ },
185
+ "tossDecision":{
186
+ "type":"string"
187
+ },
188
+ "matchWinner":{
189
+ "type":"string"
190
+ },
191
+ "result":{
192
+ "type":"string"
193
+ },
194
+ "resultMargin":{
195
+ "type":"string"
196
+ },
197
+ "umpire1":{
198
+ "type":"string"
199
+ },
200
+ "umpire2":{
201
+ "type":"string"
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+ ]
210
+ }
toolbench/toolenv/tools/Sports/ipl_dashboard/api.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_all_the_matches_of_a_specific_team_for_a_specific_year(teamname: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Fetch all the matches of a team for specific year"
12
+
13
+ """
14
+ url = f"https://ipl-dashboard.p.rapidapi.com/team/{teamname}/matches?year=2014"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "ipl-dashboard.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def get_specific_team_latest_4_matches(teamname: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Fetch specific IPL team latest 4 matches data by providing team name as parameter in url."
33
+
34
+ """
35
+ url = f"https://ipl-dashboard.p.rapidapi.com/team/{teamname}"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "ipl-dashboard.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def get_teams(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "Fetch all the IPL teams."
54
+
55
+ """
56
+ url = f"https://ipl-dashboard.p.rapidapi.com/team"
57
+ querystring = {}
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "ipl-dashboard.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
toolbench/toolenv/tools/Sports/ipl_points_table.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Ipl Points Table",
3
+ "tool_description":"Get the points table of ipl since 2008",
4
+ "title":"Ipl Points Table",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/ayushkarn32/api/ipl-points-table/",
8
+ "host":"ipl-points-table.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"GetPointsTable",
12
+ "url":"https://ipl-points-table.p.rapidapi.com/ipl.php",
13
+ "description":" ",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"year",
18
+ "type":"NUMBER",
19
+ "description":"",
20
+ "default":2020
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://ipl-points-table.p.rapidapi.com/ipl.php\"\nquerystring = {\"year\": year}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ipl-points-table.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode":200,
26
+ "body":{},
27
+ "headers":{},
28
+ "schema":{}
29
+ }
30
+ ]
31
+ }
toolbench/toolenv/tools/Sports/ipl_points_table/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def getpointstable(year: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ " "
12
+
13
+ """
14
+ url = f"https://ipl-points-table.p.rapidapi.com/ipl.php"
15
+ querystring = {'year': year, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "ipl-points-table.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Sports/jsonodds.json ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "56605935e4b0a4872350eafa",
3
+ "tool_description": "JsonOdds is a no-nonsense and low-cost API for sports betting odds. This API will get you up and running in no time. Build robust applications in less time with JsonOdds API. Quickly build robust and advanced websites or applications with our RESTful API. Build a sportsbook, track line history, display odds, or implement the JsonOdds API in any number of ways. We support Soccer, NFL, NCAAF, NCAAB, NBA, MLB, NHL, Tennis, and MMA odds and results. JsonOdds helps you achieve your end goals easily and effectively. Email jsonodds@gmail.com for a free trial.",
4
+ "home_url": "https://rapidapi.com/jsonjames/api/jsonodds/",
5
+ "name": "JsonOdds",
6
+ "title": "JsonOdds",
7
+ "pricing": "PAID",
8
+ "tool_name": "JsonOdds",
9
+ "score": null,
10
+ "host": "jsonjames-jsonodds-v1.p.rapidapi.com",
11
+ "api_list": [
12
+ {
13
+ "name": "Leagues By Region",
14
+ "url": "https://jsonjames-jsonodds-v1.p.rapidapi.com/api/leagues/byregion",
15
+ "description": "Get specific soccer leagues by a region",
16
+ "method": "POST",
17
+ "required_parameters": [],
18
+ "optional_parameters": [],
19
+ "code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/leagues/byregion\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
20
+ "convert_code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/leagues/byregion\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
21
+ "test_endpoint": ""
22
+ },
23
+ {
24
+ "name": "Odds By Region",
25
+ "url": "https://jsonjames-jsonodds-v1.p.rapidapi.com/api/odds/byregion",
26
+ "description": "Get soccer odds for a specific region",
27
+ "method": "POST",
28
+ "required_parameters": [],
29
+ "optional_parameters": [],
30
+ "code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/odds/byregion\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
31
+ "convert_code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/odds/byregion\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
32
+ "test_endpoint": ""
33
+ },
34
+ {
35
+ "name": "Odds By League",
36
+ "url": "https://jsonjames-jsonodds-v1.p.rapidapi.com/api/odds/byleague",
37
+ "description": "Get Soccer Odds by League",
38
+ "method": "POST",
39
+ "required_parameters": [],
40
+ "optional_parameters": [],
41
+ "code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/odds/byleague\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
42
+ "convert_code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/odds/byleague\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
43
+ "test_endpoint": ""
44
+ },
45
+ {
46
+ "name": "Results By League",
47
+ "url": "https://jsonjames-jsonodds-v1.p.rapidapi.com/api/results/byleague",
48
+ "description": "Get soccer results by a specific league, takes a leaguerequest.",
49
+ "method": "POST",
50
+ "required_parameters": [],
51
+ "optional_parameters": [],
52
+ "code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/results/byleague\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
53
+ "convert_code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/results/byleague\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
54
+ "test_endpoint": ""
55
+ },
56
+ {
57
+ "name": "Results by Region",
58
+ "url": "https://jsonjames-jsonodds-v1.p.rapidapi.com/api/results/byregion",
59
+ "description": "Get soccer results for a specific region",
60
+ "method": "POST",
61
+ "required_parameters": [],
62
+ "optional_parameters": [],
63
+ "code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/results/byregion\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
64
+ "convert_code": "import requests\n\nurl = \"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/results/byregion\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"jsonjames-jsonodds-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
65
+ "test_endpoint": ""
66
+ }
67
+ ]
68
+ }
toolbench/toolenv/tools/Sports/jsonodds/api.py ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def sports(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get sports enumeration"
12
+
13
+ """
14
+ url = f"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/sports"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "jsonjames-jsonodds-v1.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def leagues(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Get all soccer leagues supported for LeagueRegion requests"
33
+
34
+ """
35
+ url = f"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/leagues"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "jsonjames-jsonodds-v1.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def get_odds(sport: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "Get all odds"
54
+
55
+ """
56
+ url = f"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/odds/{sport}"
57
+ querystring = {}
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "jsonjames-jsonodds-v1.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def sources(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ "Get supported bookmakers"
75
+
76
+ """
77
+ url = f"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/sources"
78
+ querystring = {}
79
+
80
+ headers = {
81
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
82
+ "X-RapidAPI-Host": "jsonjames-jsonodds-v1.p.rapidapi.com"
83
+ }
84
+
85
+
86
+ response = requests.get(url, headers=headers, params=querystring)
87
+ try:
88
+ observation = response.json()
89
+ except:
90
+ observation = response.text
91
+ return observation
92
+
93
+ def regions(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
94
+ """
95
+ "Get supported soccer regions for use by LeagueRegion requests"
96
+
97
+ """
98
+ url = f"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/regions"
99
+ querystring = {}
100
+
101
+ headers = {
102
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
103
+ "X-RapidAPI-Host": "jsonjames-jsonodds-v1.p.rapidapi.com"
104
+ }
105
+
106
+
107
+ response = requests.get(url, headers=headers, params=querystring)
108
+ try:
109
+ observation = response.json()
110
+ except:
111
+ observation = response.text
112
+ return observation
113
+
114
+ def results(is_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
115
+ """
116
+ "Get all results or results for a specific id"
117
+
118
+ """
119
+ url = f"https://jsonjames-jsonodds-v1.p.rapidapi.com/api/results/{is_id}"
120
+ querystring = {}
121
+
122
+ headers = {
123
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
124
+ "X-RapidAPI-Host": "jsonjames-jsonodds-v1.p.rapidapi.com"
125
+ }
126
+
127
+
128
+ response = requests.get(url, headers=headers, params=querystring)
129
+ try:
130
+ observation = response.json()
131
+ except:
132
+ observation = response.text
133
+ return observation
134
+
toolbench/toolenv/tools/Sports/keepthescore_com.json ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_b43a8211-cd08-4ca8-8a89-3a217f0eba7c",
3
+ "tool_description": "An online scoreboard and leaderboard system",
4
+ "home_url": "https://rapidapi.com/Caspii/api/keepthescore-com/",
5
+ "name": "Keepthescore.com",
6
+ "title": "Keepthescore.com",
7
+ "pricing": "FREE",
8
+ "tool_name": "Keepthescore.com",
9
+ "score": null,
10
+ "host": "keepthescore-com.p.rapidapi.com",
11
+ "api_list": [
12
+ {
13
+ "name": "score_api_populate_board",
14
+ "url": "https://keepthescore-com.p.rapidapi.com/api/{token}/board/populate",
15
+ "description": "This will **delete all players** and scores and replace them with the new data.\n\nIf you are not using teams, you can omit the team field.",
16
+ "method": "POST",
17
+ "required_parameters": [
18
+ {
19
+ "name": "token",
20
+ "type": "STRING",
21
+ "description": "The token of the board to populate.",
22
+ "default": ""
23
+ }
24
+ ],
25
+ "optional_parameters": [],
26
+ "code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/board/populate\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
27
+ "convert_code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/board/populate\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
28
+ "test_endpoint": "",
29
+ "statuscode": 1,
30
+ "schema": ""
31
+ },
32
+ {
33
+ "name": "score_api_add_player",
34
+ "url": "https://keepthescore-com.p.rapidapi.com/api/{token}/player/",
35
+ "description": " ",
36
+ "method": "POST",
37
+ "required_parameters": [
38
+ {
39
+ "name": "token",
40
+ "type": "STRING",
41
+ "description": "The token of the board to add the player to",
42
+ "default": ""
43
+ }
44
+ ],
45
+ "optional_parameters": [],
46
+ "code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/player/\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
47
+ "convert_code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/player/\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
48
+ "test_endpoint": "",
49
+ "statuscode": 1,
50
+ "schema": ""
51
+ },
52
+ {
53
+ "name": "score_api_create_team",
54
+ "url": "https://keepthescore-com.p.rapidapi.com/api/{token}/team/",
55
+ "description": " ",
56
+ "method": "POST",
57
+ "required_parameters": [
58
+ {
59
+ "name": "token",
60
+ "type": "STRING",
61
+ "description": "The token of the board for which the team is created.",
62
+ "default": ""
63
+ }
64
+ ],
65
+ "optional_parameters": [],
66
+ "code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/team/\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
67
+ "convert_code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/team/\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
68
+ "test_endpoint": "",
69
+ "statuscode": 1,
70
+ "schema": ""
71
+ },
72
+ {
73
+ "name": "score_api_add_round",
74
+ "url": "https://keepthescore-com.p.rapidapi.com/api/{token}/board/round/",
75
+ "description": "The \"goal\" field is optional and only used for goal trackers.",
76
+ "method": "POST",
77
+ "required_parameters": [
78
+ {
79
+ "name": "token",
80
+ "type": "STRING",
81
+ "description": "The token of the board",
82
+ "default": ""
83
+ }
84
+ ],
85
+ "optional_parameters": [],
86
+ "code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/board/round/\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
87
+ "convert_code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/board/round/\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
88
+ "test_endpoint": "",
89
+ "statuscode": 1,
90
+ "schema": ""
91
+ },
92
+ {
93
+ "name": "score_api_add_score",
94
+ "url": "https://keepthescore-com.p.rapidapi.com/api/{token}/score/",
95
+ "description": "Currently only works for leaderboards, score sheets, counters or goal trackers.\nThe \"goal\" field is optional and only used for goal trackers.",
96
+ "method": "POST",
97
+ "required_parameters": [
98
+ {
99
+ "name": "token",
100
+ "type": "STRING",
101
+ "description": "The token of the board",
102
+ "default": ""
103
+ }
104
+ ],
105
+ "optional_parameters": [],
106
+ "code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/score/\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
107
+ "convert_code": "import requests\n\nurl = \"https://keepthescore-com.p.rapidapi.com/api/{token}/score/\"\nquerystring = {\"token\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"keepthescore-com.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
108
+ "test_endpoint": "",
109
+ "statuscode": 1,
110
+ "schema": ""
111
+ }
112
+ ]
113
+ }
toolbench/toolenv/tools/Sports/kings_league_stats.json ADDED
The diff for this file is too large to render. See raw diff
 
toolbench/toolenv/tools/Sports/kings_league_stats/api.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def top_assistants(seasonid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Returns the list of top assistants for an specific season"
12
+ seasonid: The season ID. Available season IDs: *2023-s1*
13
+
14
+ """
15
+ url = f"https://kings-league-stats.p.rapidapi.com/{seasonid}/top-assistants"
16
+ querystring = {}
17
+
18
+ headers = {
19
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
20
+ "X-RapidAPI-Host": "kings-league-stats.p.rapidapi.com"
21
+ }
22
+
23
+
24
+ response = requests.get(url, headers=headers, params=querystring)
25
+ try:
26
+ observation = response.json()
27
+ except:
28
+ observation = response.text
29
+ return observation
30
+
31
+ def top_scorers(seasonid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
32
+ """
33
+ "Returns the list of top scorers for an specific season"
34
+ seasonid: The season ID. Available season IDs: *2023-s1*
35
+
36
+ """
37
+ url = f"https://kings-league-stats.p.rapidapi.com/{seasonid}/top-scorers"
38
+ querystring = {}
39
+
40
+ headers = {
41
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
42
+ "X-RapidAPI-Host": "kings-league-stats.p.rapidapi.com"
43
+ }
44
+
45
+
46
+ response = requests.get(url, headers=headers, params=querystring)
47
+ try:
48
+ observation = response.json()
49
+ except:
50
+ observation = response.text
51
+ return observation
52
+
53
+ def teams(seasonid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
54
+ """
55
+ "Returns the list of teams foran specific season. Includes all the information about the team, its rank, its stats, etc."
56
+ seasonid: The season ID. Available season IDs: *2023-s1*
57
+
58
+ """
59
+ url = f"https://kings-league-stats.p.rapidapi.com/{seasonid}/teams"
60
+ querystring = {}
61
+
62
+ headers = {
63
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
64
+ "X-RapidAPI-Host": "kings-league-stats.p.rapidapi.com"
65
+ }
66
+
67
+
68
+ response = requests.get(url, headers=headers, params=querystring)
69
+ try:
70
+ observation = response.json()
71
+ except:
72
+ observation = response.text
73
+ return observation
74
+
75
+ def players(seasonid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
76
+ """
77
+ "Returns the list of players for an specific season. Includes all the public information about the player, his team, his position, his stats, etc."
78
+ seasonid: The season ID. Available season IDs: *2023-s1*
79
+
80
+ """
81
+ url = f"https://kings-league-stats.p.rapidapi.com/{seasonid}/players"
82
+ querystring = {}
83
+
84
+ headers = {
85
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
86
+ "X-RapidAPI-Host": "kings-league-stats.p.rapidapi.com"
87
+ }
88
+
89
+
90
+ response = requests.get(url, headers=headers, params=querystring)
91
+ try:
92
+ observation = response.json()
93
+ except:
94
+ observation = response.text
95
+ return observation
96
+
toolbench/toolenv/tools/Sports/kiniscore_com.json ADDED
@@ -0,0 +1,349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"KiniScore.com",
3
+ "tool_description":"Real-time scores and Soccer Analytics for African Teams, Players etc",
4
+ "title":"KiniScore.com",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/KiniScore/api/kiniscore-com/",
8
+ "host":"kiniscore-com.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Get All Teams",
12
+ "url":"https://kiniscore-com.p.rapidapi.com/GetAllTeams.php",
13
+ "description":"Return all the Teams in json format",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"client",
18
+ "type":"STRING",
19
+ "description":"",
20
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
21
+ },
22
+ {
23
+ "name":"secret",
24
+ "type":"STRING",
25
+ "description":"",
26
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetAllTeams.php\"\nquerystring = {\"client\": client, \"secret\": secret}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ },
36
+ {
37
+ "name":"Get All Past Fixtures",
38
+ "url":"https://kiniscore-com.p.rapidapi.com/GetPastFixtures.php",
39
+ "description":"Return all the Past Fixtures",
40
+ "method":"GET",
41
+ "required_parameters":[
42
+ {
43
+ "name":"secret",
44
+ "type":"STRING",
45
+ "description":"",
46
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
47
+ },
48
+ {
49
+ "name":"client",
50
+ "type":"STRING",
51
+ "description":"",
52
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
53
+ }
54
+ ],
55
+ "optional_parameters":[],
56
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetPastFixtures.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
57
+ "statuscode":111,
58
+ "body":"",
59
+ "headers":"",
60
+ "schema":""
61
+ },
62
+ {
63
+ "name":"Get All Upcoming Fixtures",
64
+ "url":"https://kiniscore-com.p.rapidapi.com/GetUpcomingFixtures.php",
65
+ "description":"Return all the upcoming fixtures in json",
66
+ "method":"GET",
67
+ "required_parameters":[
68
+ {
69
+ "name":"secret",
70
+ "type":"STRING",
71
+ "description":"",
72
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
73
+ },
74
+ {
75
+ "name":"client",
76
+ "type":"STRING",
77
+ "description":"",
78
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
79
+ }
80
+ ],
81
+ "optional_parameters":[],
82
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetUpcomingFixtures.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
83
+ "statuscode":111,
84
+ "body":"",
85
+ "headers":"",
86
+ "schema":""
87
+ },
88
+ {
89
+ "name":"Get Single Fixture",
90
+ "url":"https://kiniscore-com.p.rapidapi.com/GetSingleFixture.php",
91
+ "description":"Returns Single Fixtures in json",
92
+ "method":"GET",
93
+ "required_parameters":[
94
+ {
95
+ "name":"secret",
96
+ "type":"STRING",
97
+ "description":"",
98
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
99
+ },
100
+ {
101
+ "name":"client",
102
+ "type":"STRING",
103
+ "description":"",
104
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
105
+ }
106
+ ],
107
+ "optional_parameters":[],
108
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetSingleFixture.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
109
+ "statuscode":111,
110
+ "body":"",
111
+ "headers":"",
112
+ "schema":""
113
+ },
114
+ {
115
+ "name":"Get Single Team",
116
+ "url":"https://kiniscore-com.p.rapidapi.com/GetSingleTeam.php",
117
+ "description":"Returns single team details in json",
118
+ "method":"GET",
119
+ "required_parameters":[
120
+ {
121
+ "name":"secret",
122
+ "type":"STRING",
123
+ "description":"",
124
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
125
+ },
126
+ {
127
+ "name":"client",
128
+ "type":"STRING",
129
+ "description":"",
130
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
131
+ }
132
+ ],
133
+ "optional_parameters":[],
134
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetSingleTeam.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
135
+ "statuscode":111,
136
+ "body":"",
137
+ "headers":"",
138
+ "schema":""
139
+ },
140
+ {
141
+ "name":"Get Team Squad",
142
+ "url":"https://kiniscore-com.p.rapidapi.com/GetTeamSquad.php",
143
+ "description":"Returns full Squad of a Team in json",
144
+ "method":"GET",
145
+ "required_parameters":[
146
+ {
147
+ "name":"secret",
148
+ "type":"STRING",
149
+ "description":"",
150
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
151
+ },
152
+ {
153
+ "name":"client",
154
+ "type":"STRING",
155
+ "description":"",
156
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
157
+ }
158
+ ],
159
+ "optional_parameters":[],
160
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetTeamSquad.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
161
+ "statuscode":111,
162
+ "body":"",
163
+ "headers":"",
164
+ "schema":""
165
+ },
166
+ {
167
+ "name":"Get Single Player",
168
+ "url":"https://kiniscore-com.p.rapidapi.com/GetSinglePlayer.php",
169
+ "description":"Returns full Detail of a Player in json",
170
+ "method":"GET",
171
+ "required_parameters":[
172
+ {
173
+ "name":"secret",
174
+ "type":"STRING",
175
+ "description":"",
176
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
177
+ },
178
+ {
179
+ "name":"client",
180
+ "type":"STRING",
181
+ "description":"",
182
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
183
+ }
184
+ ],
185
+ "optional_parameters":[],
186
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetSinglePlayer.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
187
+ "statuscode":111,
188
+ "body":"",
189
+ "headers":"",
190
+ "schema":""
191
+ },
192
+ {
193
+ "name":"Get Team Fixtures",
194
+ "url":"https://kiniscore-com.p.rapidapi.com/GetTeamFixtures.php",
195
+ "description":"Returns Fixtures of a Team in json",
196
+ "method":"GET",
197
+ "required_parameters":[
198
+ {
199
+ "name":"client",
200
+ "type":"STRING",
201
+ "description":"",
202
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
203
+ },
204
+ {
205
+ "name":"secret",
206
+ "type":"STRING",
207
+ "description":"",
208
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
209
+ }
210
+ ],
211
+ "optional_parameters":[],
212
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetTeamFixtures.php\"\nquerystring = {\"client\": client, \"secret\": secret}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
213
+ "statuscode":111,
214
+ "body":"",
215
+ "headers":"",
216
+ "schema":""
217
+ },
218
+ {
219
+ "name":"Get Team Past Fixtures",
220
+ "url":"https://kiniscore-com.p.rapidapi.com/GetTeamPastFixtures.php",
221
+ "description":"Returns Fixtures of a Team in Past json",
222
+ "method":"GET",
223
+ "required_parameters":[
224
+ {
225
+ "name":"secret",
226
+ "type":"STRING",
227
+ "description":"",
228
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
229
+ },
230
+ {
231
+ "name":"client",
232
+ "type":"STRING",
233
+ "description":"",
234
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
235
+ }
236
+ ],
237
+ "optional_parameters":[],
238
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetTeamPastFixtures.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
239
+ "statuscode":111,
240
+ "body":"",
241
+ "headers":"",
242
+ "schema":""
243
+ },
244
+ {
245
+ "name":"Get Table Standings",
246
+ "url":"https://kiniscore-com.p.rapidapi.com/GetTableStandings.php",
247
+ "description":"Returns table standings in json",
248
+ "method":"GET",
249
+ "required_parameters":[
250
+ {
251
+ "name":"secret",
252
+ "type":"STRING",
253
+ "description":"",
254
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
255
+ },
256
+ {
257
+ "name":"client",
258
+ "type":"STRING",
259
+ "description":"",
260
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
261
+ }
262
+ ],
263
+ "optional_parameters":[],
264
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetTableStandings.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
265
+ "statuscode":111,
266
+ "body":"",
267
+ "headers":"",
268
+ "schema":""
269
+ },
270
+ {
271
+ "name":"Get All Fixtures",
272
+ "url":"https://kiniscore-com.p.rapidapi.com/GetAllFixtures.php",
273
+ "description":"Gets All Fixtures",
274
+ "method":"GET",
275
+ "required_parameters":[
276
+ {
277
+ "name":"secret",
278
+ "type":"STRING",
279
+ "description":"",
280
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
281
+ },
282
+ {
283
+ "name":"client",
284
+ "type":"STRING",
285
+ "description":"",
286
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
287
+ }
288
+ ],
289
+ "optional_parameters":[],
290
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetAllFixtures.php\"\nquerystring = {\"secret\": secret, \"client\": client}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
291
+ "statuscode":111,
292
+ "body":"",
293
+ "headers":"",
294
+ "schema":""
295
+ },
296
+ {
297
+ "name":"All Fixtures",
298
+ "url":"https://kiniscore-com.p.rapidapi.com/AllFixtures.php",
299
+ "description":"To get all match fixtures in json format",
300
+ "method":"GET",
301
+ "required_parameters":[
302
+ {
303
+ "name":"client",
304
+ "type":"STRING",
305
+ "description":"",
306
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
307
+ },
308
+ {
309
+ "name":"secret",
310
+ "type":"STRING",
311
+ "description":"",
312
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
313
+ }
314
+ ],
315
+ "optional_parameters":[],
316
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/AllFixtures.php\"\nquerystring = {\"client\": client, \"secret\": secret}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
317
+ "statuscode":111,
318
+ "body":"",
319
+ "headers":"",
320
+ "schema":""
321
+ },
322
+ {
323
+ "name":"Get All Leagues",
324
+ "url":"https://kiniscore-com.p.rapidapi.com/GetAllLeague.php",
325
+ "description":"To get all leagues in json format",
326
+ "method":"GET",
327
+ "required_parameters":[
328
+ {
329
+ "name":"client",
330
+ "type":"STRING",
331
+ "description":"",
332
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
333
+ },
334
+ {
335
+ "name":"secret",
336
+ "type":"STRING",
337
+ "description":"",
338
+ "default":"466e5d6e1e9830e0d9e6872be593f210"
339
+ }
340
+ ],
341
+ "optional_parameters":[],
342
+ "code":"import requests\n\nurl = \"https://kiniscore-com.p.rapidapi.com/GetAllLeague.php\"\nquerystring = {\"client\": client, \"secret\": secret}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kiniscore-com.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
343
+ "statuscode":111,
344
+ "body":"",
345
+ "headers":"",
346
+ "schema":""
347
+ }
348
+ ]
349
+ }
toolbench/toolenv/tools/Sports/kiniscore_com/api.py ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_all_teams(client: str, secret: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Return all the Teams in json format"
12
+
13
+ """
14
+ url = f"https://kiniscore-com.p.rapidapi.com/getallteams.php"
15
+ querystring = {'client': client, 'secret': secret, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def get_all_past_fixtures(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Return all the Past Fixtures"
33
+
34
+ """
35
+ url = f"https://kiniscore-com.p.rapidapi.com/getpastfixtures.php"
36
+ querystring = {'secret': secret, 'client': client, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def get_all_upcoming_fixtures(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "Return all the upcoming fixtures in json"
54
+
55
+ """
56
+ url = f"https://kiniscore-com.p.rapidapi.com/getupcomingfixtures.php"
57
+ querystring = {'secret': secret, 'client': client, }
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def get_single_fixture(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ "Returns Single Fixtures in json"
75
+
76
+ """
77
+ url = f"https://kiniscore-com.p.rapidapi.com/getsinglefixture.php"
78
+ querystring = {'secret': secret, 'client': client, }
79
+
80
+ headers = {
81
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
82
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
83
+ }
84
+
85
+
86
+ response = requests.get(url, headers=headers, params=querystring)
87
+ try:
88
+ observation = response.json()
89
+ except:
90
+ observation = response.text
91
+ return observation
92
+
93
+ def get_single_team(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
94
+ """
95
+ "Returns single team details in json"
96
+
97
+ """
98
+ url = f"https://kiniscore-com.p.rapidapi.com/getsingleteam.php"
99
+ querystring = {'secret': secret, 'client': client, }
100
+
101
+ headers = {
102
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
103
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
104
+ }
105
+
106
+
107
+ response = requests.get(url, headers=headers, params=querystring)
108
+ try:
109
+ observation = response.json()
110
+ except:
111
+ observation = response.text
112
+ return observation
113
+
114
+ def get_team_squad(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
115
+ """
116
+ "Returns full Squad of a Team in json"
117
+
118
+ """
119
+ url = f"https://kiniscore-com.p.rapidapi.com/getteamsquad.php"
120
+ querystring = {'secret': secret, 'client': client, }
121
+
122
+ headers = {
123
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
124
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
125
+ }
126
+
127
+
128
+ response = requests.get(url, headers=headers, params=querystring)
129
+ try:
130
+ observation = response.json()
131
+ except:
132
+ observation = response.text
133
+ return observation
134
+
135
+ def get_single_player(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
136
+ """
137
+ "Returns full Detail of a Player in json"
138
+
139
+ """
140
+ url = f"https://kiniscore-com.p.rapidapi.com/getsingleplayer.php"
141
+ querystring = {'secret': secret, 'client': client, }
142
+
143
+ headers = {
144
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
145
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
146
+ }
147
+
148
+
149
+ response = requests.get(url, headers=headers, params=querystring)
150
+ try:
151
+ observation = response.json()
152
+ except:
153
+ observation = response.text
154
+ return observation
155
+
156
+ def get_team_fixtures(client: str, secret: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
157
+ """
158
+ "Returns Fixtures of a Team in json"
159
+
160
+ """
161
+ url = f"https://kiniscore-com.p.rapidapi.com/getteamfixtures.php"
162
+ querystring = {'client': client, 'secret': secret, }
163
+
164
+ headers = {
165
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
166
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
167
+ }
168
+
169
+
170
+ response = requests.get(url, headers=headers, params=querystring)
171
+ try:
172
+ observation = response.json()
173
+ except:
174
+ observation = response.text
175
+ return observation
176
+
177
+ def get_team_past_fixtures(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
178
+ """
179
+ "Returns Fixtures of a Team in Past json"
180
+
181
+ """
182
+ url = f"https://kiniscore-com.p.rapidapi.com/getteampastfixtures.php"
183
+ querystring = {'secret': secret, 'client': client, }
184
+
185
+ headers = {
186
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
187
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
188
+ }
189
+
190
+
191
+ response = requests.get(url, headers=headers, params=querystring)
192
+ try:
193
+ observation = response.json()
194
+ except:
195
+ observation = response.text
196
+ return observation
197
+
198
+ def get_table_standings(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
199
+ """
200
+ "Returns table standings in json"
201
+
202
+ """
203
+ url = f"https://kiniscore-com.p.rapidapi.com/gettablestandings.php"
204
+ querystring = {'secret': secret, 'client': client, }
205
+
206
+ headers = {
207
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
208
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
209
+ }
210
+
211
+
212
+ response = requests.get(url, headers=headers, params=querystring)
213
+ try:
214
+ observation = response.json()
215
+ except:
216
+ observation = response.text
217
+ return observation
218
+
219
+ def get_all_fixtures(secret: str, client: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
220
+ """
221
+ "Gets All Fixtures"
222
+
223
+ """
224
+ url = f"https://kiniscore-com.p.rapidapi.com/getallfixtures.php"
225
+ querystring = {'secret': secret, 'client': client, }
226
+
227
+ headers = {
228
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
229
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
230
+ }
231
+
232
+
233
+ response = requests.get(url, headers=headers, params=querystring)
234
+ try:
235
+ observation = response.json()
236
+ except:
237
+ observation = response.text
238
+ return observation
239
+
240
+ def all_fixtures(client: str, secret: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
241
+ """
242
+ "To get all match fixtures in json format"
243
+
244
+ """
245
+ url = f"https://kiniscore-com.p.rapidapi.com/allfixtures.php"
246
+ querystring = {'client': client, 'secret': secret, }
247
+
248
+ headers = {
249
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
250
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
251
+ }
252
+
253
+
254
+ response = requests.get(url, headers=headers, params=querystring)
255
+ try:
256
+ observation = response.json()
257
+ except:
258
+ observation = response.text
259
+ return observation
260
+
261
+ def get_all_leagues(client: str, secret: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
262
+ """
263
+ "To get all leagues in json format"
264
+
265
+ """
266
+ url = f"https://kiniscore-com.p.rapidapi.com/getallleague.php"
267
+ querystring = {'client': client, 'secret': secret, }
268
+
269
+ headers = {
270
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
271
+ "X-RapidAPI-Host": "kiniscore-com.p.rapidapi.com"
272
+ }
273
+
274
+
275
+ response = requests.get(url, headers=headers, params=querystring)
276
+ try:
277
+ observation = response.json()
278
+ except:
279
+ observation = response.text
280
+ return observation
281
+
toolbench/toolenv/tools/Sports/kooora.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"kooora",
3
+ "tool_description":"football app",
4
+ "title":"kooora",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/mouradelmehammedi/api/kooora1/",
8
+ "host":"kooora1.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"kooora",
12
+ "url":"https://kooora1.p.rapidapi.com/",
13
+ "description":"football app",
14
+ "method":"GET",
15
+ "required_parameters":[],
16
+ "optional_parameters":[],
17
+ "code":"import requests\n\nurl = \"https://kooora1.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"kooora1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
18
+ "statuscode":111,
19
+ "body":"",
20
+ "headers":"",
21
+ "schema":""
22
+ }
23
+ ]
24
+ }
toolbench/toolenv/tools/Sports/kooora/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def kooora(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "football app"
12
+
13
+ """
14
+ url = f"https://kooora1.p.rapidapi.com/"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "kooora1.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Sports/la_liga_live_scores.json ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name": "La Liga Live Scores",
3
+ "tool_description": "La Liga Live Scores API allows to retrieve historical data as well as current season results, scorers, lineups, substitutes, events, statistics, odds and much more all with live updates, for the top professional Spanish football league. And more features are coming...",
4
+ "title": "La Liga Live Scores",
5
+ "pricing": "FREEMIUM",
6
+ "score": {
7
+ "avgServiceLevel": 100,
8
+ "avgLatency": 286,
9
+ "avgSuccessRate": 100,
10
+ "popularityScore": 9,
11
+ "__typename": "Score"
12
+ },
13
+ "home_url": "https://rapidapi.com/heisenbug/api/la-liga-live-scores/",
14
+ "host": "heisenbug-la-liga-live-scores-v1.p.rapidapi.com",
15
+ "api_list": [
16
+ {
17
+ "name": "Venue",
18
+ "url": "https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/venue",
19
+ "description": "Returns venue data",
20
+ "method": "GET",
21
+ "required_parameters": [
22
+ {
23
+ "name": "name",
24
+ "type": "STRING",
25
+ "description": "",
26
+ "default": ""
27
+ }
28
+ ],
29
+ "optional_parameters": [],
30
+ "code": "import requests\n\nurl = \"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/venue\"\nquerystring = {\"name\": name}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-la-liga-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
31
+ "statuscode": 111,
32
+ "body": "",
33
+ "headers": "",
34
+ "schema": ""
35
+ },
36
+ {
37
+ "name": "Team",
38
+ "url": "https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/team",
39
+ "description": "Returns info about the team",
40
+ "method": "GET",
41
+ "required_parameters": [
42
+ {
43
+ "name": "name",
44
+ "type": "STRING",
45
+ "description": "",
46
+ "default": "Real Madrid"
47
+ }
48
+ ],
49
+ "optional_parameters": [],
50
+ "code": "import requests\n\nurl = \"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/team\"\nquerystring = {\"name\": name}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-la-liga-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
51
+ "statuscode": 111,
52
+ "body": "",
53
+ "headers": "",
54
+ "schema": ""
55
+ },
56
+ {
57
+ "name": "Activate webhook",
58
+ "url": "https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/activate",
59
+ "description": "Activate a webhook registered with the subscribe endpoint. Not available for BASIC plan.",
60
+ "method": "GET",
61
+ "required_parameters": [
62
+ {
63
+ "name": "token",
64
+ "type": "STRING",
65
+ "description": "Token",
66
+ "default": ""
67
+ }
68
+ ],
69
+ "optional_parameters": [],
70
+ "code": "import requests\n\nurl = \"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/activate\"\nquerystring = {\"token\": token}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-la-liga-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
71
+ "statuscode": 111,
72
+ "body": "",
73
+ "headers": "",
74
+ "schema": ""
75
+ },
76
+ {
77
+ "name": "Events subscribed",
78
+ "url": "https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/lis",
79
+ "description": "Returns all the events subscribed. Not available for BASIC plan.",
80
+ "method": "GET",
81
+ "required_parameters": [],
82
+ "optional_parameters": [],
83
+ "code": "import requests\n\nurl = \"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/lis\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-la-liga-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
84
+ "statuscode": 111,
85
+ "body": "",
86
+ "headers": "",
87
+ "schema": ""
88
+ },
89
+ {
90
+ "name": "Subscribe",
91
+ "url": "https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/subscribe",
92
+ "description": "Register to an event for push notifications. Not available for BASIC plan.",
93
+ "method": "POST",
94
+ "required_parameters": [
95
+ {
96
+ "name": "team1",
97
+ "type": "STRING",
98
+ "description": "Home team",
99
+ "default": ""
100
+ },
101
+ {
102
+ "name": "team2",
103
+ "type": "STRING",
104
+ "description": "Away team",
105
+ "default": ""
106
+ },
107
+ {
108
+ "name": "url",
109
+ "type": "STRING",
110
+ "description": "The wekhook where to receive the notifications",
111
+ "default": ""
112
+ }
113
+ ],
114
+ "optional_parameters": [],
115
+ "code": "import requests\n\nurl = \"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/subscribe\"\nquerystring = {\"team1\": team1, \"team2\": team2, \"url\": url}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-la-liga-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.post(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
116
+ "statuscode": 111,
117
+ "body": "",
118
+ "headers": "",
119
+ "schema": ""
120
+ },
121
+ {
122
+ "name": "Prediction",
123
+ "url": "https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/predict",
124
+ "description": "Returns match result perdiction (use an AI deep learning engine)",
125
+ "method": "GET",
126
+ "required_parameters": [
127
+ {
128
+ "name": "team2",
129
+ "type": "STRING",
130
+ "description": "Away team name",
131
+ "default": "Valencia"
132
+ },
133
+ {
134
+ "name": "team1",
135
+ "type": "STRING",
136
+ "description": "Home team name",
137
+ "default": "Barcelona"
138
+ }
139
+ ],
140
+ "optional_parameters": [],
141
+ "code": "import requests\n\nurl = \"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/predict\"\nquerystring = {\"team2\": team2, \"team1\": team1}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-la-liga-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
142
+ "statuscode": 200,
143
+ "body": {
144
+ "team1": "Barcelona",
145
+ "team2": "Valencia",
146
+ "result": "2-1"
147
+ },
148
+ "headers": {
149
+ "content-type": "application/json;charset=UTF-8",
150
+ "date": "Sun, 08 Sep 2019 10:28:18 GMT",
151
+ "server": "RapidAPI-1.0.31",
152
+ "via": "1.1 vegur",
153
+ "x-rapidapi-region": "AWS - eu-central-1",
154
+ "x-rapidapi-version": "1.0.31",
155
+ "content-length": "56",
156
+ "connection": "Close"
157
+ },
158
+ "schema": {
159
+ "type": "object",
160
+ "properties": {
161
+ "get": {
162
+ "type": "string"
163
+ },
164
+ "parameters": {
165
+ "type": "array"
166
+ },
167
+ "errors": {
168
+ "type": "array"
169
+ },
170
+ "results": {
171
+ "type": "integer"
172
+ },
173
+ "response": {
174
+ "type": "array",
175
+ "items": {
176
+ "type": "object"
177
+ }
178
+ }
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "name": "Subscribe",
184
+ "url": "https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/subscribe",
185
+ "description": "Register to an event for push notifications. Not available for BASIC plan.",
186
+ "method": "POST",
187
+ "required_parameters": [
188
+ {
189
+ "name": "team1",
190
+ "type": "STRING",
191
+ "description": "Home team",
192
+ "default": ""
193
+ },
194
+ {
195
+ "name": "team2",
196
+ "type": "STRING",
197
+ "description": "Away team",
198
+ "default": ""
199
+ },
200
+ {
201
+ "name": "url",
202
+ "type": "STRING",
203
+ "description": "The wekhook where to receive the notifications",
204
+ "default": ""
205
+ }
206
+ ],
207
+ "optional_parameters": [],
208
+ "code": "import requests\n\nurl = \"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/subscribe\"\nquerystring = {\"team1\": \"\", \"team2\": \"\", \"url\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-la-liga-live-scores-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
209
+ "convert_code": "import requests\n\nurl = \"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/subscribe\"\nquerystring = {\"team1\": \"\", \"team2\": \"\", \"url\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-la-liga-live-scores-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
210
+ "test_endpoint": ""
211
+ }
212
+ ]
213
+ }
toolbench/toolenv/tools/Sports/la_liga_live_scores/api.py ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def venue(name: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Returns venue data"
12
+
13
+ """
14
+ url = f"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/venue"
15
+ querystring = {'name': name, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "heisenbug-la-liga-live-scores-v1.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def team(name: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Returns info about the team"
33
+
34
+ """
35
+ url = f"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/team"
36
+ querystring = {'name': name, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "heisenbug-la-liga-live-scores-v1.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def activate_webhook(token: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "Activate a webhook registered with the subscribe endpoint. Not available for BASIC plan."
54
+ token: Token
55
+
56
+ """
57
+ url = f"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/activate"
58
+ querystring = {'token': token, }
59
+
60
+ headers = {
61
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
62
+ "X-RapidAPI-Host": "heisenbug-la-liga-live-scores-v1.p.rapidapi.com"
63
+ }
64
+
65
+
66
+ response = requests.get(url, headers=headers, params=querystring)
67
+ try:
68
+ observation = response.json()
69
+ except:
70
+ observation = response.text
71
+ return observation
72
+
73
+ def events_subscribed(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
74
+ """
75
+ "Returns all the events subscribed. Not available for BASIC plan."
76
+
77
+ """
78
+ url = f"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/push/lis"
79
+ querystring = {}
80
+
81
+ headers = {
82
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
83
+ "X-RapidAPI-Host": "heisenbug-la-liga-live-scores-v1.p.rapidapi.com"
84
+ }
85
+
86
+
87
+ response = requests.get(url, headers=headers, params=querystring)
88
+ try:
89
+ observation = response.json()
90
+ except:
91
+ observation = response.text
92
+ return observation
93
+
94
+ def prediction(team2: str, team1: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
95
+ """
96
+ "Returns match result perdiction (use an AI deep learning engine)"
97
+ team2: Away team name
98
+ team1: Home team name
99
+
100
+ """
101
+ url = f"https://heisenbug-la-liga-live-scores-v1.p.rapidapi.com/api/laliga/predict"
102
+ querystring = {'team2': team2, 'team1': team1, }
103
+
104
+ headers = {
105
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
106
+ "X-RapidAPI-Host": "heisenbug-la-liga-live-scores-v1.p.rapidapi.com"
107
+ }
108
+
109
+
110
+ response = requests.get(url, headers=headers, params=querystring)
111
+ try:
112
+ observation = response.json()
113
+ except:
114
+ observation = response.text
115
+ return observation
116
+
toolbench/toolenv/tools/Sports/laliga_standings.json ADDED
@@ -0,0 +1,409 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"LaLiga Standings",
3
+ "tool_description":"Spanish LaLiga Standings & Table",
4
+ "title":"LaLiga Standings",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":483,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":9.2,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/UnlimitedAPI/api/laliga-standings/",
14
+ "host":"laliga-standings.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"LaLiga Standings",
18
+ "url":"https://laliga-standings.p.rapidapi.com/",
19
+ "description":"LaLiga Standings",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[
23
+ {
24
+ "name":"season",
25
+ "type":"STRING",
26
+ "description":"e.g. `2022`\ne.g. `2021`",
27
+ "default":""
28
+ }
29
+ ],
30
+ "code":"import requests\n\nurl = \"https://laliga-standings.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"laliga-standings.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":[
33
+ {
34
+ "team":{
35
+ "name":"Real Madrid",
36
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/86.png",
37
+ "abbreviation":"MAD"
38
+ },
39
+ "stats":{
40
+ "wins":26,
41
+ "losses":4,
42
+ "ties":8,
43
+ "gamesPlayed":38,
44
+ "goalsFor":80,
45
+ "goalsAgainst":31,
46
+ "points":86,
47
+ "rank":1,
48
+ "goalDifference":49
49
+ }
50
+ },
51
+ {
52
+ "team":{
53
+ "name":"Barcelona",
54
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/83.png",
55
+ "abbreviation":"BAR"
56
+ },
57
+ "stats":{
58
+ "wins":21,
59
+ "losses":7,
60
+ "ties":10,
61
+ "gamesPlayed":38,
62
+ "goalsFor":68,
63
+ "goalsAgainst":38,
64
+ "points":73,
65
+ "rank":2,
66
+ "goalDifference":30
67
+ }
68
+ },
69
+ {
70
+ "team":{
71
+ "name":"Atletico Madrid",
72
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/1068.png",
73
+ "abbreviation":"ATL"
74
+ },
75
+ "stats":{
76
+ "wins":21,
77
+ "losses":9,
78
+ "ties":8,
79
+ "gamesPlayed":38,
80
+ "goalsFor":65,
81
+ "goalsAgainst":43,
82
+ "points":71,
83
+ "rank":3,
84
+ "goalDifference":22
85
+ }
86
+ },
87
+ {
88
+ "team":{
89
+ "name":"Sevilla",
90
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/243.png",
91
+ "abbreviation":"SEV"
92
+ },
93
+ "stats":{
94
+ "wins":18,
95
+ "losses":4,
96
+ "ties":16,
97
+ "gamesPlayed":38,
98
+ "goalsFor":53,
99
+ "goalsAgainst":30,
100
+ "points":70,
101
+ "rank":4,
102
+ "goalDifference":23
103
+ }
104
+ },
105
+ {
106
+ "team":{
107
+ "name":"Real Betis",
108
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/244.png",
109
+ "abbreviation":"BET"
110
+ },
111
+ "stats":{
112
+ "wins":19,
113
+ "losses":11,
114
+ "ties":8,
115
+ "gamesPlayed":38,
116
+ "goalsFor":62,
117
+ "goalsAgainst":40,
118
+ "points":65,
119
+ "rank":5,
120
+ "goalDifference":22
121
+ }
122
+ },
123
+ {
124
+ "team":{
125
+ "name":"Real Sociedad",
126
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/89.png",
127
+ "abbreviation":"RSO"
128
+ },
129
+ "stats":{
130
+ "wins":17,
131
+ "losses":10,
132
+ "ties":11,
133
+ "gamesPlayed":38,
134
+ "goalsFor":40,
135
+ "goalsAgainst":37,
136
+ "points":62,
137
+ "rank":6,
138
+ "goalDifference":3
139
+ }
140
+ },
141
+ {
142
+ "team":{
143
+ "name":"Villarreal",
144
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/102.png",
145
+ "abbreviation":"VIL"
146
+ },
147
+ "stats":{
148
+ "wins":16,
149
+ "losses":11,
150
+ "ties":11,
151
+ "gamesPlayed":38,
152
+ "goalsFor":63,
153
+ "goalsAgainst":37,
154
+ "points":59,
155
+ "rank":7,
156
+ "goalDifference":26
157
+ }
158
+ },
159
+ {
160
+ "team":{
161
+ "name":"Athletic Club",
162
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/93.png",
163
+ "abbreviation":"ATH"
164
+ },
165
+ "stats":{
166
+ "wins":14,
167
+ "losses":11,
168
+ "ties":13,
169
+ "gamesPlayed":38,
170
+ "goalsFor":43,
171
+ "goalsAgainst":36,
172
+ "points":55,
173
+ "rank":8,
174
+ "goalDifference":7
175
+ }
176
+ },
177
+ {
178
+ "team":{
179
+ "name":"Valencia",
180
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/94.png",
181
+ "abbreviation":"VAL"
182
+ },
183
+ "stats":{
184
+ "wins":11,
185
+ "losses":12,
186
+ "ties":15,
187
+ "gamesPlayed":38,
188
+ "goalsFor":48,
189
+ "goalsAgainst":53,
190
+ "points":48,
191
+ "rank":9,
192
+ "goalDifference":-5
193
+ }
194
+ },
195
+ {
196
+ "team":{
197
+ "name":"Osasuna",
198
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/97.png",
199
+ "abbreviation":"OSA"
200
+ },
201
+ "stats":{
202
+ "wins":12,
203
+ "losses":15,
204
+ "ties":11,
205
+ "gamesPlayed":38,
206
+ "goalsFor":37,
207
+ "goalsAgainst":51,
208
+ "points":47,
209
+ "rank":10,
210
+ "goalDifference":-14
211
+ }
212
+ },
213
+ {
214
+ "team":{
215
+ "name":"Celta Vigo",
216
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/85.png",
217
+ "abbreviation":"CEL"
218
+ },
219
+ "stats":{
220
+ "wins":12,
221
+ "losses":16,
222
+ "ties":10,
223
+ "gamesPlayed":38,
224
+ "goalsFor":43,
225
+ "goalsAgainst":43,
226
+ "points":46,
227
+ "rank":11,
228
+ "goalDifference":0
229
+ }
230
+ },
231
+ {
232
+ "team":{
233
+ "name":"Rayo Vallecano",
234
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/101.png",
235
+ "abbreviation":"RAY"
236
+ },
237
+ "stats":{
238
+ "wins":11,
239
+ "losses":18,
240
+ "ties":9,
241
+ "gamesPlayed":38,
242
+ "goalsFor":39,
243
+ "goalsAgainst":50,
244
+ "points":42,
245
+ "rank":12,
246
+ "goalDifference":-11
247
+ }
248
+ },
249
+ {
250
+ "team":{
251
+ "name":"Elche",
252
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/3751.png",
253
+ "abbreviation":"ELC"
254
+ },
255
+ "stats":{
256
+ "wins":11,
257
+ "losses":18,
258
+ "ties":9,
259
+ "gamesPlayed":38,
260
+ "goalsFor":40,
261
+ "goalsAgainst":52,
262
+ "points":42,
263
+ "rank":13,
264
+ "goalDifference":-12
265
+ }
266
+ },
267
+ {
268
+ "team":{
269
+ "name":"Espanyol",
270
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/88.png",
271
+ "abbreviation":"ESP"
272
+ },
273
+ "stats":{
274
+ "wins":10,
275
+ "losses":16,
276
+ "ties":12,
277
+ "gamesPlayed":38,
278
+ "goalsFor":40,
279
+ "goalsAgainst":53,
280
+ "points":42,
281
+ "rank":14,
282
+ "goalDifference":-13
283
+ }
284
+ },
285
+ {
286
+ "team":{
287
+ "name":"Getafe",
288
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/2922.png",
289
+ "abbreviation":"GET"
290
+ },
291
+ "stats":{
292
+ "wins":8,
293
+ "losses":15,
294
+ "ties":15,
295
+ "gamesPlayed":38,
296
+ "goalsFor":33,
297
+ "goalsAgainst":41,
298
+ "points":39,
299
+ "rank":15,
300
+ "goalDifference":-8
301
+ }
302
+ },
303
+ {
304
+ "team":{
305
+ "name":"Mallorca",
306
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/84.png",
307
+ "abbreviation":"MLL"
308
+ },
309
+ "stats":{
310
+ "wins":10,
311
+ "losses":19,
312
+ "ties":9,
313
+ "gamesPlayed":38,
314
+ "goalsFor":36,
315
+ "goalsAgainst":63,
316
+ "points":39,
317
+ "rank":16,
318
+ "goalDifference":-27
319
+ }
320
+ },
321
+ {
322
+ "team":{
323
+ "name":"Cádiz",
324
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/3842.png",
325
+ "abbreviation":"CAD"
326
+ },
327
+ "stats":{
328
+ "wins":8,
329
+ "losses":15,
330
+ "ties":15,
331
+ "gamesPlayed":38,
332
+ "goalsFor":35,
333
+ "goalsAgainst":51,
334
+ "points":39,
335
+ "rank":17,
336
+ "goalDifference":-16
337
+ }
338
+ },
339
+ {
340
+ "team":{
341
+ "name":"Granada",
342
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/3747.png",
343
+ "abbreviation":"GCF"
344
+ },
345
+ "stats":{
346
+ "wins":8,
347
+ "losses":16,
348
+ "ties":14,
349
+ "gamesPlayed":38,
350
+ "goalsFor":44,
351
+ "goalsAgainst":61,
352
+ "points":38,
353
+ "rank":18,
354
+ "goalDifference":-17
355
+ }
356
+ },
357
+ {
358
+ "team":{
359
+ "name":"Levante",
360
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/1538.png",
361
+ "abbreviation":"LEV"
362
+ },
363
+ "stats":{
364
+ "wins":8,
365
+ "losses":19,
366
+ "ties":11,
367
+ "gamesPlayed":38,
368
+ "goalsFor":51,
369
+ "goalsAgainst":76,
370
+ "points":35,
371
+ "rank":19,
372
+ "goalDifference":-25
373
+ }
374
+ },
375
+ {
376
+ "team":{
377
+ "name":"Alavés",
378
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/96.png",
379
+ "abbreviation":"ALV"
380
+ },
381
+ "stats":{
382
+ "wins":8,
383
+ "losses":23,
384
+ "ties":7,
385
+ "gamesPlayed":38,
386
+ "goalsFor":31,
387
+ "goalsAgainst":65,
388
+ "points":31,
389
+ "rank":20,
390
+ "goalDifference":-34
391
+ }
392
+ }
393
+ ],
394
+ "headers":{
395
+ "access-control-allow-credentials":"true",
396
+ "access-control-allow-origin":"*",
397
+ "connection":"keep-alive",
398
+ "content-length":"5047",
399
+ "content-type":"application/json",
400
+ "date":"Fri, 08 Jul 2022 21:12:35 GMT",
401
+ "server":"RapidAPI-1.2.8",
402
+ "via":"1.1 vegur",
403
+ "x-rapidapi-region":"AWS - eu-central-1",
404
+ "x-rapidapi-version":"1.2.8"
405
+ },
406
+ "schema":{}
407
+ }
408
+ ]
409
+ }
toolbench/toolenv/tools/Sports/laliga_standings/api.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def laliga_standings(season: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "LaLiga Standings"
12
+ season: e.g. `2022`
13
+ e.g. `2021`
14
+
15
+ """
16
+ url = f"https://laliga-standings.p.rapidapi.com/"
17
+ querystring = {}
18
+ if season:
19
+ querystring['season'] = season
20
+
21
+ headers = {
22
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
23
+ "X-RapidAPI-Host": "laliga-standings.p.rapidapi.com"
24
+ }
25
+
26
+
27
+ response = requests.get(url, headers=headers, params=querystring)
28
+ try:
29
+ observation = response.json()
30
+ except:
31
+ observation = response.text
32
+ return observation
33
+
toolbench/toolenv/tools/Sports/langquoctru.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"langquoctru",
3
+ "tool_description":"Chuyên gia phân tích kèo bóng đá và casino tại Nhà Cái Uy Tín Boda",
4
+ "title":"langquoctru",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/langquoctru1/api/langquoctru/",
8
+ "host":"langquoctru.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Lăng Quốc Trụ",
12
+ "url":"https://langquoctru.p.rapidapi.com/",
13
+ "description":"Tôi là Lăng Quốc Trụ, sáng lập website nhacaiuytinhot.com - nơi đánh giá và tổng hợp danh sách các nhà cái uy tín nhất Việt Nam hiện nay. Với 7 năm kinh nghiệm cá cược hi vọng sẽ đem đến cho các bạn những thông tin hữu ích.\nWebsite: https://nhacaiuytinhot.com \nĐịa chỉ: Hà Nội\nHotline: 088 854 0267\nhttps://www.facebook.com/langquoctru \nhttps://www.pinterest.com/langquoctru/ \nhttps://social.msdn.microsoft.com/profile/langquoctru/ \nhttps://diigo.com/user/langquoctru \nhttps://social.technet.microsoft.com/profile/langquoctru/ \nhttps://vi.gravatar.com/langquoctru \nhttps://www.reddit.com/user/langquoctru \nhttps://soundcloud.com/langquoctru/ \nhttps://www.behance.net/langquoctru \nhttps://medium.com/@langquoctru/ \nhttps://www.openstreetmap.org/user/langquoctru \nhttps://www.twitch.tv/langquoctru/about \nhttps://issuu.com/langquoctru",
14
+ "method":"GET",
15
+ "required_parameters":[],
16
+ "optional_parameters":[],
17
+ "code":"import requests\n\nurl = \"https://langquoctru.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"langquoctru.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
18
+ "statuscode":111,
19
+ "body":"",
20
+ "headers":"",
21
+ "schema":""
22
+ }
23
+ ]
24
+ }
toolbench/toolenv/tools/Sports/langquoctru/api.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def l_ng_qu_c_tr(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Tôi là Lăng Quốc Trụ, sáng lập website nhacaiuytinhot.com - nơi đánh giá và tổng hợp danh sách các nhà cái uy tín nhất Việt Nam hiện nay. Với 7 năm kinh nghiệm cá cược hi vọng sẽ đem đến cho các bạn những thông tin hữu ích.
12
+ Website: https://nhacaiuytinhot.com
13
+ Địa chỉ: Hà Nội
14
+ Hotline: 088 854 0267
15
+ https://www.facebook.com/langquoctru
16
+ https://www.pinterest.com/langquoctru/
17
+ https://social.msdn.microsoft.com/profile/langquoctru/
18
+ https://diigo.com/user/langquoctru
19
+ https://social.technet.microsoft.com/profile/langquoctru/
20
+ https://vi.gravatar.com/langquoctru
21
+ https://www.reddit.com/user/langquoctru
22
+ https://soundcloud.com/langquoctru/
23
+ https://www.behance.net/langquoctru
24
+ https://medium.com/@langquoctru/
25
+ https://www.openstreetmap.org/user/langquoctru
26
+ https://www.twitch.tv/langquoctru/about
27
+ https://issuu.com/langquoctru"
28
+
29
+ """
30
+ url = f"https://langquoctru.p.rapidapi.com/"
31
+ querystring = {}
32
+
33
+ headers = {
34
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
35
+ "X-RapidAPI-Host": "langquoctru.p.rapidapi.com"
36
+ }
37
+
38
+
39
+ response = requests.get(url, headers=headers, params=querystring)
40
+ try:
41
+ observation = response.json()
42
+ except:
43
+ observation = response.text
44
+ return observation
45
+
toolbench/toolenv/tools/Sports/laserforce_statistics.json ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Laserforce Statistics",
3
+ "tool_description":"With this API, information can be read from the Laserforce database, such as the games played, the game modes played and the scores achieved.",
4
+ "title":"Laserforce Statistics",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/BlackFlagTV/api/laserforce-statistics/",
8
+ "host":"laserforce-statistics.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Member Details",
12
+ "url":"https://laserforce-statistics.p.rapidapi.com/memberDetails.php",
13
+ "description":"With this endpoint you can find member information about a specific player.",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"memberId",
18
+ "type":"STRING",
19
+ "description":"",
20
+ "default":"21-70-42"
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://laserforce-statistics.p.rapidapi.com/memberDetails.php\"\nquerystring = {\"memberId\": memberid}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"laserforce-statistics.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode":200,
26
+ "body":"{\"names\":{\"0\":{\"name\":\"Mr.X-59\"}},\"memberRegion\":\"21\",\"memberSite\":\"70\",\"memberId\":\"42\",\"playedGames\":4,\"centre\":[{\"name\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"codename\":\"Mr.X-59\",\"joined\":\"2016-10-09\",\"missions\":4,\"skillLevelNum\":\"0\",\"skillLevelName\":\"Rekrut\",\"summary\":[[\"Standard\",4,\"2017-05-23 20:16:38\",13212,10974]]}]}",
27
+ "headers":{
28
+ "content-type":"text/html; charset=UTF-8",
29
+ "date":"Tue, 05 May 2020 16:35:52 GMT",
30
+ "server":"RapidAPI-1.1.0",
31
+ "strict-transport-security":"max-age=10368000; includeSubDomains; preload",
32
+ "vary":"Accept-Encoding",
33
+ "x-rapidapi-region":"AWS - eu-central-1",
34
+ "x-rapidapi-version":"1.1.0",
35
+ "content-length":"332",
36
+ "connection":"Close"
37
+ },
38
+ "schema":{
39
+ "type":"object",
40
+ "properties":{
41
+ "get":{
42
+ "type":"string"
43
+ },
44
+ "parameters":{
45
+ "type":"array"
46
+ },
47
+ "errors":{
48
+ "type":"array"
49
+ },
50
+ "results":{
51
+ "type":"integer"
52
+ },
53
+ "response":{
54
+ "type":"array",
55
+ "items":{
56
+ "type":"object"
57
+ }
58
+ }
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "name":"Recent Missions",
64
+ "url":"https://laserforce-statistics.p.rapidapi.com/recentMissions.php",
65
+ "description":"With this endpoint you can view a player's last 30 missions.",
66
+ "method":"GET",
67
+ "required_parameters":[
68
+ {
69
+ "name":"limit",
70
+ "type":"NUMBER",
71
+ "description":"",
72
+ "default":"30"
73
+ },
74
+ {
75
+ "name":"memberId",
76
+ "type":"STRING",
77
+ "description":"",
78
+ "default":"21-70-42"
79
+ }
80
+ ],
81
+ "optional_parameters":[],
82
+ "code":"import requests\n\nurl = \"https://laserforce-statistics.p.rapidapi.com/recentMissions.php\"\nquerystring = {\"limit\": limit, \"memberId\": memberid}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"laserforce-statistics.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
83
+ "statuscode":200,
84
+ "body":"{\"missions\":{\"0\":{\"timestamp\":\"2017-05-23 20:16:38\",\"arena\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"gamemode\":\"Jeder gegen Jeden\",\"points\":6700},\"1\":{\"timestamp\":\"2016-12-22 19:49:22\",\"arena\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"gamemode\":\"2 Teams\",\"points\":12202},\"2\":{\"timestamp\":\"2016-11-10 20:14:36\",\"arena\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"gamemode\":\"2 Teams\",\"points\":13212},\"3\":{\"timestamp\":\"2016-10-09 18:42:41\",\"arena\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"gamemode\":\"3 Teams\",\"points\":11782}}}",
85
+ "headers":{
86
+ "content-type":"text/html; charset=UTF-8",
87
+ "date":"Tue, 05 May 2020 17:04:45 GMT",
88
+ "server":"RapidAPI-1.1.0",
89
+ "strict-transport-security":"max-age=10368000; includeSubDomains; preload",
90
+ "vary":"Accept-Encoding",
91
+ "x-rapidapi-region":"AWS - eu-central-1",
92
+ "x-rapidapi-version":"1.1.0",
93
+ "content-length":"539",
94
+ "connection":"Close"
95
+ },
96
+ "schema":{
97
+ "type":"object",
98
+ "properties":{
99
+ "get":{
100
+ "type":"string"
101
+ },
102
+ "parameters":{
103
+ "type":"array"
104
+ },
105
+ "errors":{
106
+ "type":"array"
107
+ },
108
+ "results":{
109
+ "type":"integer"
110
+ },
111
+ "response":{
112
+ "type":"array",
113
+ "items":{
114
+ "type":"object"
115
+ }
116
+ }
117
+ }
118
+ }
119
+ },
120
+ {
121
+ "name":"Last 5 Recent Missions",
122
+ "url":"https://laserforce-statistics.p.rapidapi.com/recent5Missions.php",
123
+ "description":"With this endpoint you can view a player's last 5 missions.",
124
+ "method":"GET",
125
+ "required_parameters":[
126
+ {
127
+ "name":"memberId",
128
+ "type":"STRING",
129
+ "description":"",
130
+ "default":"21-70-42"
131
+ }
132
+ ],
133
+ "optional_parameters":[],
134
+ "code":"import requests\n\nurl = \"https://laserforce-statistics.p.rapidapi.com/recent5Missions.php\"\nquerystring = {\"memberId\": memberid}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"laserforce-statistics.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
135
+ "statuscode":200,
136
+ "body":"{\"missions\":{\"0\":{\"timestamp\":\"2017-05-23 20:16:38\",\"arena\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"gamemode\":\"Jeder gegen Jeden\",\"points\":6700},\"1\":{\"timestamp\":\"2016-12-22 19:49:22\",\"arena\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"gamemode\":\"2 Teams\",\"points\":12202},\"2\":{\"timestamp\":\"2016-11-10 20:14:36\",\"arena\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"gamemode\":\"2 Teams\",\"points\":13212},\"3\":{\"timestamp\":\"2016-10-09 18:42:41\",\"arena\":\"Lasertag Deutschland 1, Darmstadt, Germany\",\"gamemode\":\"3 Teams\",\"points\":11782}}}",
137
+ "headers":{
138
+ "content-type":"text/html; charset=UTF-8",
139
+ "date":"Tue, 05 May 2020 17:12:04 GMT",
140
+ "server":"RapidAPI-1.1.0",
141
+ "strict-transport-security":"max-age=10368000; includeSubDomains; preload",
142
+ "vary":"Accept-Encoding",
143
+ "x-rapidapi-region":"AWS - eu-central-1",
144
+ "x-rapidapi-version":"1.1.0",
145
+ "content-length":"539",
146
+ "connection":"Close"
147
+ },
148
+ "schema":{
149
+ "type":"object",
150
+ "properties":{
151
+ "get":{
152
+ "type":"string"
153
+ },
154
+ "parameters":{
155
+ "type":"array"
156
+ },
157
+ "errors":{
158
+ "type":"array"
159
+ },
160
+ "results":{
161
+ "type":"integer"
162
+ },
163
+ "response":{
164
+ "type":"array",
165
+ "items":{
166
+ "type":"object"
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
172
+ ]
173
+ }
toolbench/toolenv/tools/Sports/laserforce_statistics/api.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def member_details(memberid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "With this endpoint you can find member information about a specific player."
12
+
13
+ """
14
+ url = f"https://laserforce-statistics.p.rapidapi.com/memberdetails.php"
15
+ querystring = {'memberId': memberid, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "laserforce-statistics.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def recent_missions(limit: int, memberid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "With this endpoint you can view a player's last 30 missions."
33
+
34
+ """
35
+ url = f"https://laserforce-statistics.p.rapidapi.com/recentmissions.php"
36
+ querystring = {'limit': limit, 'memberId': memberid, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "laserforce-statistics.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def last_5_recent_missions(memberid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "With this endpoint you can view a player's last 5 missions."
54
+
55
+ """
56
+ url = f"https://laserforce-statistics.p.rapidapi.com/recent5missions.php"
57
+ querystring = {'memberId': memberid, }
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "laserforce-statistics.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
toolbench/toolenv/tools/Sports/lfopen_web.json ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "53aa45f2e4b0a798dbd19e99",
3
+ "tool_description": "At Life Fitness, we commit to providing the best exercising experience by empowering others. With LFopen, developers and fitness facility owners can access the Life Fitness Application Programming Interfaces (API) to be able to extend the functionali",
4
+ "home_url": "https://rapidapi.com/lifefitness/api/lfopen-web/",
5
+ "name": "LFopen Web",
6
+ "title": "LFopen Web",
7
+ "pricing": "FREE",
8
+ "tool_name": "LFopen Web",
9
+ "score": {
10
+ "avgServiceLevel": 100,
11
+ "avgLatency": 289,
12
+ "avgSuccessRate": 0,
13
+ "popularityScore": 0,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "life-fitness-lfconnect-website1.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "poststrength",
20
+ "url": "https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/poststrength",
21
+ "description": "Store Manual Strength Workout information.i.e, Strength workout posted manually rather than through equipment. This service saves the Manual Strength workout information and posts to Facebook if the User has authorized Facebook sharing in his profile with the message specified in facebookShareMsg and the workout information.",
22
+ "method": "POST",
23
+ "required_parameters": [],
24
+ "optional_parameters": [],
25
+ "code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/poststrength\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
26
+ "convert_code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/poststrength\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
27
+ "test_endpoint": "",
28
+ "statuscode": 1,
29
+ "schema": ""
30
+ },
31
+ {
32
+ "name": "Update user",
33
+ "url": "https://life-fitness-lfconnect-website1.p.rapidapi.com/user",
34
+ "description": "",
35
+ "method": "POST",
36
+ "required_parameters": [],
37
+ "optional_parameters": [],
38
+ "code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/user\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
39
+ "convert_code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/user\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
40
+ "test_endpoint": "",
41
+ "statuscode": 1,
42
+ "schema": ""
43
+ },
44
+ {
45
+ "name": "Save Photo",
46
+ "url": "https://life-fitness-lfconnect-website1.p.rapidapi.com/user/savephoto",
47
+ "description": "",
48
+ "method": "POST",
49
+ "required_parameters": [
50
+ {
51
+ "name": "image",
52
+ "type": "BINARY",
53
+ "description": "image",
54
+ "default": ""
55
+ }
56
+ ],
57
+ "optional_parameters": [],
58
+ "code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/user/savephoto\"\nquerystring = {\"image\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
59
+ "convert_code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/user/savephoto\"\nquerystring = {\"image\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
60
+ "test_endpoint": "",
61
+ "statuscode": 1,
62
+ "schema": ""
63
+ },
64
+ {
65
+ "name": "postcardio",
66
+ "url": "https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/postcardio",
67
+ "description": "Store Manual Cardio Workout information i.e, Cardio workout posted manually rather than through equipment. This service saves the Manual Cardio workout information and posts to Facebook if the User has authorized Facebook sharing in his profile with the message specified in facebookShareMsg and the workout information.",
68
+ "method": "POST",
69
+ "required_parameters": [],
70
+ "optional_parameters": [],
71
+ "code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/postcardio\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
72
+ "convert_code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/postcardio\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
73
+ "test_endpoint": "",
74
+ "statuscode": 1,
75
+ "schema": ""
76
+ },
77
+ {
78
+ "name": "postgps",
79
+ "url": "https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/postgps",
80
+ "description": "Saves the GPS workout information. This service saves the GPS information and posts to Facebook if the User has authorized Facebook sharing in his profile, with the message specified in facebookShareMsg and the workout information.",
81
+ "method": "POST",
82
+ "required_parameters": [],
83
+ "optional_parameters": [],
84
+ "code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/postgps\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
85
+ "convert_code": "import requests\n\nurl = \"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/postgps\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"life-fitness-lfconnect-website1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
86
+ "test_endpoint": "",
87
+ "statuscode": 1,
88
+ "schema": ""
89
+ }
90
+ ]
91
+ }
toolbench/toolenv/tools/Sports/lfopen_web/api.py ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_results_workout(fromdate: str, todate: str, timezone: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Retrieves workout progress of User between the specified dates"
12
+ fromdate: Format : MM/dd/YYYY
13
+ todate: Format : MM/dd/YYYY
14
+ timezone: Format : GMT Sign Hours : Minutes (e.g. "GMT-8:00") or GMT Sign Hours Minutes (e.g. "GMT-0800") or GMT Sign Hours (e.g. "GMT-8").
15
+
16
+ """
17
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/get_results_workout"
18
+ querystring = {'fromDate': fromdate, 'toDate': todate, 'timezone': timezone, }
19
+
20
+ headers = {
21
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
22
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
23
+ }
24
+
25
+
26
+ response = requests.get(url, headers=headers, params=querystring)
27
+ try:
28
+ observation = response.json()
29
+ except:
30
+ observation = response.text
31
+ return observation
32
+
33
+ def get_results_daily(fromdate: str, todate: str, timezone: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
34
+ """
35
+ "Retrieves Daily Progress of User between the specified dates"
36
+ fromdate: Format : MM/dd/YYYY
37
+ todate: Format : MM/dd/YYYY
38
+ timezone: Format : GMT Sign Hours : Minutes (e.g. "GMT-8:00") or GMT Sign Hours Minutes (e.g. "GMT-0800") or GMT Sign Hours (e.g. "GMT-8").
39
+
40
+ """
41
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/get_results_daily"
42
+ querystring = {'fromDate': fromdate, 'toDate': todate, 'timezone': timezone, }
43
+
44
+ headers = {
45
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
46
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
47
+ }
48
+
49
+
50
+ response = requests.get(url, headers=headers, params=querystring)
51
+ try:
52
+ observation = response.json()
53
+ except:
54
+ observation = response.text
55
+ return observation
56
+
57
+ def get_lifefitness_results(fromdate: str, todate: str, timezone: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
58
+ """
59
+ ""
60
+ fromdate: Format : MM/dd/YYYY
61
+ todate: Format : MM/dd/YYYY
62
+ timezone: Format : GMT Sign Hours : Minutes (e.g. "GMT-8:00") or GMT Sign Hours Minutes (e.g. "GMT-0800") or GMT Sign Hours (e.g. "GMT-8").
63
+
64
+ """
65
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/get_lifefitness_results"
66
+ querystring = {'fromDate': fromdate, 'toDate': todate, 'timezone': timezone, }
67
+
68
+ headers = {
69
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
70
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
71
+ }
72
+
73
+
74
+ response = requests.get(url, headers=headers, params=querystring)
75
+ try:
76
+ observation = response.json()
77
+ except:
78
+ observation = response.text
79
+ return observation
80
+
81
+ def get_user_account_details(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
82
+ """
83
+ "Retrieves the user account details based on the User access token passed."
84
+
85
+ """
86
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/user"
87
+ querystring = {}
88
+
89
+ headers = {
90
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
91
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
92
+ }
93
+
94
+
95
+ response = requests.get(url, headers=headers, params=querystring)
96
+ try:
97
+ observation = response.json()
98
+ except:
99
+ observation = response.text
100
+ return observation
101
+
102
+ def get_photo(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
103
+ """
104
+ "Returns the Profile photo of the LFConnect User related to the Access Token passed."
105
+
106
+ """
107
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/user/getphoto"
108
+ querystring = {}
109
+
110
+ headers = {
111
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
112
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
113
+ }
114
+
115
+
116
+ response = requests.get(url, headers=headers, params=querystring)
117
+ try:
118
+ observation = response.json()
119
+ except:
120
+ observation = response.text
121
+ return observation
122
+
123
+ def get_equipment_list(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
124
+ """
125
+ "Retreives all the equipments available. This service retrieves the static values of equipment Ids and equipments. These values can be provided as an input to get the User workouts using /get_workoutlist service. The workout results retrieval services holds these values to identify the equipment that the workout has been completed"
126
+
127
+ """
128
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutpreset/get_equipment_list"
129
+ querystring = {}
130
+
131
+ headers = {
132
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
133
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
134
+ }
135
+
136
+
137
+ response = requests.get(url, headers=headers, params=querystring)
138
+ try:
139
+ observation = response.json()
140
+ except:
141
+ observation = response.text
142
+ return observation
143
+
144
+ def get_gps_results(fromdate: str, todate: str, timezone: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
145
+ """
146
+ "Retrieves Workout results posted by User through GPS between the specified dates"
147
+ fromdate: Format : MM/dd/YYYY
148
+ todate: Format : MM/dd/YYYY
149
+ timezone: Format : GMT Sign Hours : Minutes (e.g. "GMT-8:00") or GMT Sign Hours Minutes (e.g. "GMT-0800") or GMT Sign Hours (e.g. "GMT-8").
150
+
151
+ """
152
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/get_gps_results"
153
+ querystring = {'fromDate': fromdate, 'toDate': todate, 'timezone': timezone, }
154
+
155
+ headers = {
156
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
157
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
158
+ }
159
+
160
+
161
+ response = requests.get(url, headers=headers, params=querystring)
162
+ try:
163
+ observation = response.json()
164
+ except:
165
+ observation = response.text
166
+ return observation
167
+
168
+ def get_manualstrength_results(fromdate: str, todate: str, timezone: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
169
+ """
170
+ "Retrieves Manual Strength workout results of User between the specifieddates"
171
+ fromdate: Format : MM/dd/YYYY
172
+ todate: Format : MM/dd/YYYY
173
+ timezone: Format : GMT Sign Hours : Minutes (e.g. "GMT-8:00") or GMT Sign Hours Minutes (e.g. "GMT-0800") or GMT Sign Hours (e.g. "GMT-8").
174
+
175
+ """
176
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/get_manualstrength_results"
177
+ querystring = {'fromDate': fromdate, 'toDate': todate, 'timezone': timezone, }
178
+
179
+ headers = {
180
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
181
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
182
+ }
183
+
184
+
185
+ response = requests.get(url, headers=headers, params=querystring)
186
+ try:
187
+ observation = response.json()
188
+ except:
189
+ observation = response.text
190
+ return observation
191
+
192
+ def get_summary_results(fromdate: str, todate: str, timezone: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
193
+ """
194
+ "Read current progress information. This service provides the progress information like calories,duration,workout span days and weights lifted per Day,Week,Month and Year. The currDate parameter value passed is considered as the current day till which the progress information is seeked."
195
+ fromdate: Format : MM/dd/YYYY
196
+ todate: Format : MM/dd/YYYY
197
+ timezone: Format : GMT Sign Hours : Minutes (e.g. "GMT-8:00") or GMT Sign Hours Minutes (e.g. "GMT-0800") or GMT Sign Hours (e.g. "GMT-8").
198
+
199
+ """
200
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/get_summary_results"
201
+ querystring = {'fromDate': fromdate, 'toDate': todate, 'timezone': timezone, }
202
+
203
+ headers = {
204
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
205
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
206
+ }
207
+
208
+
209
+ response = requests.get(url, headers=headers, params=querystring)
210
+ try:
211
+ observation = response.json()
212
+ except:
213
+ observation = response.text
214
+ return observation
215
+
216
+ def get_workoutlist(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
217
+ """
218
+ "The user creates custom workouts giving specific goals and parameters such as time/calories/distance. This service returns all the workout presets created by the user. The user selects any one of the preset in the Lifefitness equipment before starting a workout If the equipmentIds are not mentioned, then this returns all the workouts available. This details provides the users preference of workouts and might help in suggesting similar workout regimens. To provide the value for equipmentIds input, the service xx can be used to get the list of predefined equipmentIds and the desired value can be provided."
219
+
220
+ """
221
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutpreset/get_workoutlist"
222
+ querystring = {}
223
+
224
+ headers = {
225
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
226
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
227
+ }
228
+
229
+
230
+ response = requests.get(url, headers=headers, params=querystring)
231
+ try:
232
+ observation = response.json()
233
+ except:
234
+ observation = response.text
235
+ return observation
236
+
237
+ def get_manual_cardio_results(fromdate: str, todate: str, timezone: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
238
+ """
239
+ "Retrieves Manual Cardio workout results of User between the specified dates"
240
+ fromdate: Format : MM/dd/YYYY
241
+ todate: Format : MM/dd/YYYY
242
+ timezone: Format : GMT Sign Hours : Minutes (e.g. "GMT-8:00") or GMT Sign Hours Minutes (e.g. "GMT-0800") or GMT Sign Hours (e.g. "GMT-8").
243
+
244
+ """
245
+ url = f"https://life-fitness-lfconnect-website1.p.rapidapi.com/workoutresults/get_manualcardio_results"
246
+ querystring = {'fromDate': fromdate, 'toDate': todate, 'timezone': timezone, }
247
+
248
+ headers = {
249
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
250
+ "X-RapidAPI-Host": "life-fitness-lfconnect-website1.p.rapidapi.com"
251
+ }
252
+
253
+
254
+ response = requests.get(url, headers=headers, params=querystring)
255
+ try:
256
+ observation = response.json()
257
+ except:
258
+ observation = response.text
259
+ return observation
260
+
toolbench/toolenv/tools/Sports/liga_nos_live_scores.json ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Liga NOS Live Scores",
3
+ "tool_description":"Liga NOS Live Scores API allows to retrieve current season results, scorers, lineups, substitutes, events, statistics and much more all with live updates, for the top professional Portuguese football league. And more is coming...",
4
+ "title":"Liga NOS Live Scores",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/heisenbug/api/liga-nos-live-scores/",
8
+ "host":"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Player details",
12
+ "url":"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/playerdetails",
13
+ "description":"Returns all data about a player. Available only with ULTRA and MEGA plans!",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"player",
18
+ "type":"STRING",
19
+ "description":"Player name",
20
+ "default":""
21
+ },
22
+ {
23
+ "name":"team",
24
+ "type":"STRING",
25
+ "description":"Team name",
26
+ "default":""
27
+ }
28
+ ],
29
+ "optional_parameters":[
30
+ {
31
+ "name":"honours",
32
+ "type":"BOOLEAN",
33
+ "description":"Return only the honours for the player (default false)",
34
+ "default":""
35
+ }
36
+ ],
37
+ "code":"import requests\n\nurl = \"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/playerdetails\"\nquerystring = {\"player\": player, \"team\": team}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
38
+ "statuscode":111,
39
+ "body":"",
40
+ "headers":"",
41
+ "schema":""
42
+ },
43
+ {
44
+ "name":"Player stats for a match",
45
+ "url":"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/player",
46
+ "description":"Returns the player's statistics for a match",
47
+ "method":"GET",
48
+ "required_parameters":[
49
+ {
50
+ "name":"player",
51
+ "type":"STRING",
52
+ "description":"Player name",
53
+ "default":""
54
+ },
55
+ {
56
+ "name":"team1",
57
+ "type":"STRING",
58
+ "description":"Home team",
59
+ "default":""
60
+ },
61
+ {
62
+ "name":"team2",
63
+ "type":"STRING",
64
+ "description":"Away team",
65
+ "default":""
66
+ }
67
+ ],
68
+ "optional_parameters":[
69
+ {
70
+ "name":"live",
71
+ "type":"BOOLEAN",
72
+ "description":"Returns data for a playing match (default false)",
73
+ "default":""
74
+ }
75
+ ],
76
+ "code":"import requests\n\nurl = \"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/player\"\nquerystring = {\"player\": player, \"team1\": team1, \"team2\": team2}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
77
+ "statuscode":111,
78
+ "body":"",
79
+ "headers":"",
80
+ "schema":""
81
+ },
82
+ {
83
+ "name":"Missing players for a match",
84
+ "url":"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/missing",
85
+ "description":"Returns missing players for a match",
86
+ "method":"GET",
87
+ "required_parameters":[
88
+ {
89
+ "name":"team1",
90
+ "type":"STRING",
91
+ "description":"Home team",
92
+ "default":""
93
+ },
94
+ {
95
+ "name":"team2",
96
+ "type":"STRING",
97
+ "description":"Away team",
98
+ "default":""
99
+ }
100
+ ],
101
+ "optional_parameters":[],
102
+ "code":"import requests\n\nurl = \"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/missing\"\nquerystring = {\"team1\": team1, \"team2\": team2}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
103
+ "statuscode":111,
104
+ "body":"",
105
+ "headers":"",
106
+ "schema":""
107
+ },
108
+ {
109
+ "name":"Match events",
110
+ "url":"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/events",
111
+ "description":"Returns the events for a match (yellow and red cards, substitutions, shots on post and formations module)",
112
+ "method":"GET",
113
+ "required_parameters":[
114
+ {
115
+ "name":"team1",
116
+ "type":"STRING",
117
+ "description":"Home team",
118
+ "default":""
119
+ },
120
+ {
121
+ "name":"team2",
122
+ "type":"STRING",
123
+ "description":"Away team",
124
+ "default":""
125
+ }
126
+ ],
127
+ "optional_parameters":[
128
+ {
129
+ "name":"live",
130
+ "type":"BOOLEAN",
131
+ "description":"Returns data for a playing match (default false)",
132
+ "default":""
133
+ }
134
+ ],
135
+ "code":"import requests\n\nurl = \"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/events\"\nquerystring = {\"team1\": team1, \"team2\": team2}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
136
+ "statuscode":111,
137
+ "body":"",
138
+ "headers":"",
139
+ "schema":""
140
+ },
141
+ {
142
+ "name":"Top scorers",
143
+ "url":"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/table/scorers",
144
+ "description":"Returns top scorers for the league",
145
+ "method":"GET",
146
+ "required_parameters":[],
147
+ "optional_parameters":[
148
+ {
149
+ "name":"how",
150
+ "type":"STRING",
151
+ "description":"Return only goals scored according the how parameter. Its value can be: left, right, head or any, that is the default.",
152
+ "default":""
153
+ },
154
+ {
155
+ "name":"page",
156
+ "type":"NUMBER",
157
+ "description":"Page result to return. Default is 1 that are results from 1 to 5 (max. value is 20).",
158
+ "default":""
159
+ },
160
+ {
161
+ "name":"from",
162
+ "type":"NUMBER",
163
+ "description":"Optional parameter to specify the first match number to use to compute the result (default 1)",
164
+ "default":""
165
+ },
166
+ {
167
+ "name":"mode",
168
+ "type":"STRING",
169
+ "description":"Optional parameter to restrict the table compute on home or away games (default all)",
170
+ "default":""
171
+ },
172
+ {
173
+ "name":"player",
174
+ "type":"STRING",
175
+ "description":"Optional parameter to get goals number only for the player name specified",
176
+ "default":""
177
+ },
178
+ {
179
+ "name":"team",
180
+ "type":"STRING",
181
+ "description":"Team name",
182
+ "default":""
183
+ },
184
+ {
185
+ "name":"to",
186
+ "type":"NUMBER",
187
+ "description":"Optional parameter to specify the last match number to consider to compute the result (default last match number played registered on system)",
188
+ "default":""
189
+ }
190
+ ],
191
+ "code":"import requests\n\nurl = \"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/table/scorers\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
192
+ "statuscode":111,
193
+ "body":"",
194
+ "headers":"",
195
+ "schema":""
196
+ },
197
+ {
198
+ "name":"Match scorers",
199
+ "url":"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/scorers",
200
+ "description":"Returns who scored and how for a match",
201
+ "method":"GET",
202
+ "required_parameters":[
203
+ {
204
+ "name":"team1",
205
+ "type":"STRING",
206
+ "description":"Home team",
207
+ "default":""
208
+ },
209
+ {
210
+ "name":"team2",
211
+ "type":"STRING",
212
+ "description":"Away team",
213
+ "default":""
214
+ }
215
+ ],
216
+ "optional_parameters":[
217
+ {
218
+ "name":"live",
219
+ "type":"BOOLEAN",
220
+ "description":"Returns data for a playing match (default false)",
221
+ "default":""
222
+ }
223
+ ],
224
+ "code":"import requests\n\nurl = \"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/scorers\"\nquerystring = {\"team1\": team1, \"team2\": team2}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
225
+ "statuscode":111,
226
+ "body":"",
227
+ "headers":"",
228
+ "schema":""
229
+ },
230
+ {
231
+ "name":"Lineups and substitutes for a game",
232
+ "url":"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/formations",
233
+ "description":"Returns lineups, substitutes and coaches for a game after a while the game is finished.",
234
+ "method":"GET",
235
+ "required_parameters":[
236
+ {
237
+ "name":"team1",
238
+ "type":"STRING",
239
+ "description":"Home team",
240
+ "default":""
241
+ },
242
+ {
243
+ "name":"team2",
244
+ "type":"STRING",
245
+ "description":"Away team",
246
+ "default":""
247
+ }
248
+ ],
249
+ "optional_parameters":[
250
+ {
251
+ "name":"live",
252
+ "type":"BOOLEAN",
253
+ "description":"Returns data for a playing match (default false)",
254
+ "default":""
255
+ }
256
+ ],
257
+ "code":"import requests\n\nurl = \"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/formations\"\nquerystring = {\"team1\": team1, \"team2\": team2}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
258
+ "statuscode":111,
259
+ "body":"",
260
+ "headers":"",
261
+ "schema":""
262
+ },
263
+ {
264
+ "name":"Match statistics",
265
+ "url":"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/stats",
266
+ "description":"Returns match statistics",
267
+ "method":"GET",
268
+ "required_parameters":[
269
+ {
270
+ "name":"team1",
271
+ "type":"STRING",
272
+ "description":"Home team",
273
+ "default":""
274
+ },
275
+ {
276
+ "name":"team2",
277
+ "type":"STRING",
278
+ "description":"Away team",
279
+ "default":""
280
+ }
281
+ ],
282
+ "optional_parameters":[
283
+ {
284
+ "name":"live",
285
+ "type":"BOOLEAN",
286
+ "description":"Returns data for a playing match (default false)",
287
+ "default":""
288
+ }
289
+ ],
290
+ "code":"import requests\n\nurl = \"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/stats\"\nquerystring = {\"team1\": team1, \"team2\": team2}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-liga-nos-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
291
+ "statuscode":111,
292
+ "body":"",
293
+ "headers":"",
294
+ "schema":""
295
+ }
296
+ ]
297
+ }
toolbench/toolenv/tools/Sports/liga_nos_live_scores/api.py ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def player_details(player: str, team: str, honours: bool=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Returns all data about a player. Available only with ULTRA and MEGA plans!"
12
+ player: Player name
13
+ team: Team name
14
+ honours: Return only the honours for the player (default false)
15
+
16
+ """
17
+ url = f"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/playerdetails"
18
+ querystring = {'player': player, 'team': team, }
19
+ if honours:
20
+ querystring['honours'] = honours
21
+
22
+ headers = {
23
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
24
+ "X-RapidAPI-Host": "heisenbug-liga-nos-live-scores-v1.p.rapidapi.com"
25
+ }
26
+
27
+
28
+ response = requests.get(url, headers=headers, params=querystring)
29
+ try:
30
+ observation = response.json()
31
+ except:
32
+ observation = response.text
33
+ return observation
34
+
35
+ def player_stats_for_a_match(player: str, team1: str, team2: str, live: bool=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
36
+ """
37
+ "Returns the player's statistics for a match"
38
+ player: Player name
39
+ team1: Home team
40
+ team2: Away team
41
+ live: Returns data for a playing match (default false)
42
+
43
+ """
44
+ url = f"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/player"
45
+ querystring = {'player': player, 'team1': team1, 'team2': team2, }
46
+ if live:
47
+ querystring['live'] = live
48
+
49
+ headers = {
50
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
51
+ "X-RapidAPI-Host": "heisenbug-liga-nos-live-scores-v1.p.rapidapi.com"
52
+ }
53
+
54
+
55
+ response = requests.get(url, headers=headers, params=querystring)
56
+ try:
57
+ observation = response.json()
58
+ except:
59
+ observation = response.text
60
+ return observation
61
+
62
+ def missing_players_for_a_match(team1: str, team2: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
63
+ """
64
+ "Returns missing players for a match"
65
+ team1: Home team
66
+ team2: Away team
67
+
68
+ """
69
+ url = f"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/missing"
70
+ querystring = {'team1': team1, 'team2': team2, }
71
+
72
+ headers = {
73
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
74
+ "X-RapidAPI-Host": "heisenbug-liga-nos-live-scores-v1.p.rapidapi.com"
75
+ }
76
+
77
+
78
+ response = requests.get(url, headers=headers, params=querystring)
79
+ try:
80
+ observation = response.json()
81
+ except:
82
+ observation = response.text
83
+ return observation
84
+
85
+ def match_events(team1: str, team2: str, live: bool=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
86
+ """
87
+ "Returns the events for a match (yellow and red cards, substitutions, shots on post and formations module)"
88
+ team1: Home team
89
+ team2: Away team
90
+ live: Returns data for a playing match (default false)
91
+
92
+ """
93
+ url = f"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/events"
94
+ querystring = {'team1': team1, 'team2': team2, }
95
+ if live:
96
+ querystring['live'] = live
97
+
98
+ headers = {
99
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
100
+ "X-RapidAPI-Host": "heisenbug-liga-nos-live-scores-v1.p.rapidapi.com"
101
+ }
102
+
103
+
104
+ response = requests.get(url, headers=headers, params=querystring)
105
+ try:
106
+ observation = response.json()
107
+ except:
108
+ observation = response.text
109
+ return observation
110
+
111
+ def top_scorers(how: str=None, page: int=None, is_from: int=None, mode: str=None, player: str=None, team: str=None, to: int=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
112
+ """
113
+ "Returns top scorers for the league"
114
+ how: Return only goals scored according the how parameter. Its value can be: left, right, head or any, that is the default.
115
+ page: Page result to return. Default is 1 that are results from 1 to 5 (max. value is 20).
116
+ is_from: Optional parameter to specify the first match number to use to compute the result (default 1)
117
+ mode: Optional parameter to restrict the table compute on home or away games (default all)
118
+ player: Optional parameter to get goals number only for the player name specified
119
+ team: Team name
120
+ to: Optional parameter to specify the last match number to consider to compute the result (default last match number played registered on system)
121
+
122
+ """
123
+ url = f"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/table/scorers"
124
+ querystring = {}
125
+ if how:
126
+ querystring['how'] = how
127
+ if page:
128
+ querystring['page'] = page
129
+ if is_from:
130
+ querystring['from'] = is_from
131
+ if mode:
132
+ querystring['mode'] = mode
133
+ if player:
134
+ querystring['player'] = player
135
+ if team:
136
+ querystring['team'] = team
137
+ if to:
138
+ querystring['to'] = to
139
+
140
+ headers = {
141
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
142
+ "X-RapidAPI-Host": "heisenbug-liga-nos-live-scores-v1.p.rapidapi.com"
143
+ }
144
+
145
+
146
+ response = requests.get(url, headers=headers, params=querystring)
147
+ try:
148
+ observation = response.json()
149
+ except:
150
+ observation = response.text
151
+ return observation
152
+
153
+ def match_scorers(team1: str, team2: str, live: bool=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
154
+ """
155
+ "Returns who scored and how for a match"
156
+ team1: Home team
157
+ team2: Away team
158
+ live: Returns data for a playing match (default false)
159
+
160
+ """
161
+ url = f"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/scorers"
162
+ querystring = {'team1': team1, 'team2': team2, }
163
+ if live:
164
+ querystring['live'] = live
165
+
166
+ headers = {
167
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
168
+ "X-RapidAPI-Host": "heisenbug-liga-nos-live-scores-v1.p.rapidapi.com"
169
+ }
170
+
171
+
172
+ response = requests.get(url, headers=headers, params=querystring)
173
+ try:
174
+ observation = response.json()
175
+ except:
176
+ observation = response.text
177
+ return observation
178
+
179
+ def lineups_and_substitutes_for_a_game(team1: str, team2: str, live: bool=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
180
+ """
181
+ "Returns lineups, substitutes and coaches for a game after a while the game is finished."
182
+ team1: Home team
183
+ team2: Away team
184
+ live: Returns data for a playing match (default false)
185
+
186
+ """
187
+ url = f"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/formations"
188
+ querystring = {'team1': team1, 'team2': team2, }
189
+ if live:
190
+ querystring['live'] = live
191
+
192
+ headers = {
193
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
194
+ "X-RapidAPI-Host": "heisenbug-liga-nos-live-scores-v1.p.rapidapi.com"
195
+ }
196
+
197
+
198
+ response = requests.get(url, headers=headers, params=querystring)
199
+ try:
200
+ observation = response.json()
201
+ except:
202
+ observation = response.text
203
+ return observation
204
+
205
+ def match_statistics(team1: str, team2: str, live: bool=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
206
+ """
207
+ "Returns match statistics"
208
+ team1: Home team
209
+ team2: Away team
210
+ live: Returns data for a playing match (default false)
211
+
212
+ """
213
+ url = f"https://heisenbug-liga-nos-live-scores-v1.p.rapidapi.com/api/liganos/match/stats"
214
+ querystring = {'team1': team1, 'team2': team2, }
215
+ if live:
216
+ querystring['live'] = live
217
+
218
+ headers = {
219
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
220
+ "X-RapidAPI-Host": "heisenbug-liga-nos-live-scores-v1.p.rapidapi.com"
221
+ }
222
+
223
+
224
+ response = requests.get(url, headers=headers, params=querystring)
225
+ try:
226
+ observation = response.json()
227
+ except:
228
+ observation = response.text
229
+ return observation
230
+
toolbench/toolenv/tools/Sports/ligue_1_live_scores.json ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name": "Ligue 1 Live Scores",
3
+ "tool_description": "The Ligue1 Live Scores API allows to retrieve historical data as well as current season results, scorers, lineups, substitutes, events, statistics and much more all with live updates, for the top professional French football league. And more features are coming...",
4
+ "title": "Ligue 1 Live Scores",
5
+ "pricing": "FREEMIUM",
6
+ "score": null,
7
+ "home_url": "https://rapidapi.com/heisenbug/api/ligue-1-live-scores/",
8
+ "host": "heisenbug-ligue-1-live-scores-v1.p.rapidapi.com",
9
+ "api_list": [
10
+ {
11
+ "name": "Venue",
12
+ "url": "https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/venue",
13
+ "description": "Returns venue data",
14
+ "method": "GET",
15
+ "required_parameters": [
16
+ {
17
+ "name": "name",
18
+ "type": "STRING",
19
+ "description": "",
20
+ "default": ""
21
+ }
22
+ ],
23
+ "optional_parameters": [],
24
+ "code": "import requests\n\nurl = \"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/venue\"\nquerystring = {\"name\": name}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-ligue-1-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode": 111,
26
+ "body": "",
27
+ "headers": "",
28
+ "schema": ""
29
+ },
30
+ {
31
+ "name": "Team",
32
+ "url": "https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/team",
33
+ "description": "Returns info about the team",
34
+ "method": "GET",
35
+ "required_parameters": [
36
+ {
37
+ "name": "name",
38
+ "type": "STRING",
39
+ "description": "",
40
+ "default": ""
41
+ }
42
+ ],
43
+ "optional_parameters": [],
44
+ "code": "import requests\n\nurl = \"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/team\"\nquerystring = {\"name\": name}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-ligue-1-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
45
+ "statuscode": 111,
46
+ "body": "",
47
+ "headers": "",
48
+ "schema": ""
49
+ },
50
+ {
51
+ "name": "Activate webhook",
52
+ "url": "https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/activate",
53
+ "description": "Activate a webhook registered with the subscribe endpoint. Not available for BASIC plan.",
54
+ "method": "GET",
55
+ "required_parameters": [
56
+ {
57
+ "name": "token",
58
+ "type": "STRING",
59
+ "description": "Token",
60
+ "default": ""
61
+ }
62
+ ],
63
+ "optional_parameters": [],
64
+ "code": "import requests\n\nurl = \"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/activate\"\nquerystring = {\"token\": token}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-ligue-1-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
65
+ "statuscode": 111,
66
+ "body": "",
67
+ "headers": "",
68
+ "schema": ""
69
+ },
70
+ {
71
+ "name": "Events subscribed",
72
+ "url": "https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/list",
73
+ "description": "Returns all the events subscribed. Not available for BASIC plan.",
74
+ "method": "GET",
75
+ "required_parameters": [],
76
+ "optional_parameters": [],
77
+ "code": "import requests\n\nurl = \"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/list\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-ligue-1-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
78
+ "statuscode": 111,
79
+ "body": "",
80
+ "headers": "",
81
+ "schema": ""
82
+ },
83
+ {
84
+ "name": "Subscribe",
85
+ "url": "https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/subscribe",
86
+ "description": "Register to an event for push notifications. Not available for BASIC plan.",
87
+ "method": "POST",
88
+ "required_parameters": [],
89
+ "optional_parameters": [],
90
+ "code": "import requests\n\nurl = \"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/subscribe\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-ligue-1-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.post(url, headers=headers)\n\nprint(response.json())\n",
91
+ "statuscode": 111,
92
+ "body": "",
93
+ "headers": "",
94
+ "schema": ""
95
+ },
96
+ {
97
+ "name": "Player details",
98
+ "url": "https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/playerdetails",
99
+ "description": "Returns all data about a player. Available only with ULTRA and MEGA plans!",
100
+ "method": "GET",
101
+ "required_parameters": [
102
+ {
103
+ "name": "player",
104
+ "type": "STRING",
105
+ "description": "Player name",
106
+ "default": ""
107
+ },
108
+ {
109
+ "name": "team",
110
+ "type": "STRING",
111
+ "description": "Team name",
112
+ "default": ""
113
+ }
114
+ ],
115
+ "optional_parameters": [
116
+ {
117
+ "name": "honours",
118
+ "type": "BOOLEAN",
119
+ "description": "Return only the honours for the player (default false)",
120
+ "default": ""
121
+ }
122
+ ],
123
+ "code": "import requests\n\nurl = \"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/playerdetails\"\nquerystring = {\"player\": player, \"team\": team}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-ligue-1-live-scores-v1.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
124
+ "statuscode": 111,
125
+ "body": "",
126
+ "headers": "",
127
+ "schema": ""
128
+ },
129
+ {
130
+ "name": "Subscribe",
131
+ "url": "https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/subscribe",
132
+ "description": "Register to an event for push notifications. Not available for BASIC plan.",
133
+ "method": "POST",
134
+ "required_parameters": [],
135
+ "optional_parameters": [],
136
+ "code": "import requests\n\nurl = \"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/subscribe\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-ligue-1-live-scores-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
137
+ "convert_code": "import requests\n\nurl = \"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/subscribe\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"heisenbug-ligue-1-live-scores-v1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
138
+ "test_endpoint": ""
139
+ }
140
+ ]
141
+ }
toolbench/toolenv/tools/Sports/ligue_1_live_scores/api.py ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def venue(name: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Returns venue data"
12
+
13
+ """
14
+ url = f"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/venue"
15
+ querystring = {'name': name, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "heisenbug-ligue-1-live-scores-v1.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def team(name: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Returns info about the team"
33
+
34
+ """
35
+ url = f"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/team"
36
+ querystring = {'name': name, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "heisenbug-ligue-1-live-scores-v1.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def activate_webhook(token: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "Activate a webhook registered with the subscribe endpoint. Not available for BASIC plan."
54
+ token: Token
55
+
56
+ """
57
+ url = f"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/activate"
58
+ querystring = {'token': token, }
59
+
60
+ headers = {
61
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
62
+ "X-RapidAPI-Host": "heisenbug-ligue-1-live-scores-v1.p.rapidapi.com"
63
+ }
64
+
65
+
66
+ response = requests.get(url, headers=headers, params=querystring)
67
+ try:
68
+ observation = response.json()
69
+ except:
70
+ observation = response.text
71
+ return observation
72
+
73
+ def events_subscribed(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
74
+ """
75
+ "Returns all the events subscribed. Not available for BASIC plan."
76
+
77
+ """
78
+ url = f"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/push/list"
79
+ querystring = {}
80
+
81
+ headers = {
82
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
83
+ "X-RapidAPI-Host": "heisenbug-ligue-1-live-scores-v1.p.rapidapi.com"
84
+ }
85
+
86
+
87
+ response = requests.get(url, headers=headers, params=querystring)
88
+ try:
89
+ observation = response.json()
90
+ except:
91
+ observation = response.text
92
+ return observation
93
+
94
+ def player_details(player: str, team: str, honours: bool=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
95
+ """
96
+ "Returns all data about a player. Available only with ULTRA and MEGA plans!"
97
+ player: Player name
98
+ team: Team name
99
+ honours: Return only the honours for the player (default false)
100
+
101
+ """
102
+ url = f"https://heisenbug-ligue-1-live-scores-v1.p.rapidapi.com/api/ligue1/playerdetails"
103
+ querystring = {'player': player, 'team': team, }
104
+ if honours:
105
+ querystring['honours'] = honours
106
+
107
+ headers = {
108
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
109
+ "X-RapidAPI-Host": "heisenbug-ligue-1-live-scores-v1.p.rapidapi.com"
110
+ }
111
+
112
+
113
+ response = requests.get(url, headers=headers, params=querystring)
114
+ try:
115
+ observation = response.json()
116
+ except:
117
+ observation = response.text
118
+ return observation
119
+
toolbench/toolenv/tools/Sports/ligue_1_standings.json ADDED
@@ -0,0 +1,409 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Ligue 1 Standings",
3
+ "tool_description":"French Ligue 1 Standings & Table",
4
+ "title":"Ligue 1 Standings",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":662,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":8.6,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/UnlimitedAPI/api/ligue-1-standings/",
14
+ "host":"ligue-1-standings.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Ligue 1 Standings",
18
+ "url":"https://ligue-1-standings.p.rapidapi.com/",
19
+ "description":"Ligue 1 Standings",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[
23
+ {
24
+ "name":"season",
25
+ "type":"STRING",
26
+ "description":"e.g. `2022`\ne.g. `2021`",
27
+ "default":""
28
+ }
29
+ ],
30
+ "code":"import requests\n\nurl = \"https://ligue-1-standings.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"ligue-1-standings.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":[
33
+ {
34
+ "team":{
35
+ "name":"Paris Saint-Germain ",
36
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/160.png",
37
+ "abbreviation":"PSG"
38
+ },
39
+ "stats":{
40
+ "wins":26,
41
+ "losses":4,
42
+ "ties":8,
43
+ "gamesPlayed":38,
44
+ "goalsFor":90,
45
+ "goalsAgainst":36,
46
+ "points":86,
47
+ "rank":1,
48
+ "goalDifference":54
49
+ }
50
+ },
51
+ {
52
+ "team":{
53
+ "name":"Marseille",
54
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/176.png",
55
+ "abbreviation":"MAR"
56
+ },
57
+ "stats":{
58
+ "wins":21,
59
+ "losses":9,
60
+ "ties":8,
61
+ "gamesPlayed":38,
62
+ "goalsFor":63,
63
+ "goalsAgainst":38,
64
+ "points":71,
65
+ "rank":2,
66
+ "goalDifference":25
67
+ }
68
+ },
69
+ {
70
+ "team":{
71
+ "name":"AS Monaco",
72
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/174.png",
73
+ "abbreviation":"MON"
74
+ },
75
+ "stats":{
76
+ "wins":20,
77
+ "losses":9,
78
+ "ties":9,
79
+ "gamesPlayed":38,
80
+ "goalsFor":65,
81
+ "goalsAgainst":40,
82
+ "points":69,
83
+ "rank":3,
84
+ "goalDifference":25
85
+ }
86
+ },
87
+ {
88
+ "team":{
89
+ "name":"Stade Rennais",
90
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/169.png",
91
+ "abbreviation":"REN"
92
+ },
93
+ "stats":{
94
+ "wins":20,
95
+ "losses":12,
96
+ "ties":6,
97
+ "gamesPlayed":38,
98
+ "goalsFor":82,
99
+ "goalsAgainst":40,
100
+ "points":66,
101
+ "rank":4,
102
+ "goalDifference":42
103
+ }
104
+ },
105
+ {
106
+ "team":{
107
+ "name":"Nice",
108
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/2502.png",
109
+ "abbreviation":"NICE"
110
+ },
111
+ "stats":{
112
+ "wins":20,
113
+ "losses":11,
114
+ "ties":7,
115
+ "gamesPlayed":38,
116
+ "goalsFor":52,
117
+ "goalsAgainst":36,
118
+ "points":66,
119
+ "rank":5,
120
+ "goalDifference":16
121
+ }
122
+ },
123
+ {
124
+ "team":{
125
+ "name":"Strasbourg",
126
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/180.png",
127
+ "abbreviation":"STRA"
128
+ },
129
+ "stats":{
130
+ "wins":17,
131
+ "losses":9,
132
+ "ties":12,
133
+ "gamesPlayed":38,
134
+ "goalsFor":60,
135
+ "goalsAgainst":43,
136
+ "points":63,
137
+ "rank":6,
138
+ "goalDifference":17
139
+ }
140
+ },
141
+ {
142
+ "team":{
143
+ "name":"Lens",
144
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/175.png",
145
+ "abbreviation":"RCL"
146
+ },
147
+ "stats":{
148
+ "wins":17,
149
+ "losses":10,
150
+ "ties":11,
151
+ "gamesPlayed":38,
152
+ "goalsFor":62,
153
+ "goalsAgainst":48,
154
+ "points":62,
155
+ "rank":7,
156
+ "goalDifference":14
157
+ }
158
+ },
159
+ {
160
+ "team":{
161
+ "name":"Lyon",
162
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/167.png",
163
+ "abbreviation":"LYON"
164
+ },
165
+ "stats":{
166
+ "wins":17,
167
+ "losses":10,
168
+ "ties":11,
169
+ "gamesPlayed":38,
170
+ "goalsFor":66,
171
+ "goalsAgainst":51,
172
+ "points":61,
173
+ "rank":8,
174
+ "goalDifference":15
175
+ }
176
+ },
177
+ {
178
+ "team":{
179
+ "name":"Nantes",
180
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/165.png",
181
+ "abbreviation":"NANT"
182
+ },
183
+ "stats":{
184
+ "wins":15,
185
+ "losses":13,
186
+ "ties":10,
187
+ "gamesPlayed":38,
188
+ "goalsFor":55,
189
+ "goalsAgainst":48,
190
+ "points":55,
191
+ "rank":9,
192
+ "goalDifference":7
193
+ }
194
+ },
195
+ {
196
+ "team":{
197
+ "name":"Lille",
198
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/166.png",
199
+ "abbreviation":"LILL"
200
+ },
201
+ "stats":{
202
+ "wins":14,
203
+ "losses":11,
204
+ "ties":13,
205
+ "gamesPlayed":38,
206
+ "goalsFor":48,
207
+ "goalsAgainst":48,
208
+ "points":55,
209
+ "rank":10,
210
+ "goalDifference":0
211
+ }
212
+ },
213
+ {
214
+ "team":{
215
+ "name":"Brest",
216
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/6997.png",
217
+ "abbreviation":"BRES"
218
+ },
219
+ "stats":{
220
+ "wins":13,
221
+ "losses":16,
222
+ "ties":9,
223
+ "gamesPlayed":38,
224
+ "goalsFor":49,
225
+ "goalsAgainst":57,
226
+ "points":48,
227
+ "rank":11,
228
+ "goalDifference":-8
229
+ }
230
+ },
231
+ {
232
+ "team":{
233
+ "name":"Stade de Reims",
234
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/3243.png",
235
+ "abbreviation":"REIM"
236
+ },
237
+ "stats":{
238
+ "wins":11,
239
+ "losses":14,
240
+ "ties":13,
241
+ "gamesPlayed":38,
242
+ "goalsFor":43,
243
+ "goalsAgainst":44,
244
+ "points":46,
245
+ "rank":12,
246
+ "goalDifference":-1
247
+ }
248
+ },
249
+ {
250
+ "team":{
251
+ "name":"Montpellier",
252
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/274.png",
253
+ "abbreviation":"MONT"
254
+ },
255
+ "stats":{
256
+ "wins":12,
257
+ "losses":19,
258
+ "ties":7,
259
+ "gamesPlayed":38,
260
+ "goalsFor":49,
261
+ "goalsAgainst":61,
262
+ "points":43,
263
+ "rank":13,
264
+ "goalDifference":-12
265
+ }
266
+ },
267
+ {
268
+ "team":{
269
+ "name":"Angers",
270
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/7868.png",
271
+ "abbreviation":"ANG"
272
+ },
273
+ "stats":{
274
+ "wins":10,
275
+ "losses":17,
276
+ "ties":11,
277
+ "gamesPlayed":38,
278
+ "goalsFor":44,
279
+ "goalsAgainst":55,
280
+ "points":41,
281
+ "rank":14,
282
+ "goalDifference":-11
283
+ }
284
+ },
285
+ {
286
+ "team":{
287
+ "name":"Troyes",
288
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/170.png",
289
+ "abbreviation":"TRY"
290
+ },
291
+ "stats":{
292
+ "wins":9,
293
+ "losses":18,
294
+ "ties":11,
295
+ "gamesPlayed":38,
296
+ "goalsFor":37,
297
+ "goalsAgainst":53,
298
+ "points":38,
299
+ "rank":15,
300
+ "goalDifference":-16
301
+ }
302
+ },
303
+ {
304
+ "team":{
305
+ "name":"Lorient",
306
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/273.png",
307
+ "abbreviation":"LOR"
308
+ },
309
+ "stats":{
310
+ "wins":8,
311
+ "losses":18,
312
+ "ties":12,
313
+ "gamesPlayed":38,
314
+ "goalsFor":35,
315
+ "goalsAgainst":63,
316
+ "points":36,
317
+ "rank":16,
318
+ "goalDifference":-28
319
+ }
320
+ },
321
+ {
322
+ "team":{
323
+ "name":"Clermont Foot",
324
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/3171.png",
325
+ "abbreviation":"CLER"
326
+ },
327
+ "stats":{
328
+ "wins":9,
329
+ "losses":20,
330
+ "ties":9,
331
+ "gamesPlayed":38,
332
+ "goalsFor":38,
333
+ "goalsAgainst":69,
334
+ "points":36,
335
+ "rank":17,
336
+ "goalDifference":-31
337
+ }
338
+ },
339
+ {
340
+ "team":{
341
+ "name":"Saint-Etienne",
342
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/178.png",
343
+ "abbreviation":"ASSE"
344
+ },
345
+ "stats":{
346
+ "wins":7,
347
+ "losses":20,
348
+ "ties":11,
349
+ "gamesPlayed":38,
350
+ "goalsFor":42,
351
+ "goalsAgainst":77,
352
+ "points":32,
353
+ "rank":18,
354
+ "goalDifference":-35
355
+ }
356
+ },
357
+ {
358
+ "team":{
359
+ "name":"Metz",
360
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/177.png",
361
+ "abbreviation":"METZ"
362
+ },
363
+ "stats":{
364
+ "wins":6,
365
+ "losses":19,
366
+ "ties":13,
367
+ "gamesPlayed":38,
368
+ "goalsFor":35,
369
+ "goalsAgainst":69,
370
+ "points":31,
371
+ "rank":19,
372
+ "goalDifference":-34
373
+ }
374
+ },
375
+ {
376
+ "team":{
377
+ "name":"Bordeaux",
378
+ "logo":"https://a.espncdn.com/i/teamlogos/soccer/500/159.png",
379
+ "abbreviation":"BOR"
380
+ },
381
+ "stats":{
382
+ "wins":6,
383
+ "losses":19,
384
+ "ties":13,
385
+ "gamesPlayed":38,
386
+ "goalsFor":52,
387
+ "goalsAgainst":91,
388
+ "points":31,
389
+ "rank":20,
390
+ "goalDifference":-39
391
+ }
392
+ }
393
+ ],
394
+ "headers":{
395
+ "access-control-allow-credentials":"true",
396
+ "access-control-allow-origin":"*",
397
+ "connection":"keep-alive",
398
+ "content-length":"5047",
399
+ "content-type":"application/json",
400
+ "date":"Fri, 08 Jul 2022 21:20:44 GMT",
401
+ "server":"RapidAPI-1.2.8",
402
+ "via":"1.1 vegur",
403
+ "x-rapidapi-region":"AWS - eu-central-1",
404
+ "x-rapidapi-version":"1.2.8"
405
+ },
406
+ "schema":{}
407
+ }
408
+ ]
409
+ }
toolbench/toolenv/tools/Sports/ligue_1_standings/api.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def ligue_1_standings(season: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Ligue 1 Standings"
12
+ season: e.g. `2022`
13
+ e.g. `2021`
14
+
15
+ """
16
+ url = f"https://ligue-1-standings.p.rapidapi.com/"
17
+ querystring = {}
18
+ if season:
19
+ querystring['season'] = season
20
+
21
+ headers = {
22
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
23
+ "X-RapidAPI-Host": "ligue-1-standings.p.rapidapi.com"
24
+ }
25
+
26
+
27
+ response = requests.get(url, headers=headers, params=querystring)
28
+ try:
29
+ observation = response.json()
30
+ except:
31
+ observation = response.text
32
+ return observation
33
+
toolbench/toolenv/tools/Sports/live_cricket_score/api.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def match_details(matchid: str, seriesid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Full match live scorecard for batsmen and bowlers along with both teams scorecards for all innings."
12
+
13
+ """
14
+ url = f"https://live-cricket-score2.p.rapidapi.com/live-status/{matchid}/{seriesid}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "live-cricket-score2.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def get_latest_matches(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "This end point gives latest information for all matches (live or scheduled) with `matchID` and `seriesID`."
33
+
34
+ """
35
+ url = f"https://live-cricket-score2.p.rapidapi.com/latest-matches"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "live-cricket-score2.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
toolbench/toolenv/tools/Sports/live_cricket_score_and_fantasy.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Live Cricket Score and Fantasy",
3
+ "tool_description":"*** No Comments, Because my service proved.",
4
+ "title":"Live Cricket Score and Fantasy",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":0,
8
+ "avgLatency":71,
9
+ "avgSuccessRate":0,
10
+ "popularityScore":0,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/bkweb11-9XNVsKZE2S/api/live-cricket-score-and-fantasy/",
14
+ "host":"live-cricket-score-and-fantasy.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Current & Future matches",
18
+ "url":"https://live-cricket-score-and-fantasy.p.rapidapi.com/matches",
19
+ "description":"Get Current & Future match list",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[
23
+ {
24
+ "name":"match_id",
25
+ "type":"NUMBER",
26
+ "description":"",
27
+ "default":"31"
28
+ }
29
+ ],
30
+ "code":"import requests\n\nurl = \"https://live-cricket-score-and-fantasy.p.rapidapi.com/matches\"\nquerystring = {\"match_id\": match_id}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-cricket-score-and-fantasy.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ },
36
+ {
37
+ "name":"Live Score Commentary",
38
+ "url":"https://live-cricket-score-and-fantasy.p.rapidapi.com/commentary",
39
+ "description":"Get Live score by match id.",
40
+ "method":"GET",
41
+ "required_parameters":[
42
+ {
43
+ "name":"match_id",
44
+ "type":"NUMBER",
45
+ "description":"",
46
+ "default":"31"
47
+ }
48
+ ],
49
+ "optional_parameters":[],
50
+ "code":"import requests\n\nurl = \"https://live-cricket-score-and-fantasy.p.rapidapi.com/commentary\"\nquerystring = {\"match_id\": match_id}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-cricket-score-and-fantasy.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
51
+ "statuscode":111,
52
+ "body":"",
53
+ "headers":"",
54
+ "schema":""
55
+ },
56
+ {
57
+ "name":"Live Match Score Table",
58
+ "url":"https://live-cricket-score-and-fantasy.p.rapidapi.com/score",
59
+ "description":"Get score by match id",
60
+ "method":"GET",
61
+ "required_parameters":[
62
+ {
63
+ "name":"match_id",
64
+ "type":"NUMBER",
65
+ "description":"",
66
+ "default":"31"
67
+ }
68
+ ],
69
+ "optional_parameters":[],
70
+ "code":"import requests\n\nurl = \"https://live-cricket-score-and-fantasy.p.rapidapi.com/score\"\nquerystring = {\"match_id\": match_id}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-cricket-score-and-fantasy.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
71
+ "statuscode":111,
72
+ "body":"",
73
+ "headers":"",
74
+ "schema":""
75
+ }
76
+ ]
77
+ }
toolbench/toolenv/tools/Sports/live_cricket_score_and_fantasy/api.py ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def current_future_matches(match_id: int=31, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get Current & Future match list"
12
+
13
+ """
14
+ url = f"https://live-cricket-score-and-fantasy.p.rapidapi.com/matches"
15
+ querystring = {}
16
+ if match_id:
17
+ querystring['match_id'] = match_id
18
+
19
+ headers = {
20
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
21
+ "X-RapidAPI-Host": "live-cricket-score-and-fantasy.p.rapidapi.com"
22
+ }
23
+
24
+
25
+ response = requests.get(url, headers=headers, params=querystring)
26
+ try:
27
+ observation = response.json()
28
+ except:
29
+ observation = response.text
30
+ return observation
31
+
32
+ def live_score_commentary(match_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
33
+ """
34
+ "Get Live score by match id."
35
+
36
+ """
37
+ url = f"https://live-cricket-score-and-fantasy.p.rapidapi.com/commentary"
38
+ querystring = {'match_id': match_id, }
39
+
40
+ headers = {
41
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
42
+ "X-RapidAPI-Host": "live-cricket-score-and-fantasy.p.rapidapi.com"
43
+ }
44
+
45
+
46
+ response = requests.get(url, headers=headers, params=querystring)
47
+ try:
48
+ observation = response.json()
49
+ except:
50
+ observation = response.text
51
+ return observation
52
+
53
+ def live_match_score_table(match_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
54
+ """
55
+ "Get score by match id"
56
+
57
+ """
58
+ url = f"https://live-cricket-score-and-fantasy.p.rapidapi.com/score"
59
+ querystring = {'match_id': match_id, }
60
+
61
+ headers = {
62
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
63
+ "X-RapidAPI-Host": "live-cricket-score-and-fantasy.p.rapidapi.com"
64
+ }
65
+
66
+
67
+ response = requests.get(url, headers=headers, params=querystring)
68
+ try:
69
+ observation = response.json()
70
+ except:
71
+ observation = response.text
72
+ return observation
73
+
toolbench/toolenv/tools/Sports/live_football_score/api.py ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def teams_teamid(teamid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ ""
12
+
13
+ """
14
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/teams/{teamid}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def players_playerid(playerid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ ""
33
+
34
+ """
35
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/players/{playerid}"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def tournaments(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ ""
54
+
55
+ """
56
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/tournaments/"
57
+ querystring = {}
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def tournaments_tournamentid(tournamentid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ ""
75
+
76
+ """
77
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/tournaments/{tournamentid}"
78
+ querystring = {}
79
+
80
+ headers = {
81
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
82
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
83
+ }
84
+
85
+
86
+ response = requests.get(url, headers=headers, params=querystring)
87
+ try:
88
+ observation = response.json()
89
+ except:
90
+ observation = response.text
91
+ return observation
92
+
93
+ def tournaments_tournamentid_seasons(tournamentid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
94
+ """
95
+ ""
96
+
97
+ """
98
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/tournaments/{tournamentid}/seasons/"
99
+ querystring = {}
100
+
101
+ headers = {
102
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
103
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
104
+ }
105
+
106
+
107
+ response = requests.get(url, headers=headers, params=querystring)
108
+ try:
109
+ observation = response.json()
110
+ except:
111
+ observation = response.text
112
+ return observation
113
+
114
+ def tournaments_tournamentid_seasons_seasonid(seasonid: str, tournamentid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
115
+ """
116
+ ""
117
+
118
+ """
119
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/tournaments/{tournamentid}/seasons/{seasonid}"
120
+ querystring = {}
121
+
122
+ headers = {
123
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
124
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
125
+ }
126
+
127
+
128
+ response = requests.get(url, headers=headers, params=querystring)
129
+ try:
130
+ observation = response.json()
131
+ except:
132
+ observation = response.text
133
+ return observation
134
+
135
+ def tournaments_tournamentid_seasons_seasonid_stages(tournamentid: str, seasonid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
136
+ """
137
+ ""
138
+
139
+ """
140
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/tournaments/{tournamentid}/seasons/{seasonid}/stages/"
141
+ querystring = {}
142
+
143
+ headers = {
144
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
145
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
146
+ }
147
+
148
+
149
+ response = requests.get(url, headers=headers, params=querystring)
150
+ try:
151
+ observation = response.json()
152
+ except:
153
+ observation = response.text
154
+ return observation
155
+
156
+ def tournaments_tournamentid_seasons_seasonid_stages_stageid(tournamentid: str, seasonid: str, stageid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
157
+ """
158
+ ""
159
+
160
+ """
161
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/tournaments/{tournamentid}/seasons/{seasonid}/stages/{stageid}"
162
+ querystring = {}
163
+
164
+ headers = {
165
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
166
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
167
+ }
168
+
169
+
170
+ response = requests.get(url, headers=headers, params=querystring)
171
+ try:
172
+ observation = response.json()
173
+ except:
174
+ observation = response.text
175
+ return observation
176
+
177
+ def tournaments_tournamentid_seasons_seasonid_stages_stageid_matches_page(seasonid: str, stageid: str, tournamentid: str, page: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
178
+ """
179
+ ""
180
+
181
+ """
182
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/tournaments/{tournamentid}/seasons/{seasonid}/stages/{stageid}/matches/{page}/"
183
+ querystring = {}
184
+
185
+ headers = {
186
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
187
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
188
+ }
189
+
190
+
191
+ response = requests.get(url, headers=headers, params=querystring)
192
+ try:
193
+ observation = response.json()
194
+ except:
195
+ observation = response.text
196
+ return observation
197
+
198
+ def territories_territoryid(territoryid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
199
+ """
200
+ ""
201
+
202
+ """
203
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/territories/{territoryid}"
204
+ querystring = {}
205
+
206
+ headers = {
207
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
208
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
209
+ }
210
+
211
+
212
+ response = requests.get(url, headers=headers, params=querystring)
213
+ try:
214
+ observation = response.json()
215
+ except:
216
+ observation = response.text
217
+ return observation
218
+
219
+ def tournaments_tournamentid_seasons_seasonid_matches_matchid(tournamentid: str, seasonid: str, matchid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
220
+ """
221
+ ""
222
+
223
+ """
224
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/tournaments/{tournamentid}/seasons/{seasonid}/matches/{matchid}"
225
+ querystring = {}
226
+
227
+ headers = {
228
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
229
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
230
+ }
231
+
232
+
233
+ response = requests.get(url, headers=headers, params=querystring)
234
+ try:
235
+ observation = response.json()
236
+ except:
237
+ observation = response.text
238
+ return observation
239
+
240
+ def matches_today(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
241
+ """
242
+ ""
243
+
244
+ """
245
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/matches/today/"
246
+ querystring = {}
247
+
248
+ headers = {
249
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
250
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
251
+ }
252
+
253
+
254
+ response = requests.get(url, headers=headers, params=querystring)
255
+ try:
256
+ observation = response.json()
257
+ except:
258
+ observation = response.text
259
+ return observation
260
+
261
+ def matches_now(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
262
+ """
263
+ ""
264
+
265
+ """
266
+ url = f"https://11bits-football-data-v1.p.rapidapi.com/matches/now/"
267
+ querystring = {}
268
+
269
+ headers = {
270
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
271
+ "X-RapidAPI-Host": "11bits-football-data-v1.p.rapidapi.com"
272
+ }
273
+
274
+
275
+ response = requests.get(url, headers=headers, params=querystring)
276
+ try:
277
+ observation = response.json()
278
+ except:
279
+ observation = response.text
280
+ return observation
281
+
toolbench/toolenv/tools/Sports/live_golf_data.json ADDED
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Live Golf Data",
3
+ "tool_description":"PGA Tour and LIV Tour live golf data for your application needs such as rankings, leaderboards, scorecards, and results.",
4
+ "title":"Live Golf Data",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":136,
9
+ "avgSuccessRate":88,
10
+ "popularityScore":9.8,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/slashgolf/api/live-golf-data/",
14
+ "host":"live-golf-data.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"World Ranking",
18
+ "url":"https://live-golf-data.p.rapidapi.com/stats",
19
+ "description":"Fetch the world rankings for a given year",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"year",
24
+ "type":"STRING",
25
+ "description":"",
26
+ "default":"2022"
27
+ },
28
+ {
29
+ "name":"statId",
30
+ "type":"STRING",
31
+ "description":"",
32
+ "default":"186"
33
+ }
34
+ ],
35
+ "optional_parameters":[],
36
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/stats\"\nquerystring = {\"year\": year, \"statId\": statid}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
37
+ "statuscode":200,
38
+ "body":{
39
+ "key1":"value",
40
+ "key2":"value"
41
+ },
42
+ "headers":{},
43
+ "schema":{}
44
+ },
45
+ {
46
+ "name":"earnings",
47
+ "url":"https://live-golf-data.p.rapidapi.com/earnings",
48
+ "description":"Fetch the player earnings for a given `tournId` and `year`.",
49
+ "method":"GET",
50
+ "required_parameters":[
51
+ {
52
+ "name":"year",
53
+ "type":"STRING",
54
+ "description":"",
55
+ "default":"2022"
56
+ },
57
+ {
58
+ "name":"tournId",
59
+ "type":"STRING",
60
+ "description":"",
61
+ "default":"475"
62
+ }
63
+ ],
64
+ "optional_parameters":[],
65
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/earnings\"\nquerystring = {\"year\": year, \"tournId\": tournid}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
66
+ "statuscode":200,
67
+ "body":{
68
+ "key1":"value",
69
+ "key2":"value"
70
+ },
71
+ "headers":{},
72
+ "schema":{}
73
+ },
74
+ {
75
+ "name":"points",
76
+ "url":"https://live-golf-data.p.rapidapi.com/points",
77
+ "description":"Fetch official FedExCup points earned per player for a given `tournId` and `year`. Note that PGA Tour non-members will not be officially ranked.",
78
+ "method":"GET",
79
+ "required_parameters":[
80
+ {
81
+ "name":"tournId",
82
+ "type":"STRING",
83
+ "description":"",
84
+ "default":"475"
85
+ },
86
+ {
87
+ "name":"year",
88
+ "type":"STRING",
89
+ "description":"",
90
+ "default":"2022"
91
+ }
92
+ ],
93
+ "optional_parameters":[],
94
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/points\"\nquerystring = {\"tournId\": tournid, \"year\": year}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
95
+ "statuscode":200,
96
+ "body":{
97
+ "key1":"value",
98
+ "key2":"value"
99
+ },
100
+ "headers":{},
101
+ "schema":{}
102
+ },
103
+ {
104
+ "name":"tournaments",
105
+ "url":"https://live-golf-data.p.rapidapi.com/tournament",
106
+ "description":"Fetch tournament information, such as metadata, players, courses, and earnings. Query the `schedule` endpoint to retrieve the necessary `tournId` and `year` parameters. This info will be updated with a players entry list the Friday before the tournament.",
107
+ "method":"GET",
108
+ "required_parameters":[
109
+ {
110
+ "name":"orgId",
111
+ "type":"ENUM",
112
+ "description":"Choose 1 for PGA Tour or 2 for LIV Tour.",
113
+ "default":""
114
+ },
115
+ {
116
+ "name":"tournId",
117
+ "type":"STRING",
118
+ "description":"",
119
+ "default":"475"
120
+ },
121
+ {
122
+ "name":"year",
123
+ "type":"STRING",
124
+ "description":"",
125
+ "default":"2022"
126
+ }
127
+ ],
128
+ "optional_parameters":[],
129
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/tournament\"\nquerystring = {\"orgId\": orgid, \"tournId\": tournid, \"year\": year}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
130
+ "statuscode":200,
131
+ "body":{
132
+ "key1":"value",
133
+ "key2":"value"
134
+ },
135
+ "headers":{},
136
+ "schema":{}
137
+ },
138
+ {
139
+ "name":"players",
140
+ "url":"https://live-golf-data.p.rapidapi.com/players",
141
+ "description":"Fetch a PGA Tour player by his last name, first name, playerId, or a combination of these parameters.\n\nYou must provide at least one search parameter to the API.",
142
+ "method":"GET",
143
+ "required_parameters":[],
144
+ "optional_parameters":[
145
+ {
146
+ "name":"lastName",
147
+ "type":"STRING",
148
+ "description":"",
149
+ "default":"Morikawa"
150
+ },
151
+ {
152
+ "name":"playerId",
153
+ "type":"STRING",
154
+ "description":"",
155
+ "default":"50525"
156
+ },
157
+ {
158
+ "name":"firstName",
159
+ "type":"STRING",
160
+ "description":"",
161
+ "default":"Collin"
162
+ }
163
+ ],
164
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/players\"\nquerystring = {\"lastName\": lastname, \"playerId\": playerid, \"firstName\": firstname}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
165
+ "statuscode":200,
166
+ "body":{
167
+ "key1":"value",
168
+ "key2":"value"
169
+ },
170
+ "headers":{},
171
+ "schema":{}
172
+ },
173
+ {
174
+ "name":"schedules",
175
+ "url":"https://live-golf-data.p.rapidapi.com/schedule",
176
+ "description":"Fetch the schedule for the desired year and organization.",
177
+ "method":"GET",
178
+ "required_parameters":[
179
+ {
180
+ "name":"orgId",
181
+ "type":"ENUM",
182
+ "description":"Choose 1 for PGA Tour or 2 for LIV Tour.",
183
+ "default":""
184
+ },
185
+ {
186
+ "name":"year",
187
+ "type":"STRING",
188
+ "description":"",
189
+ "default":"2022"
190
+ }
191
+ ],
192
+ "optional_parameters":[],
193
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/schedule\"\nquerystring = {\"orgId\": orgid, \"year\": year}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
194
+ "statuscode":200,
195
+ "body":{
196
+ "key1":"value",
197
+ "key2":"value"
198
+ },
199
+ "headers":{},
200
+ "schema":{}
201
+ },
202
+ {
203
+ "name":"organizations",
204
+ "url":"https://live-golf-data.p.rapidapi.com/organizations",
205
+ "description":"Fetch the organizations that are supported by this golf data API.",
206
+ "method":"GET",
207
+ "required_parameters":[],
208
+ "optional_parameters":[],
209
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/organizations\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
210
+ "statuscode":200,
211
+ "body":{
212
+ "key1":"value",
213
+ "key2":"value"
214
+ },
215
+ "headers":{},
216
+ "schema":{}
217
+ },
218
+ {
219
+ "name":"FedExCup Ranking",
220
+ "url":"https://live-golf-data.p.rapidapi.com/stats",
221
+ "description":"Fetch the FedExCup ranking leaderboard for a given year. These rankings are updated live during a tournament to show the player's projected ranking.",
222
+ "method":"GET",
223
+ "required_parameters":[
224
+ {
225
+ "name":"year",
226
+ "type":"STRING",
227
+ "description":"",
228
+ "default":"2022"
229
+ },
230
+ {
231
+ "name":"statId",
232
+ "type":"STRING",
233
+ "description":"",
234
+ "default":"02671"
235
+ }
236
+ ],
237
+ "optional_parameters":[],
238
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/stats\"\nquerystring = {\"year\": year, \"statId\": statid}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
239
+ "statuscode":200,
240
+ "body":{
241
+ "key1":"value",
242
+ "key2":"value"
243
+ },
244
+ "headers":{},
245
+ "schema":{}
246
+ },
247
+ {
248
+ "name":"scorecards",
249
+ "url":"https://live-golf-data.p.rapidapi.com/scorecard",
250
+ "description":"Fetch a scorecard for a given `tournId`, `year`, `playerId`, and `roundId`. Scorecards include shot-by-shot granularity.",
251
+ "method":"GET",
252
+ "required_parameters":[
253
+ {
254
+ "name":"orgId",
255
+ "type":"ENUM",
256
+ "description":"Choose 1 for PGA Tour or 2 for LIV Tour.",
257
+ "default":""
258
+ },
259
+ {
260
+ "name":"year",
261
+ "type":"STRING",
262
+ "description":"",
263
+ "default":"2022"
264
+ },
265
+ {
266
+ "name":"playerId",
267
+ "type":"STRING",
268
+ "description":"",
269
+ "default":"47504"
270
+ },
271
+ {
272
+ "name":"tournId",
273
+ "type":"STRING",
274
+ "description":"",
275
+ "default":"475"
276
+ }
277
+ ],
278
+ "optional_parameters":[
279
+ {
280
+ "name":"roundId",
281
+ "type":"STRING",
282
+ "description":"",
283
+ "default":""
284
+ }
285
+ ],
286
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/scorecard\"\nquerystring = {\"orgId\": orgid, \"year\": year, \"playerId\": playerid, \"tournId\": tournid}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
287
+ "statuscode":200,
288
+ "body":{
289
+ "key1":"value",
290
+ "key2":"value"
291
+ },
292
+ "headers":{},
293
+ "schema":{}
294
+ },
295
+ {
296
+ "name":"leaderboards",
297
+ "url":"https://live-golf-data.p.rapidapi.com/leaderboard",
298
+ "description":"Fetch the most recent leaderboard for a given `tournId`, `year`, and `roundId`. Query the `schedule` endpoint for the desired `tournId` and `year`.\n\nLeaderboards are available 1-2 days before the event begins.",
299
+ "method":"GET",
300
+ "required_parameters":[
301
+ {
302
+ "name":"orgId",
303
+ "type":"ENUM",
304
+ "description":"Choose 1 for PGA Tour or 2 for LIV Tour.",
305
+ "default":""
306
+ },
307
+ {
308
+ "name":"tournId",
309
+ "type":"STRING",
310
+ "description":"",
311
+ "default":"475"
312
+ },
313
+ {
314
+ "name":"year",
315
+ "type":"STRING",
316
+ "description":"",
317
+ "default":"2022"
318
+ }
319
+ ],
320
+ "optional_parameters":[
321
+ {
322
+ "name":"roundId",
323
+ "type":"NUMBER",
324
+ "description":"",
325
+ "default":""
326
+ }
327
+ ],
328
+ "code":"import requests\n\nurl = \"https://live-golf-data.p.rapidapi.com/leaderboard\"\nquerystring = {\"orgId\": orgid, \"tournId\": tournid, \"year\": year}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-golf-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
329
+ "statuscode":200,
330
+ "body":{
331
+ "key1":"value",
332
+ "key2":"value"
333
+ },
334
+ "headers":{},
335
+ "schema":{}
336
+ }
337
+ ]
338
+ }
toolbench/toolenv/tools/Sports/live_golf_data/api.py ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def world_ranking(year: str, statid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Fetch the world rankings for a given year"
12
+
13
+ """
14
+ url = f"https://live-golf-data.p.rapidapi.com/stats"
15
+ querystring = {'year': year, 'statId': statid, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def earnings(year: str, tournid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Fetch the player earnings for a given `tournId` and `year`."
33
+
34
+ """
35
+ url = f"https://live-golf-data.p.rapidapi.com/earnings"
36
+ querystring = {'year': year, 'tournId': tournid, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def points(tournid: str, year: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "Fetch official FedExCup points earned per player for a given `tournId` and `year`. Note that PGA Tour non-members will not be officially ranked."
54
+
55
+ """
56
+ url = f"https://live-golf-data.p.rapidapi.com/points"
57
+ querystring = {'tournId': tournid, 'year': year, }
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def tournaments(orgid: str, tournid: str, year: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ "Fetch tournament information, such as metadata, players, courses, and earnings. Query the `schedule` endpoint to retrieve the necessary `tournId` and `year` parameters. This info will be updated with a players entry list the Friday before the tournament."
75
+ orgid: Choose 1 for PGA Tour or 2 for LIV Tour.
76
+
77
+ """
78
+ url = f"https://live-golf-data.p.rapidapi.com/tournament"
79
+ querystring = {'orgId': orgid, 'tournId': tournid, 'year': year, }
80
+
81
+ headers = {
82
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
83
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
84
+ }
85
+
86
+
87
+ response = requests.get(url, headers=headers, params=querystring)
88
+ try:
89
+ observation = response.json()
90
+ except:
91
+ observation = response.text
92
+ return observation
93
+
94
+ def players(lastname: str='Morikawa', playerid: str='50525', firstname: str='Collin', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
95
+ """
96
+ "Fetch a PGA Tour player by his last name, first name, playerId, or a combination of these parameters.
97
+
98
+ You must provide at least one search parameter to the API."
99
+
100
+ """
101
+ url = f"https://live-golf-data.p.rapidapi.com/players"
102
+ querystring = {}
103
+ if lastname:
104
+ querystring['lastName'] = lastname
105
+ if playerid:
106
+ querystring['playerId'] = playerid
107
+ if firstname:
108
+ querystring['firstName'] = firstname
109
+
110
+ headers = {
111
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
112
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
113
+ }
114
+
115
+
116
+ response = requests.get(url, headers=headers, params=querystring)
117
+ try:
118
+ observation = response.json()
119
+ except:
120
+ observation = response.text
121
+ return observation
122
+
123
+ def schedules(orgid: str, year: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
124
+ """
125
+ "Fetch the schedule for the desired year and organization."
126
+ orgid: Choose 1 for PGA Tour or 2 for LIV Tour.
127
+
128
+ """
129
+ url = f"https://live-golf-data.p.rapidapi.com/schedule"
130
+ querystring = {'orgId': orgid, 'year': year, }
131
+
132
+ headers = {
133
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
134
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
135
+ }
136
+
137
+
138
+ response = requests.get(url, headers=headers, params=querystring)
139
+ try:
140
+ observation = response.json()
141
+ except:
142
+ observation = response.text
143
+ return observation
144
+
145
+ def organizations(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
146
+ """
147
+ "Fetch the organizations that are supported by this golf data API."
148
+
149
+ """
150
+ url = f"https://live-golf-data.p.rapidapi.com/organizations"
151
+ querystring = {}
152
+
153
+ headers = {
154
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
155
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
156
+ }
157
+
158
+
159
+ response = requests.get(url, headers=headers, params=querystring)
160
+ try:
161
+ observation = response.json()
162
+ except:
163
+ observation = response.text
164
+ return observation
165
+
166
+ def fedexcup_ranking(year: str, statid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
167
+ """
168
+ "Fetch the FedExCup ranking leaderboard for a given year. These rankings are updated live during a tournament to show the player's projected ranking."
169
+
170
+ """
171
+ url = f"https://live-golf-data.p.rapidapi.com/stats"
172
+ querystring = {'year': year, 'statId': statid, }
173
+
174
+ headers = {
175
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
176
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
177
+ }
178
+
179
+
180
+ response = requests.get(url, headers=headers, params=querystring)
181
+ try:
182
+ observation = response.json()
183
+ except:
184
+ observation = response.text
185
+ return observation
186
+
187
+ def scorecards(orgid: str, year: str, playerid: str, tournid: str, roundid: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
188
+ """
189
+ "Fetch a scorecard for a given `tournId`, `year`, `playerId`, and `roundId`. Scorecards include shot-by-shot granularity."
190
+ orgid: Choose 1 for PGA Tour or 2 for LIV Tour.
191
+
192
+ """
193
+ url = f"https://live-golf-data.p.rapidapi.com/scorecard"
194
+ querystring = {'orgId': orgid, 'year': year, 'playerId': playerid, 'tournId': tournid, }
195
+ if roundid:
196
+ querystring['roundId'] = roundid
197
+
198
+ headers = {
199
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
200
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
201
+ }
202
+
203
+
204
+ response = requests.get(url, headers=headers, params=querystring)
205
+ try:
206
+ observation = response.json()
207
+ except:
208
+ observation = response.text
209
+ return observation
210
+
211
+ def leaderboards(orgid: str, tournid: str, year: str, roundid: int=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
212
+ """
213
+ "Fetch the most recent leaderboard for a given `tournId`, `year`, and `roundId`. Query the `schedule` endpoint for the desired `tournId` and `year`.
214
+
215
+ Leaderboards are available 1-2 days before the event begins."
216
+ orgid: Choose 1 for PGA Tour or 2 for LIV Tour.
217
+
218
+ """
219
+ url = f"https://live-golf-data.p.rapidapi.com/leaderboard"
220
+ querystring = {'orgId': orgid, 'tournId': tournid, 'year': year, }
221
+ if roundid:
222
+ querystring['roundId'] = roundid
223
+
224
+ headers = {
225
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
226
+ "X-RapidAPI-Host": "live-golf-data.p.rapidapi.com"
227
+ }
228
+
229
+
230
+ response = requests.get(url, headers=headers, params=querystring)
231
+ try:
232
+ observation = response.json()
233
+ except:
234
+ observation = response.text
235
+ return observation
236
+
toolbench/toolenv/tools/Sports/live_line.json ADDED
@@ -0,0 +1,808 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Live Line",
3
+ "tool_description":"Looking to exchange your love for cricket with a companion? 🤔👀 Search no further, here’s the best one-stop-app for all things cricket. Any Query? Drop Mail on:- vis.sarvaiya@gmail.com Skype: live:vis.sarvaiya",
4
+ "title":"Live Line",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":474,
9
+ "avgSuccessRate":98,
10
+ "popularityScore":9.6,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/vissarvaiya/api/live-line/",
14
+ "host":"live-line.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"LiveMatch",
18
+ "url":"https://live-line.p.rapidapi.com/liveMatch/{match_id}",
19
+ "description":"LiveMatch",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"match_id",
24
+ "type":"string",
25
+ "description":"",
26
+ "default":"3457"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/liveMatch/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":{},
33
+ "headers":{},
34
+ "schema":{
35
+ "type":"object",
36
+ "properties":{
37
+ "get":{
38
+ "type":"string"
39
+ },
40
+ "parameters":{
41
+ "type":"array"
42
+ },
43
+ "errors":{
44
+ "type":"array"
45
+ },
46
+ "results":{
47
+ "type":"integer"
48
+ },
49
+ "response":{
50
+ "type":"array",
51
+ "items":{
52
+ "type":"object"
53
+ }
54
+ }
55
+ }
56
+ }
57
+ },
58
+ {
59
+ "name":"LiveMatches",
60
+ "url":"https://live-line.p.rapidapi.com/liveMatches",
61
+ "description":"Get LiveMatches",
62
+ "method":"GET",
63
+ "required_parameters":[],
64
+ "optional_parameters":[],
65
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/liveMatches\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
66
+ "statuscode":200,
67
+ "body":{},
68
+ "headers":{},
69
+ "schema":{
70
+ "type":"object",
71
+ "properties":{
72
+ "get":{
73
+ "type":"string"
74
+ },
75
+ "parameters":{
76
+ "type":"array"
77
+ },
78
+ "errors":{
79
+ "type":"array"
80
+ },
81
+ "results":{
82
+ "type":"integer"
83
+ },
84
+ "response":{
85
+ "type":"array",
86
+ "items":{
87
+ "type":"object"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ },
93
+ {
94
+ "name":"NewsDetails",
95
+ "url":"https://live-line.p.rapidapi.com/newsDetails/{news_id}",
96
+ "description":"NewsDetails",
97
+ "method":"GET",
98
+ "required_parameters":[
99
+ {
100
+ "name":"news_id",
101
+ "type":"string",
102
+ "description":"",
103
+ "default":"360"
104
+ }
105
+ ],
106
+ "optional_parameters":[],
107
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/newsDetails/{news_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
108
+ "statuscode":200,
109
+ "body":{},
110
+ "headers":{},
111
+ "schema":{
112
+ "type":"object",
113
+ "properties":{
114
+ "get":{
115
+ "type":"string"
116
+ },
117
+ "parameters":{
118
+ "type":"array"
119
+ },
120
+ "errors":{
121
+ "type":"array"
122
+ },
123
+ "results":{
124
+ "type":"integer"
125
+ },
126
+ "response":{
127
+ "type":"array",
128
+ "items":{
129
+ "type":"object"
130
+ }
131
+ }
132
+ }
133
+ }
134
+ },
135
+ {
136
+ "name":"MatchOddsHistory",
137
+ "url":"https://live-line.p.rapidapi.com/matchOddsHistory/{match_id}",
138
+ "description":"MatchOddsHistory",
139
+ "method":"GET",
140
+ "required_parameters":[
141
+ {
142
+ "name":"match_id",
143
+ "type":"string",
144
+ "description":"",
145
+ "default":"2799"
146
+ }
147
+ ],
148
+ "optional_parameters":[],
149
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/matchOddsHistory/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
150
+ "statuscode":200,
151
+ "body":{},
152
+ "headers":{},
153
+ "schema":{
154
+ "type":"object",
155
+ "properties":{
156
+ "get":{
157
+ "type":"string"
158
+ },
159
+ "parameters":{
160
+ "type":"array"
161
+ },
162
+ "errors":{
163
+ "type":"array"
164
+ },
165
+ "results":{
166
+ "type":"integer"
167
+ },
168
+ "response":{
169
+ "type":"array",
170
+ "items":{
171
+ "type":"object"
172
+ }
173
+ }
174
+ }
175
+ }
176
+ },
177
+ {
178
+ "name":"MatchFancy",
179
+ "url":"https://live-line.p.rapidapi.com/matchFancy/{match_id}",
180
+ "description":"MatchFancy",
181
+ "method":"GET",
182
+ "required_parameters":[
183
+ {
184
+ "name":"match_id",
185
+ "type":"string",
186
+ "description":"",
187
+ "default":"2799"
188
+ }
189
+ ],
190
+ "optional_parameters":[],
191
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/matchFancy/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
192
+ "statuscode":200,
193
+ "body":{},
194
+ "headers":{},
195
+ "schema":{
196
+ "type":"object",
197
+ "properties":{
198
+ "get":{
199
+ "type":"string"
200
+ },
201
+ "parameters":{
202
+ "type":"array"
203
+ },
204
+ "errors":{
205
+ "type":"array"
206
+ },
207
+ "results":{
208
+ "type":"integer"
209
+ },
210
+ "response":{
211
+ "type":"array",
212
+ "items":{
213
+ "type":"object"
214
+ }
215
+ }
216
+ }
217
+ }
218
+ },
219
+ {
220
+ "name":"SeriesMatches",
221
+ "url":"https://live-line.p.rapidapi.com/matches/{series_id}",
222
+ "description":"SeriesMatches",
223
+ "method":"GET",
224
+ "required_parameters":[
225
+ {
226
+ "name":"series_id",
227
+ "type":"string",
228
+ "description":"",
229
+ "default":"206"
230
+ }
231
+ ],
232
+ "optional_parameters":[],
233
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/matches/{series_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
234
+ "statuscode":200,
235
+ "body":{},
236
+ "headers":{},
237
+ "schema":{
238
+ "type":"object",
239
+ "properties":{
240
+ "get":{
241
+ "type":"string"
242
+ },
243
+ "parameters":{
244
+ "type":"array"
245
+ },
246
+ "errors":{
247
+ "type":"array"
248
+ },
249
+ "results":{
250
+ "type":"integer"
251
+ },
252
+ "response":{
253
+ "type":"array",
254
+ "items":{
255
+ "type":"object"
256
+ }
257
+ }
258
+ }
259
+ }
260
+ },
261
+ {
262
+ "name":"MatchPlayer",
263
+ "url":"https://live-line.p.rapidapi.com/playerByMatchId/{match_id}",
264
+ "description":"MatchPlayer",
265
+ "method":"GET",
266
+ "required_parameters":[
267
+ {
268
+ "name":"match_id",
269
+ "type":"string",
270
+ "description":"",
271
+ "default":"2799"
272
+ }
273
+ ],
274
+ "optional_parameters":[],
275
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/playerByMatchId/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
276
+ "statuscode":200,
277
+ "body":{},
278
+ "headers":{},
279
+ "schema":{
280
+ "type":"object",
281
+ "properties":{
282
+ "get":{
283
+ "type":"string"
284
+ },
285
+ "parameters":{
286
+ "type":"array"
287
+ },
288
+ "errors":{
289
+ "type":"array"
290
+ },
291
+ "results":{
292
+ "type":"integer"
293
+ },
294
+ "response":{
295
+ "type":"array",
296
+ "items":{
297
+ "type":"object"
298
+ }
299
+ }
300
+ }
301
+ }
302
+ },
303
+ {
304
+ "name":"News",
305
+ "url":"https://live-line.p.rapidapi.com/news",
306
+ "description":" ",
307
+ "method":"GET",
308
+ "required_parameters":[],
309
+ "optional_parameters":[],
310
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/news\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
311
+ "statuscode":200,
312
+ "body":{},
313
+ "headers":{},
314
+ "schema":{
315
+ "type":"object",
316
+ "properties":{
317
+ "get":{
318
+ "type":"string"
319
+ },
320
+ "parameters":{
321
+ "type":"array"
322
+ },
323
+ "errors":{
324
+ "type":"array"
325
+ },
326
+ "results":{
327
+ "type":"integer"
328
+ },
329
+ "response":{
330
+ "type":"array",
331
+ "items":{
332
+ "type":"object"
333
+ }
334
+ }
335
+ }
336
+ }
337
+ },
338
+ {
339
+ "name":"RecentMatches",
340
+ "url":"https://live-line.p.rapidapi.com/recentMatches",
341
+ "description":" ",
342
+ "method":"GET",
343
+ "required_parameters":[],
344
+ "optional_parameters":[],
345
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/recentMatches\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
346
+ "statuscode":200,
347
+ "body":{},
348
+ "headers":{},
349
+ "schema":{
350
+ "type":"object",
351
+ "properties":{
352
+ "get":{
353
+ "type":"string"
354
+ },
355
+ "parameters":{
356
+ "type":"array"
357
+ },
358
+ "errors":{
359
+ "type":"array"
360
+ },
361
+ "results":{
362
+ "type":"integer"
363
+ },
364
+ "response":{
365
+ "type":"array",
366
+ "items":{
367
+ "type":"object"
368
+ }
369
+ }
370
+ }
371
+ }
372
+ },
373
+ {
374
+ "name":"MatchStats",
375
+ "url":"https://live-line.p.rapidapi.com/matchStats/{match_id}",
376
+ "description":"MatchStats",
377
+ "method":"GET",
378
+ "required_parameters":[
379
+ {
380
+ "name":"match_id",
381
+ "type":"string",
382
+ "description":"",
383
+ "default":"2799"
384
+ }
385
+ ],
386
+ "optional_parameters":[],
387
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/matchStats/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
388
+ "statuscode":200,
389
+ "body":{},
390
+ "headers":{},
391
+ "schema":{
392
+ "type":"object",
393
+ "properties":{
394
+ "get":{
395
+ "type":"string"
396
+ },
397
+ "parameters":{
398
+ "type":"array"
399
+ },
400
+ "errors":{
401
+ "type":"array"
402
+ },
403
+ "results":{
404
+ "type":"integer"
405
+ },
406
+ "response":{
407
+ "type":"array",
408
+ "items":{
409
+ "type":"object"
410
+ }
411
+ }
412
+ }
413
+ }
414
+ },
415
+ {
416
+ "name":"Match Info",
417
+ "url":"https://live-line.p.rapidapi.com/matchInfo/{match_id}",
418
+ "description":"Match Info",
419
+ "method":"GET",
420
+ "required_parameters":[
421
+ {
422
+ "name":"match_id",
423
+ "type":"string",
424
+ "description":"",
425
+ "default":"2799"
426
+ }
427
+ ],
428
+ "optional_parameters":[],
429
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/matchInfo/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
430
+ "statuscode":200,
431
+ "body":{},
432
+ "headers":{},
433
+ "schema":{
434
+ "type":"object",
435
+ "properties":{
436
+ "get":{
437
+ "type":"string"
438
+ },
439
+ "parameters":{
440
+ "type":"array"
441
+ },
442
+ "errors":{
443
+ "type":"array"
444
+ },
445
+ "results":{
446
+ "type":"integer"
447
+ },
448
+ "response":{
449
+ "type":"array",
450
+ "items":{
451
+ "type":"object"
452
+ }
453
+ }
454
+ }
455
+ }
456
+ },
457
+ {
458
+ "name":"MatchCommentary",
459
+ "url":"https://live-line.p.rapidapi.com/matchCommentary/{match_id}",
460
+ "description":"MatchCommentary",
461
+ "method":"GET",
462
+ "required_parameters":[
463
+ {
464
+ "name":"match_id",
465
+ "type":"string",
466
+ "description":"",
467
+ "default":"2799"
468
+ }
469
+ ],
470
+ "optional_parameters":[],
471
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/matchCommentary/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
472
+ "statuscode":200,
473
+ "body":{},
474
+ "headers":{},
475
+ "schema":{
476
+ "type":"object",
477
+ "properties":{
478
+ "get":{
479
+ "type":"string"
480
+ },
481
+ "parameters":{
482
+ "type":"array"
483
+ },
484
+ "errors":{
485
+ "type":"array"
486
+ },
487
+ "results":{
488
+ "type":"integer"
489
+ },
490
+ "response":{
491
+ "type":"array",
492
+ "items":{
493
+ "type":"object"
494
+ }
495
+ }
496
+ }
497
+ }
498
+ },
499
+ {
500
+ "name":"MatchSquads",
501
+ "url":"https://live-line.p.rapidapi.com/matchSquads/{match_id}",
502
+ "description":"MatchSquads",
503
+ "method":"GET",
504
+ "required_parameters":[
505
+ {
506
+ "name":"match_id",
507
+ "type":"string",
508
+ "description":"",
509
+ "default":"2799"
510
+ }
511
+ ],
512
+ "optional_parameters":[],
513
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/matchSquads/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
514
+ "statuscode":200,
515
+ "body":{},
516
+ "headers":{},
517
+ "schema":{
518
+ "type":"object",
519
+ "properties":{
520
+ "get":{
521
+ "type":"string"
522
+ },
523
+ "parameters":{
524
+ "type":"array"
525
+ },
526
+ "errors":{
527
+ "type":"array"
528
+ },
529
+ "results":{
530
+ "type":"integer"
531
+ },
532
+ "response":{
533
+ "type":"array",
534
+ "items":{
535
+ "type":"object"
536
+ }
537
+ }
538
+ }
539
+ }
540
+ },
541
+ {
542
+ "name":"Series",
543
+ "url":"https://live-line.p.rapidapi.com/series",
544
+ "description":" ",
545
+ "method":"GET",
546
+ "required_parameters":[],
547
+ "optional_parameters":[],
548
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/series\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
549
+ "statuscode":200,
550
+ "body":{},
551
+ "headers":{},
552
+ "schema":{
553
+ "type":"object",
554
+ "properties":{
555
+ "get":{
556
+ "type":"string"
557
+ },
558
+ "parameters":{
559
+ "type":"array"
560
+ },
561
+ "errors":{
562
+ "type":"array"
563
+ },
564
+ "results":{
565
+ "type":"integer"
566
+ },
567
+ "response":{
568
+ "type":"array",
569
+ "items":{
570
+ "type":"object"
571
+ }
572
+ }
573
+ }
574
+ }
575
+ },
576
+ {
577
+ "name":"MatchScoreCard",
578
+ "url":"https://live-line.p.rapidapi.com/matchScoreCard/{match_id}",
579
+ "description":"MatchScoreCard",
580
+ "method":"GET",
581
+ "required_parameters":[
582
+ {
583
+ "name":"match_id",
584
+ "type":"string",
585
+ "description":"",
586
+ "default":"2799"
587
+ }
588
+ ],
589
+ "optional_parameters":[],
590
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/matchScoreCard/{match_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
591
+ "statuscode":200,
592
+ "body":{},
593
+ "headers":{},
594
+ "schema":{
595
+ "type":"object",
596
+ "properties":{
597
+ "get":{
598
+ "type":"string"
599
+ },
600
+ "parameters":{
601
+ "type":"array"
602
+ },
603
+ "errors":{
604
+ "type":"array"
605
+ },
606
+ "results":{
607
+ "type":"integer"
608
+ },
609
+ "response":{
610
+ "type":"array",
611
+ "items":{
612
+ "type":"object"
613
+ }
614
+ }
615
+ }
616
+ }
617
+ },
618
+ {
619
+ "name":"UpcomingMatches",
620
+ "url":"https://live-line.p.rapidapi.com/upcomingMatches",
621
+ "description":" ",
622
+ "method":"GET",
623
+ "required_parameters":[],
624
+ "optional_parameters":[],
625
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/upcomingMatches\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
626
+ "statuscode":200,
627
+ "body":{},
628
+ "headers":{},
629
+ "schema":{
630
+ "type":"object",
631
+ "properties":{
632
+ "get":{
633
+ "type":"string"
634
+ },
635
+ "parameters":{
636
+ "type":"array"
637
+ },
638
+ "errors":{
639
+ "type":"array"
640
+ },
641
+ "results":{
642
+ "type":"integer"
643
+ },
644
+ "response":{
645
+ "type":"array",
646
+ "items":{
647
+ "type":"object"
648
+ }
649
+ }
650
+ }
651
+ }
652
+ },
653
+ {
654
+ "name":"TeamRanking",
655
+ "url":"https://live-line.p.rapidapi.com/teamRanking/1",
656
+ "description":" ",
657
+ "method":"GET",
658
+ "required_parameters":[],
659
+ "optional_parameters":[],
660
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/teamRanking/1\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
661
+ "statuscode":200,
662
+ "body":{},
663
+ "headers":{},
664
+ "schema":{
665
+ "type":"object",
666
+ "properties":{
667
+ "get":{
668
+ "type":"string"
669
+ },
670
+ "parameters":{
671
+ "type":"array"
672
+ },
673
+ "errors":{
674
+ "type":"array"
675
+ },
676
+ "results":{
677
+ "type":"integer"
678
+ },
679
+ "response":{
680
+ "type":"array",
681
+ "items":{
682
+ "type":"object"
683
+ }
684
+ }
685
+ }
686
+ }
687
+ },
688
+ {
689
+ "name":"PlayerRanking",
690
+ "url":"https://live-line.p.rapidapi.com/playerRanking/{type}",
691
+ "description":"PlayerRanking\nType is as below\n1 = Test Batsman\n2 = Test Bowlers\n3 = Test Allrounders\n4 = ODI Batsman\n5 = ODI Bowlers\n6 = ODI Allrounders\n7 = T20 Batsman\n8 = T20 Bowlers\n9 = T20 Allrounders\n10 = Women's ODI Batting\n11 = Women's ODI Bowling\n12 = Women's ODI Allrounders\n13 = Women's T20 Batting\n14 = Women's T20 Bowling\n15 = Women's T20 Allrounders",
692
+ "method":"GET",
693
+ "required_parameters":[
694
+ {
695
+ "name":"type",
696
+ "type":"string",
697
+ "description":"",
698
+ "default":"1"
699
+ }
700
+ ],
701
+ "optional_parameters":[],
702
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/playerRanking/{type}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
703
+ "statuscode":200,
704
+ "body":{},
705
+ "headers":{},
706
+ "schema":{
707
+ "type":"object",
708
+ "properties":{
709
+ "get":{
710
+ "type":"string"
711
+ },
712
+ "parameters":{
713
+ "type":"array"
714
+ },
715
+ "errors":{
716
+ "type":"array"
717
+ },
718
+ "results":{
719
+ "type":"integer"
720
+ },
721
+ "response":{
722
+ "type":"array",
723
+ "items":{
724
+ "type":"object"
725
+ }
726
+ }
727
+ }
728
+ }
729
+ },
730
+ {
731
+ "name":"Home",
732
+ "url":"https://live-line.p.rapidapi.com/home",
733
+ "description":" ",
734
+ "method":"GET",
735
+ "required_parameters":[],
736
+ "optional_parameters":[],
737
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/home\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
738
+ "statuscode":200,
739
+ "body":{},
740
+ "headers":{},
741
+ "schema":{
742
+ "type":"object",
743
+ "properties":{
744
+ "get":{
745
+ "type":"string"
746
+ },
747
+ "parameters":{
748
+ "type":"array"
749
+ },
750
+ "errors":{
751
+ "type":"array"
752
+ },
753
+ "results":{
754
+ "type":"integer"
755
+ },
756
+ "response":{
757
+ "type":"array",
758
+ "items":{
759
+ "type":"object"
760
+ }
761
+ }
762
+ }
763
+ }
764
+ },
765
+ {
766
+ "name":"PointTable",
767
+ "url":"https://live-line.p.rapidapi.com/pointTable/{series_id}",
768
+ "description":"PointTable",
769
+ "method":"GET",
770
+ "required_parameters":[
771
+ {
772
+ "name":"series_id",
773
+ "type":"string",
774
+ "description":"",
775
+ "default":"206"
776
+ }
777
+ ],
778
+ "optional_parameters":[],
779
+ "code":"import requests\n\nurl = \"https://live-line.p.rapidapi.com/pointTable/{series_id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-line.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
780
+ "statuscode":200,
781
+ "body":{},
782
+ "headers":{},
783
+ "schema":{
784
+ "type":"object",
785
+ "properties":{
786
+ "get":{
787
+ "type":"string"
788
+ },
789
+ "parameters":{
790
+ "type":"array"
791
+ },
792
+ "errors":{
793
+ "type":"array"
794
+ },
795
+ "results":{
796
+ "type":"integer"
797
+ },
798
+ "response":{
799
+ "type":"array",
800
+ "items":{
801
+ "type":"object"
802
+ }
803
+ }
804
+ }
805
+ }
806
+ }
807
+ ]
808
+ }
toolbench/toolenv/tools/Sports/live_line/api.py ADDED
@@ -0,0 +1,444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def livematch(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "LiveMatch"
12
+
13
+ """
14
+ url = f"https://live-line.p.rapidapi.com/livematch/{match_id}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def livematches(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Get LiveMatches"
33
+
34
+ """
35
+ url = f"https://live-line.p.rapidapi.com/livematches"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def newsdetails(news_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "NewsDetails"
54
+
55
+ """
56
+ url = f"https://live-line.p.rapidapi.com/newsdetails/{news_id}"
57
+ querystring = {}
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def matchoddshistory(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ "MatchOddsHistory"
75
+
76
+ """
77
+ url = f"https://live-line.p.rapidapi.com/matchoddshistory/{match_id}"
78
+ querystring = {}
79
+
80
+ headers = {
81
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
82
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
83
+ }
84
+
85
+
86
+ response = requests.get(url, headers=headers, params=querystring)
87
+ try:
88
+ observation = response.json()
89
+ except:
90
+ observation = response.text
91
+ return observation
92
+
93
+ def matchfancy(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
94
+ """
95
+ "MatchFancy"
96
+
97
+ """
98
+ url = f"https://live-line.p.rapidapi.com/matchfancy/{match_id}"
99
+ querystring = {}
100
+
101
+ headers = {
102
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
103
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
104
+ }
105
+
106
+
107
+ response = requests.get(url, headers=headers, params=querystring)
108
+ try:
109
+ observation = response.json()
110
+ except:
111
+ observation = response.text
112
+ return observation
113
+
114
+ def seriesmatches(series_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
115
+ """
116
+ "SeriesMatches"
117
+
118
+ """
119
+ url = f"https://live-line.p.rapidapi.com/matches/{series_id}"
120
+ querystring = {}
121
+
122
+ headers = {
123
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
124
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
125
+ }
126
+
127
+
128
+ response = requests.get(url, headers=headers, params=querystring)
129
+ try:
130
+ observation = response.json()
131
+ except:
132
+ observation = response.text
133
+ return observation
134
+
135
+ def matchplayer(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
136
+ """
137
+ "MatchPlayer"
138
+
139
+ """
140
+ url = f"https://live-line.p.rapidapi.com/playerbymatchid/{match_id}"
141
+ querystring = {}
142
+
143
+ headers = {
144
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
145
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
146
+ }
147
+
148
+
149
+ response = requests.get(url, headers=headers, params=querystring)
150
+ try:
151
+ observation = response.json()
152
+ except:
153
+ observation = response.text
154
+ return observation
155
+
156
+ def news(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
157
+ """
158
+ " "
159
+
160
+ """
161
+ url = f"https://live-line.p.rapidapi.com/news"
162
+ querystring = {}
163
+
164
+ headers = {
165
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
166
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
167
+ }
168
+
169
+
170
+ response = requests.get(url, headers=headers, params=querystring)
171
+ try:
172
+ observation = response.json()
173
+ except:
174
+ observation = response.text
175
+ return observation
176
+
177
+ def recentmatches(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
178
+ """
179
+ " "
180
+
181
+ """
182
+ url = f"https://live-line.p.rapidapi.com/recentmatches"
183
+ querystring = {}
184
+
185
+ headers = {
186
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
187
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
188
+ }
189
+
190
+
191
+ response = requests.get(url, headers=headers, params=querystring)
192
+ try:
193
+ observation = response.json()
194
+ except:
195
+ observation = response.text
196
+ return observation
197
+
198
+ def matchstats(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
199
+ """
200
+ "MatchStats"
201
+
202
+ """
203
+ url = f"https://live-line.p.rapidapi.com/matchstats/{match_id}"
204
+ querystring = {}
205
+
206
+ headers = {
207
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
208
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
209
+ }
210
+
211
+
212
+ response = requests.get(url, headers=headers, params=querystring)
213
+ try:
214
+ observation = response.json()
215
+ except:
216
+ observation = response.text
217
+ return observation
218
+
219
+ def match_info(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
220
+ """
221
+ "Match Info"
222
+
223
+ """
224
+ url = f"https://live-line.p.rapidapi.com/matchinfo/{match_id}"
225
+ querystring = {}
226
+
227
+ headers = {
228
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
229
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
230
+ }
231
+
232
+
233
+ response = requests.get(url, headers=headers, params=querystring)
234
+ try:
235
+ observation = response.json()
236
+ except:
237
+ observation = response.text
238
+ return observation
239
+
240
+ def matchcommentary(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
241
+ """
242
+ "MatchCommentary"
243
+
244
+ """
245
+ url = f"https://live-line.p.rapidapi.com/matchcommentary/{match_id}"
246
+ querystring = {}
247
+
248
+ headers = {
249
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
250
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
251
+ }
252
+
253
+
254
+ response = requests.get(url, headers=headers, params=querystring)
255
+ try:
256
+ observation = response.json()
257
+ except:
258
+ observation = response.text
259
+ return observation
260
+
261
+ def matchsquads(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
262
+ """
263
+ "MatchSquads"
264
+
265
+ """
266
+ url = f"https://live-line.p.rapidapi.com/matchsquads/{match_id}"
267
+ querystring = {}
268
+
269
+ headers = {
270
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
271
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
272
+ }
273
+
274
+
275
+ response = requests.get(url, headers=headers, params=querystring)
276
+ try:
277
+ observation = response.json()
278
+ except:
279
+ observation = response.text
280
+ return observation
281
+
282
+ def series(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
283
+ """
284
+ " "
285
+
286
+ """
287
+ url = f"https://live-line.p.rapidapi.com/series"
288
+ querystring = {}
289
+
290
+ headers = {
291
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
292
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
293
+ }
294
+
295
+
296
+ response = requests.get(url, headers=headers, params=querystring)
297
+ try:
298
+ observation = response.json()
299
+ except:
300
+ observation = response.text
301
+ return observation
302
+
303
+ def matchscorecard(match_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
304
+ """
305
+ "MatchScoreCard"
306
+
307
+ """
308
+ url = f"https://live-line.p.rapidapi.com/matchscorecard/{match_id}"
309
+ querystring = {}
310
+
311
+ headers = {
312
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
313
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
314
+ }
315
+
316
+
317
+ response = requests.get(url, headers=headers, params=querystring)
318
+ try:
319
+ observation = response.json()
320
+ except:
321
+ observation = response.text
322
+ return observation
323
+
324
+ def upcomingmatches(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
325
+ """
326
+ " "
327
+
328
+ """
329
+ url = f"https://live-line.p.rapidapi.com/upcomingmatches"
330
+ querystring = {}
331
+
332
+ headers = {
333
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
334
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
335
+ }
336
+
337
+
338
+ response = requests.get(url, headers=headers, params=querystring)
339
+ try:
340
+ observation = response.json()
341
+ except:
342
+ observation = response.text
343
+ return observation
344
+
345
+ def teamranking(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
346
+ """
347
+ " "
348
+
349
+ """
350
+ url = f"https://live-line.p.rapidapi.com/teamranking/1"
351
+ querystring = {}
352
+
353
+ headers = {
354
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
355
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
356
+ }
357
+
358
+
359
+ response = requests.get(url, headers=headers, params=querystring)
360
+ try:
361
+ observation = response.json()
362
+ except:
363
+ observation = response.text
364
+ return observation
365
+
366
+ def playerranking(type: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
367
+ """
368
+ "PlayerRanking
369
+ Type is as below
370
+ 1 = Test Batsman
371
+ 2 = Test Bowlers
372
+ 3 = Test Allrounders
373
+ 4 = ODI Batsman
374
+ 5 = ODI Bowlers
375
+ 6 = ODI Allrounders
376
+ 7 = T20 Batsman
377
+ 8 = T20 Bowlers
378
+ 9 = T20 Allrounders
379
+ 10 = Women's ODI Batting
380
+ 11 = Women's ODI Bowling
381
+ 12 = Women's ODI Allrounders
382
+ 13 = Women's T20 Batting
383
+ 14 = Women's T20 Bowling
384
+ 15 = Women's T20 Allrounders"
385
+
386
+ """
387
+ url = f"https://live-line.p.rapidapi.com/playerranking/{type}"
388
+ querystring = {}
389
+
390
+ headers = {
391
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
392
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
393
+ }
394
+
395
+
396
+ response = requests.get(url, headers=headers, params=querystring)
397
+ try:
398
+ observation = response.json()
399
+ except:
400
+ observation = response.text
401
+ return observation
402
+
403
+ def home(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
404
+ """
405
+ " "
406
+
407
+ """
408
+ url = f"https://live-line.p.rapidapi.com/home"
409
+ querystring = {}
410
+
411
+ headers = {
412
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
413
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
414
+ }
415
+
416
+
417
+ response = requests.get(url, headers=headers, params=querystring)
418
+ try:
419
+ observation = response.json()
420
+ except:
421
+ observation = response.text
422
+ return observation
423
+
424
+ def pointtable(series_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
425
+ """
426
+ "PointTable"
427
+
428
+ """
429
+ url = f"https://live-line.p.rapidapi.com/pointtable/{series_id}"
430
+ querystring = {}
431
+
432
+ headers = {
433
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
434
+ "X-RapidAPI-Host": "live-line.p.rapidapi.com"
435
+ }
436
+
437
+
438
+ response = requests.get(url, headers=headers, params=querystring)
439
+ try:
440
+ observation = response.json()
441
+ except:
442
+ observation = response.text
443
+ return observation
444
+
toolbench/toolenv/tools/Sports/live_score_api.json ADDED
@@ -0,0 +1,357 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Live-Score-Api",
3
+ "tool_description":"Live-score API provides affordable and high-quality soccer api. We currently provide live-scores, fixtures, standings, match events, statistics, head2head, history data with lineups, pre-match odds, live odds, and country flags coming down the development pipe.",
4
+ "title":"Live-Score-Api",
5
+ "pricing":"FREE",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":572,
9
+ "avgSuccessRate":15,
10
+ "popularityScore":2.3,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/footballsapi/api/live-score-api/",
14
+ "host":"live-score-api.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Match Events",
18
+ "url":"https://live-score-api.p.rapidapi.com/scores/events.json",
19
+ "description":"Getting match event like: goals, yellow and red cards and people related to them",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[
23
+ {
24
+ "name":"id",
25
+ "type":"STRING",
26
+ "description":"The id of the match which events we want to get",
27
+ "default":"164008"
28
+ }
29
+ ],
30
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/scores/events.json\"\nquerystring = {\"id\": id}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ },
36
+ {
37
+ "name":"Countries List",
38
+ "url":"https://live-score-api.p.rapidapi.com/countries/list.json",
39
+ "description":"Getting the list of the countries that we have in our database",
40
+ "method":"GET",
41
+ "required_parameters":[],
42
+ "optional_parameters":[],
43
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/countries/list.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
44
+ "statuscode":111,
45
+ "body":"",
46
+ "headers":"",
47
+ "schema":""
48
+ },
49
+ {
50
+ "name":"Competitions LIst",
51
+ "url":"https://live-score-api.p.rapidapi.com/competitions/list.json",
52
+ "description":"Getting the list of all supported competitions",
53
+ "method":"GET",
54
+ "required_parameters":[],
55
+ "optional_parameters":[
56
+ {
57
+ "name":"federation_id",
58
+ "type":"NUMBER",
59
+ "description":"ID of a federation in case we want only competition from certain federation like UEFA or CONMEBOL",
60
+ "default":""
61
+ },
62
+ {
63
+ "name":"country_id",
64
+ "type":"NUMBER",
65
+ "description":"ID of a country in case we want only competition from certain country like Germany",
66
+ "default":""
67
+ }
68
+ ],
69
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/competitions/list.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
70
+ "statuscode":111,
71
+ "body":"",
72
+ "headers":"",
73
+ "schema":""
74
+ },
75
+ {
76
+ "name":"Livescores",
77
+ "url":"https://live-score-api.p.rapidapi.com/scores/live.json",
78
+ "description":"Using the API endpoint you get livescores for all current matches",
79
+ "method":"GET",
80
+ "required_parameters":[],
81
+ "optional_parameters":[
82
+ {
83
+ "name":"competition_id",
84
+ "type":"NUMBER",
85
+ "description":"The ID of the competition for which we want the results",
86
+ "default":""
87
+ },
88
+ {
89
+ "name":"country",
90
+ "type":"NUMBER",
91
+ "description":"The ID of the country for which we want the live scores",
92
+ "default":""
93
+ },
94
+ {
95
+ "name":"lang",
96
+ "type":"STRING",
97
+ "description":"2 letter code of a language in which we want the team names (ar, ru...)",
98
+ "default":""
99
+ }
100
+ ],
101
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/scores/live.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
102
+ "statuscode":111,
103
+ "body":"",
104
+ "headers":"",
105
+ "schema":""
106
+ },
107
+ {
108
+ "name":"Fixtures",
109
+ "url":"https://live-score-api.p.rapidapi.com/fixtures/matches.json",
110
+ "description":"Getting list of scheduled games (calendar)",
111
+ "method":"GET",
112
+ "required_parameters":[],
113
+ "optional_parameters":[
114
+ {
115
+ "name":"page",
116
+ "type":"NUMBER",
117
+ "description":"The page with results, this endoint uses pagination",
118
+ "default":""
119
+ },
120
+ {
121
+ "name":"competition_id",
122
+ "type":"NUMBER",
123
+ "description":"The ID of a competition in case we want the fixtures for certain competition only",
124
+ "default":""
125
+ },
126
+ {
127
+ "name":"date",
128
+ "type":"DATE (YYYY-MM-DD)",
129
+ "description":"Filters the fixtures by the date when the matches are scheduled to be played",
130
+ "default":""
131
+ },
132
+ {
133
+ "name":"lang",
134
+ "type":"STRING",
135
+ "description":"2 letter ISO code of the language in which the response data should be in",
136
+ "default":""
137
+ },
138
+ {
139
+ "name":"round",
140
+ "type":"STRING",
141
+ "description":"The round which fixtures we want it could be a number or code like QF, SF, R16",
142
+ "default":""
143
+ },
144
+ {
145
+ "name":"team",
146
+ "type":"NUMBER",
147
+ "description":"The ID of a team in case we want all the fixtures for a certain team",
148
+ "default":""
149
+ }
150
+ ],
151
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/fixtures/matches.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
152
+ "statuscode":111,
153
+ "body":"",
154
+ "headers":"",
155
+ "schema":""
156
+ },
157
+ {
158
+ "name":"Match Statistics",
159
+ "url":"https://live-score-api.p.rapidapi.com/matches/stats.json",
160
+ "description":"Getting match statistics like: possession, offsides, corners and more",
161
+ "method":"GET",
162
+ "required_parameters":[],
163
+ "optional_parameters":[
164
+ {
165
+ "name":"match_id",
166
+ "type":"NUMBER",
167
+ "description":"The id of the match which events we are getting",
168
+ "default":"172939"
169
+ }
170
+ ],
171
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/matches/stats.json\"\nquerystring = {\"match_id\": match_id}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
172
+ "statuscode":111,
173
+ "body":"",
174
+ "headers":"",
175
+ "schema":""
176
+ },
177
+ {
178
+ "name":"History",
179
+ "url":"https://live-score-api.p.rapidapi.com/scores/history.json",
180
+ "description":"Getting matches that have finished",
181
+ "method":"GET",
182
+ "required_parameters":[],
183
+ "optional_parameters":[
184
+ {
185
+ "name":"from",
186
+ "type":"DATE (YYYY-MM-DD)",
187
+ "description":"Date since when we want to get matches",
188
+ "default":""
189
+ },
190
+ {
191
+ "name":"lang",
192
+ "type":"STRING",
193
+ "description":"2 letter ISO code of the language in which we want the data to be in",
194
+ "default":""
195
+ },
196
+ {
197
+ "name":"team",
198
+ "type":"NUMBER",
199
+ "description":"ID of a team in case we want only matches of a certain team",
200
+ "default":""
201
+ },
202
+ {
203
+ "name":"competition_id",
204
+ "type":"NUMBER",
205
+ "description":"ID of a competition in case we want matches only from a certain competition",
206
+ "default":""
207
+ },
208
+ {
209
+ "name":"page",
210
+ "type":"NUMBER",
211
+ "description":"Page number with matches as this endpoint uses pagination",
212
+ "default":""
213
+ },
214
+ {
215
+ "name":"to",
216
+ "type":"DATE (YYYY-MM-DD)",
217
+ "description":"Date until when we want to get matches",
218
+ "default":""
219
+ }
220
+ ],
221
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/scores/history.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
222
+ "statuscode":111,
223
+ "body":"",
224
+ "headers":"",
225
+ "schema":""
226
+ },
227
+ {
228
+ "name":"Head2Head Team Comparison",
229
+ "url":"https://live-score-api.p.rapidapi.com/teams/head2head.json",
230
+ "description":"Comparing 2 teams based on their recent performances",
231
+ "method":"GET",
232
+ "required_parameters":[
233
+ {
234
+ "name":"team2_id",
235
+ "type":"NUMBER",
236
+ "description":"The id of the second team that we are comparing",
237
+ "default":"21"
238
+ },
239
+ {
240
+ "name":"team1_id",
241
+ "type":"NUMBER",
242
+ "description":"The id of the team that we want to compare",
243
+ "default":"27"
244
+ }
245
+ ],
246
+ "optional_parameters":[
247
+ {
248
+ "name":"lang",
249
+ "type":"STRING",
250
+ "description":"2 letter iso code in which we want the data in",
251
+ "default":""
252
+ }
253
+ ],
254
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/teams/head2head.json\"\nquerystring = {\"team2_id\": team2_id, \"team1_id\": team1_id}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
255
+ "statuscode":111,
256
+ "body":"",
257
+ "headers":"",
258
+ "schema":""
259
+ },
260
+ {
261
+ "name":"League Standings",
262
+ "url":"https://live-score-api.p.rapidapi.com/leagues/table.json",
263
+ "description":"Getting the classification table of a competition",
264
+ "method":"GET",
265
+ "required_parameters":[
266
+ {
267
+ "name":"season",
268
+ "type":"NUMBER",
269
+ "description":"The season for which we want it",
270
+ "default":"4"
271
+ },
272
+ {
273
+ "name":"competition_id",
274
+ "type":"NUMBER",
275
+ "description":"The id of the competition which standings we want",
276
+ "default":"2"
277
+ }
278
+ ],
279
+ "optional_parameters":[
280
+ {
281
+ "name":"group",
282
+ "type":"STRING",
283
+ "description":"The id of a specific group in case, the competition has several groups like the Champions League",
284
+ "default":""
285
+ },
286
+ {
287
+ "name":"lang",
288
+ "type":"STRING",
289
+ "description":"2 letter ISO code of the language in which we want the data in",
290
+ "default":""
291
+ }
292
+ ],
293
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/leagues/table.json\"\nquerystring = {\"season\": season, \"competition_id\": competition_id}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
294
+ "statuscode":111,
295
+ "body":"",
296
+ "headers":"",
297
+ "schema":""
298
+ },
299
+ {
300
+ "name":"Federations List",
301
+ "url":"https://live-score-api.p.rapidapi.com/federations/list.json",
302
+ "description":"Getting the list of the federations AFC, CAF, CONMEBOL, UEFA and more",
303
+ "method":"GET",
304
+ "required_parameters":[],
305
+ "optional_parameters":[],
306
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/federations/list.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
307
+ "statuscode":111,
308
+ "body":"",
309
+ "headers":"",
310
+ "schema":""
311
+ },
312
+ {
313
+ "name":"Teams list",
314
+ "url":"https://live-score-api.p.rapidapi.com/teams/list.json",
315
+ "description":"Getting a list of the teams from our database",
316
+ "method":"GET",
317
+ "required_parameters":[],
318
+ "optional_parameters":[
319
+ {
320
+ "name":"size",
321
+ "type":"NUMBER",
322
+ "description":"Between 1 and 100, the number of teams per page",
323
+ "default":""
324
+ },
325
+ {
326
+ "name":"page",
327
+ "type":"NUMBER",
328
+ "description":"The number of page, as this endpoint uses pagination",
329
+ "default":""
330
+ },
331
+ {
332
+ "name":"country_id",
333
+ "type":"NUMBER",
334
+ "description":"ID of a country in case we want teams from only one country",
335
+ "default":""
336
+ },
337
+ {
338
+ "name":"federation_id",
339
+ "type":"NUMBER",
340
+ "description":"ID of a country in case we want teams from only one federation, these will be national teams",
341
+ "default":""
342
+ },
343
+ {
344
+ "name":"language",
345
+ "type":"STRING",
346
+ "description":"2 letter ISO of the language in which we want the data in",
347
+ "default":""
348
+ }
349
+ ],
350
+ "code":"import requests\n\nurl = \"https://live-score-api.p.rapidapi.com/teams/list.json\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-score-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
351
+ "statuscode":111,
352
+ "body":"",
353
+ "headers":"",
354
+ "schema":""
355
+ }
356
+ ]
357
+ }
toolbench/toolenv/tools/Sports/live_score_api/api.py ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def match_events(is_id: str='164008', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Getting match event like: goals, yellow and red cards and people related to them"
12
+ is_id: The id of the match which events we want to get
13
+
14
+ """
15
+ url = f"https://live-score-api.p.rapidapi.com/scores/events.json"
16
+ querystring = {}
17
+ if is_id:
18
+ querystring['id'] = is_id
19
+
20
+ headers = {
21
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
22
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
23
+ }
24
+
25
+
26
+ response = requests.get(url, headers=headers, params=querystring)
27
+ try:
28
+ observation = response.json()
29
+ except:
30
+ observation = response.text
31
+ return observation
32
+
33
+ def countries_list(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
34
+ """
35
+ "Getting the list of the countries that we have in our database"
36
+
37
+ """
38
+ url = f"https://live-score-api.p.rapidapi.com/countries/list.json"
39
+ querystring = {}
40
+
41
+ headers = {
42
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
43
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
44
+ }
45
+
46
+
47
+ response = requests.get(url, headers=headers, params=querystring)
48
+ try:
49
+ observation = response.json()
50
+ except:
51
+ observation = response.text
52
+ return observation
53
+
54
+ def competitions_list(federation_id: int=None, country_id: int=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
55
+ """
56
+ "Getting the list of all supported competitions"
57
+ federation_id: ID of a federation in case we want only competition from certain federation like UEFA or CONMEBOL
58
+ country_id: ID of a country in case we want only competition from certain country like Germany
59
+
60
+ """
61
+ url = f"https://live-score-api.p.rapidapi.com/competitions/list.json"
62
+ querystring = {}
63
+ if federation_id:
64
+ querystring['federation_id'] = federation_id
65
+ if country_id:
66
+ querystring['country_id'] = country_id
67
+
68
+ headers = {
69
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
70
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
71
+ }
72
+
73
+
74
+ response = requests.get(url, headers=headers, params=querystring)
75
+ try:
76
+ observation = response.json()
77
+ except:
78
+ observation = response.text
79
+ return observation
80
+
81
+ def livescores(competition_id: int=None, country: int=None, lang: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
82
+ """
83
+ "Using the API endpoint you get livescores for all current matches"
84
+ competition_id: The ID of the competition for which we want the results
85
+ country: The ID of the country for which we want the live scores
86
+ lang: 2 letter code of a language in which we want the team names (ar, ru...)
87
+
88
+ """
89
+ url = f"https://live-score-api.p.rapidapi.com/scores/live.json"
90
+ querystring = {}
91
+ if competition_id:
92
+ querystring['competition_id'] = competition_id
93
+ if country:
94
+ querystring['country'] = country
95
+ if lang:
96
+ querystring['lang'] = lang
97
+
98
+ headers = {
99
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
100
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
101
+ }
102
+
103
+
104
+ response = requests.get(url, headers=headers, params=querystring)
105
+ try:
106
+ observation = response.json()
107
+ except:
108
+ observation = response.text
109
+ return observation
110
+
111
+ def fixtures(page: int=None, competition_id: int=None, date: str=None, lang: str=None, round: str=None, team: int=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
112
+ """
113
+ "Getting list of scheduled games (calendar)"
114
+ page: The page with results, this endoint uses pagination
115
+ competition_id: The ID of a competition in case we want the fixtures for certain competition only
116
+ date: Filters the fixtures by the date when the matches are scheduled to be played
117
+ lang: 2 letter ISO code of the language in which the response data should be in
118
+ round: The round which fixtures we want it could be a number or code like QF, SF, R16
119
+ team: The ID of a team in case we want all the fixtures for a certain team
120
+
121
+ """
122
+ url = f"https://live-score-api.p.rapidapi.com/fixtures/matches.json"
123
+ querystring = {}
124
+ if page:
125
+ querystring['page'] = page
126
+ if competition_id:
127
+ querystring['competition_id'] = competition_id
128
+ if date:
129
+ querystring['date'] = date
130
+ if lang:
131
+ querystring['lang'] = lang
132
+ if round:
133
+ querystring['round'] = round
134
+ if team:
135
+ querystring['team'] = team
136
+
137
+ headers = {
138
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
139
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
140
+ }
141
+
142
+
143
+ response = requests.get(url, headers=headers, params=querystring)
144
+ try:
145
+ observation = response.json()
146
+ except:
147
+ observation = response.text
148
+ return observation
149
+
150
+ def match_statistics(match_id: int=172939, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
151
+ """
152
+ "Getting match statistics like: possession, offsides, corners and more"
153
+ match_id: The id of the match which events we are getting
154
+
155
+ """
156
+ url = f"https://live-score-api.p.rapidapi.com/matches/stats.json"
157
+ querystring = {}
158
+ if match_id:
159
+ querystring['match_id'] = match_id
160
+
161
+ headers = {
162
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
163
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
164
+ }
165
+
166
+
167
+ response = requests.get(url, headers=headers, params=querystring)
168
+ try:
169
+ observation = response.json()
170
+ except:
171
+ observation = response.text
172
+ return observation
173
+
174
+ def history(is_from: str=None, lang: str=None, team: int=None, competition_id: int=None, page: int=None, to: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
175
+ """
176
+ "Getting matches that have finished"
177
+ is_from: Date since when we want to get matches
178
+ lang: 2 letter ISO code of the language in which we want the data to be in
179
+ team: ID of a team in case we want only matches of a certain team
180
+ competition_id: ID of a competition in case we want matches only from a certain competition
181
+ page: Page number with matches as this endpoint uses pagination
182
+ to: Date until when we want to get matches
183
+
184
+ """
185
+ url = f"https://live-score-api.p.rapidapi.com/scores/history.json"
186
+ querystring = {}
187
+ if is_from:
188
+ querystring['from'] = is_from
189
+ if lang:
190
+ querystring['lang'] = lang
191
+ if team:
192
+ querystring['team'] = team
193
+ if competition_id:
194
+ querystring['competition_id'] = competition_id
195
+ if page:
196
+ querystring['page'] = page
197
+ if to:
198
+ querystring['to'] = to
199
+
200
+ headers = {
201
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
202
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
203
+ }
204
+
205
+
206
+ response = requests.get(url, headers=headers, params=querystring)
207
+ try:
208
+ observation = response.json()
209
+ except:
210
+ observation = response.text
211
+ return observation
212
+
213
+ def head2head_team_comparison(team2_id: int, team1_id: int, lang: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
214
+ """
215
+ "Comparing 2 teams based on their recent performances"
216
+ team2_id: The id of the second team that we are comparing
217
+ team1_id: The id of the team that we want to compare
218
+ lang: 2 letter iso code in which we want the data in
219
+
220
+ """
221
+ url = f"https://live-score-api.p.rapidapi.com/teams/head2head.json"
222
+ querystring = {'team2_id': team2_id, 'team1_id': team1_id, }
223
+ if lang:
224
+ querystring['lang'] = lang
225
+
226
+ headers = {
227
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
228
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
229
+ }
230
+
231
+
232
+ response = requests.get(url, headers=headers, params=querystring)
233
+ try:
234
+ observation = response.json()
235
+ except:
236
+ observation = response.text
237
+ return observation
238
+
239
+ def league_standings(season: int, competition_id: int, group: str=None, lang: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
240
+ """
241
+ "Getting the classification table of a competition"
242
+ season: The season for which we want it
243
+ competition_id: The id of the competition which standings we want
244
+ group: The id of a specific group in case, the competition has several groups like the Champions League
245
+ lang: 2 letter ISO code of the language in which we want the data in
246
+
247
+ """
248
+ url = f"https://live-score-api.p.rapidapi.com/leagues/table.json"
249
+ querystring = {'season': season, 'competition_id': competition_id, }
250
+ if group:
251
+ querystring['group'] = group
252
+ if lang:
253
+ querystring['lang'] = lang
254
+
255
+ headers = {
256
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
257
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
258
+ }
259
+
260
+
261
+ response = requests.get(url, headers=headers, params=querystring)
262
+ try:
263
+ observation = response.json()
264
+ except:
265
+ observation = response.text
266
+ return observation
267
+
268
+ def federations_list(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
269
+ """
270
+ "Getting the list of the federations AFC, CAF, CONMEBOL, UEFA and more"
271
+
272
+ """
273
+ url = f"https://live-score-api.p.rapidapi.com/federations/list.json"
274
+ querystring = {}
275
+
276
+ headers = {
277
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
278
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
279
+ }
280
+
281
+
282
+ response = requests.get(url, headers=headers, params=querystring)
283
+ try:
284
+ observation = response.json()
285
+ except:
286
+ observation = response.text
287
+ return observation
288
+
289
+ def teams_list(size: int=None, page: int=None, country_id: int=None, federation_id: int=None, language: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
290
+ """
291
+ "Getting a list of the teams from our database"
292
+ size: Between 1 and 100, the number of teams per page
293
+ page: The number of page, as this endpoint uses pagination
294
+ country_id: ID of a country in case we want teams from only one country
295
+ federation_id: ID of a country in case we want teams from only one federation, these will be national teams
296
+ language: 2 letter ISO of the language in which we want the data in
297
+
298
+ """
299
+ url = f"https://live-score-api.p.rapidapi.com/teams/list.json"
300
+ querystring = {}
301
+ if size:
302
+ querystring['size'] = size
303
+ if page:
304
+ querystring['page'] = page
305
+ if country_id:
306
+ querystring['country_id'] = country_id
307
+ if federation_id:
308
+ querystring['federation_id'] = federation_id
309
+ if language:
310
+ querystring['language'] = language
311
+
312
+ headers = {
313
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
314
+ "X-RapidAPI-Host": "live-score-api.p.rapidapi.com"
315
+ }
316
+
317
+
318
+ response = requests.get(url, headers=headers, params=querystring)
319
+ try:
320
+ observation = response.json()
321
+ except:
322
+ observation = response.text
323
+ return observation
324
+
toolbench/toolenv/tools/Sports/live_sports/api.py ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_detailed_news(news_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get news with proper body with specific news id."
12
+
13
+ """
14
+ url = f"https://live-sports.p.rapidapi.com/news/details/{news_id}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "live-sports.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def get_list_of_news(category: str=None, page: int=1, tag: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Get list of news.
33
+ If you want to filter using tags or category, Please pass the category string or tag string.
34
+ Page no is required for pagination. Default page no is 1."
35
+
36
+ """
37
+ url = f"https://live-sports.p.rapidapi.com/news/news-list"
38
+ querystring = {}
39
+ if category:
40
+ querystring['category'] = category
41
+ if page:
42
+ querystring['page'] = page
43
+ if tag:
44
+ querystring['tag'] = tag
45
+
46
+ headers = {
47
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
48
+ "X-RapidAPI-Host": "live-sports.p.rapidapi.com"
49
+ }
50
+
51
+
52
+ response = requests.get(url, headers=headers, params=querystring)
53
+ try:
54
+ observation = response.json()
55
+ except:
56
+ observation = response.text
57
+ return observation
58
+
59
+ def get_latest_news_headlines(limit: int=10, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
60
+ """
61
+ "Get Hot News headlines. This is perfect for your homepage.
62
+
63
+ limit is the number of headlines you want to have in the response."
64
+
65
+ """
66
+ url = f"https://live-sports.p.rapidapi.com/news/headlines"
67
+ querystring = {}
68
+ if limit:
69
+ querystring['limit'] = limit
70
+
71
+ headers = {
72
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
73
+ "X-RapidAPI-Host": "live-sports.p.rapidapi.com"
74
+ }
75
+
76
+
77
+ response = requests.get(url, headers=headers, params=querystring)
78
+ try:
79
+ observation = response.json()
80
+ except:
81
+ observation = response.text
82
+ return observation
83
+
84
+ def get_upcoming_and_current_match_list(game_type: str='football', result_type: str='current', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
85
+ """
86
+ "get match lists
87
+
88
+ Args:
89
+ game_type (str, optional): football/cricket
90
+ result_type (str, optional): current"
91
+
92
+ """
93
+ url = f"https://live-sports.p.rapidapi.com/sports/matches"
94
+ querystring = {}
95
+ if game_type:
96
+ querystring['game_type'] = game_type
97
+ if result_type:
98
+ querystring['result_type'] = result_type
99
+
100
+ headers = {
101
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
102
+ "X-RapidAPI-Host": "live-sports.p.rapidapi.com"
103
+ }
104
+
105
+
106
+ response = requests.get(url, headers=headers, params=querystring)
107
+ try:
108
+ observation = response.json()
109
+ except:
110
+ observation = response.text
111
+ return observation
112
+
113
+ def get_live_links_for_a_game(game_id: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
114
+ """
115
+ "Get Live Links for a Specific Game.
116
+ Iframe links can be embedded on your website or mobile app."
117
+
118
+ """
119
+ url = f"https://live-sports.p.rapidapi.com/sports/live-links"
120
+ querystring = {'game_id': game_id, }
121
+
122
+ headers = {
123
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
124
+ "X-RapidAPI-Host": "live-sports.p.rapidapi.com"
125
+ }
126
+
127
+
128
+ response = requests.get(url, headers=headers, params=querystring)
129
+ try:
130
+ observation = response.json()
131
+ except:
132
+ observation = response.text
133
+ return observation
134
+
135
+ def get_top_upcoming_current_match_list(result_type: str='current', game_type: str='football', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
136
+ """
137
+ "Get Top Upcoming/Current Match List for your homepage.
138
+
139
+ Args:
140
+ game_type (str, optional): football/cricket
141
+ result_type (str, optional): current"
142
+
143
+ """
144
+ url = f"https://live-sports.p.rapidapi.com/sports/top-matches"
145
+ querystring = {}
146
+ if result_type:
147
+ querystring['result_type'] = result_type
148
+ if game_type:
149
+ querystring['game_type'] = game_type
150
+
151
+ headers = {
152
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
153
+ "X-RapidAPI-Host": "live-sports.p.rapidapi.com"
154
+ }
155
+
156
+
157
+ response = requests.get(url, headers=headers, params=querystring)
158
+ try:
159
+ observation = response.json()
160
+ except:
161
+ observation = response.text
162
+ return observation
163
+
toolbench/toolenv/tools/Sports/live_sports_news.json ADDED
@@ -0,0 +1,499 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Live Sports News",
3
+ "tool_description":"You can find live Cric-info sports news,",
4
+ "title":"Live Sports News",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/bakhtjamal789/api/live-sports-news/",
8
+ "host":"live-sports-news.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Get news by category id",
12
+ "url":"https://live-sports-news.p.rapidapi.com/news/{categoryid}",
13
+ "description":"Get news by category id",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"_categoryId",
18
+ "type":"NUMBER",
19
+ "description":"",
20
+ "default":"1"
21
+ }
22
+ ],
23
+ "optional_parameters":[
24
+ {
25
+ "name":"pageNo",
26
+ "type":"NUMBER",
27
+ "description":"",
28
+ "default":"2"
29
+ }
30
+ ],
31
+ "code":"import requests\n\nurl = \"https://live-sports-news.p.rapidapi.com/news/{categoryid}\"\nquerystring = {\"pageNo\": pageno}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-sports-news.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
32
+ "statuscode":200,
33
+ "body":{
34
+ "pageNo":"2",
35
+ "totalRecords":"137530",
36
+ "data":[
37
+ {
38
+ "title":"New South Wales narrowly save follow-on to ensure draw",
39
+ "linkUrl":"https://www.espncricinfo.com//series/sheffield-shield-2021-22-1270433/new-south-wales-vs-western-australia-19th-match-1270445/match-report-4",
40
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
41
+ "description":"Western Australia could still earn the right to host the Shield final win a win in their final match",
42
+ "postedOn":"18-Mar-2022",
43
+ "postedBy":"ESPNcricinfo staff and AAP"
44
+ },
45
+ {
46
+ "title":"Matthews, Fletcher break Bangladesh hearts",
47
+ "linkUrl":"https://www.espncricinfo.com//series/icc-women-s-world-cup-2021-22-1219028/bangladesh-women-vs-west-indies-women-17th-match-1243924/match-report",
48
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
49
+ "description":"Shemaine Campbelle too contributed a match-defining half-century as West Indies pull off third win",
50
+ "postedOn":"17-Mar-2022",
51
+ "postedBy":"S Sudarshanan"
52
+ },
53
+ {
54
+ "title":"Tom Alsop signs for Sussex on season-long loan",
55
+ "linkUrl":"https://www.espncricinfo.com//story/tom-alsop-signs-for-sussex-on-season-long-loan-1306086",
56
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
57
+ "description":"Former England Lions keeper-batter has struggled for runs at Hampshire",
58
+ "postedOn":"17-Mar-2022",
59
+ "postedBy":"ESPNcricinfo staff"
60
+ },
61
+ {
62
+ "title":"Ben Stokes century sets up England declaration before West Indies dig in",
63
+ "linkUrl":"https://www.espncricinfo.com//series/england-tour-of-west-indies-2021-22-1256716/west-indies-vs-england-2nd-test-1256727/match-report-2",
64
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
65
+ "description":"Joe Root passes 150, Matt Fisher claims maiden Test wicket with second ball",
66
+ "postedOn":"17-Mar-2022",
67
+ "postedBy":"Valkerie Baynes"
68
+ },
69
+ {
70
+ "title":"Mohammad Rizwan: 'Nauman Ali's 0* and my hundred were of the same value'",
71
+ "linkUrl":"https://www.espncricinfo.com//story/pak-vs-aus-2nd-test-mohammad-rizwan-nauman-ali-s-0-and-my-hundred-were-of-the-same-value-1306080",
72
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
73
+ "description":"The wicketkeeper-batter lauds Pakistan for earning a stunning draw against the top-ranked Test team",
74
+ "postedOn":"17-Mar-2022",
75
+ "postedBy":"ESPNcricinfo staff"
76
+ },
77
+ {
78
+ "title":"South Africa without IPL-bound players for Bangladesh Tests, Zondo gets maiden call-up",
79
+ "linkUrl":"https://www.espncricinfo.com//story/sa-vs-ban-2021-22-south-africa-without-ipl-bound-players-for-bangladesh-tests-khaya-zondo-gets-maiden-call-up-1306072",
80
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
81
+ "description":"\"On the eve of a one-day series, and with a Test squad due to be announced, we're still not sure what is happening,\" Bavuma said earlier in the day",
82
+ "postedOn":"17-Mar-2022",
83
+ "postedBy":"Sruthi Ravindranath"
84
+ },
85
+ {
86
+ "title":"Mohammad Haris, Asif Afridi in Pakistan white-ball squads for Australia series",
87
+ "linkUrl":"https://www.espncricinfo.com//story/mohammad-haris-asif-afridi-in-pakistan-white-ball-squads-for-australia-series-1306066",
88
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
89
+ "description":"Hasan Ali replaces Mohammad Hasnain, whose action was found to be illegal",
90
+ "postedOn":"17-Mar-2022",
91
+ "postedBy":"Umar Farooq"
92
+ },
93
+ {
94
+ "title":"Victoria eye run chase after Murphy stars again",
95
+ "linkUrl":"https://www.espncricinfo.com//series/sheffield-shield-2021-22-1270433/victoria-vs-tasmania-20th-match-1270440/match-report-3",
96
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
97
+ "description":"After declaring behind the home side's bowlers made regular inroads",
98
+ "postedOn":"17-Mar-2022",
99
+ "postedBy":"AAP"
100
+ },
101
+ {
102
+ "title":"Kelly's bursts gives Western Australia chance of pushing for victory",
103
+ "linkUrl":"https://www.espncricinfo.com//series/sheffield-shield-2021-22-1270433/new-south-wales-vs-western-australia-19th-match-1270445/match-report-3",
104
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
105
+ "description":"Jason Sangha and Chris Tremain gave New South Wales hope of saving the follow-on",
106
+ "postedOn":"17-Mar-2022",
107
+ "postedBy":"AAP"
108
+ },
109
+ {
110
+ "title":"Tahlia McGrath: 2017 World Cup defeat to India 'reshaped our values'",
111
+ "linkUrl":"https://www.espncricinfo.com//story/wwc-2022-aus-vs-ind-tahlia-mcgrath-2017-world-cup-defeat-to-india-reshaped-our-values-1306041",
112
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
113
+ "description":"Recent success against India unlikely to matter in Saturday's contest in Auckland, says star Australia allrounder",
114
+ "postedOn":"17-Mar-2022",
115
+ "postedBy":"Annesha Ghosh"
116
+ },
117
+ {
118
+ "title":"Bangladesh's chance to break new ground in South Africa",
119
+ "linkUrl":"https://www.espncricinfo.com//series/bangladesh-in-south-africa-2021-22-1277070/south-africa-vs-bangladesh-1st-odi-1277097/match-preview",
120
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
121
+ "description":"Can Tamim Iqbal's men win their first ever ODI in SA, or will Temba Bavuma's team hold on to a proud 20-year record?",
122
+ "postedOn":"17-Mar-2022",
123
+ "postedBy":"Mohammad Isam"
124
+ },
125
+ {
126
+ "title":"'Will put everything into next week' - Pat Cummins confident Australia's bowlers can go again",
127
+ "linkUrl":"https://www.espncricinfo.com//story/pak-vs-aus-2nd-test-will-put-everything-into-next-week-pat-cummins-confident-australia-bowlers-can-go-again-1305990",
128
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
129
+ "description":"After 172 overs in the field in Karachi, recovery will be vital ahead of the deciding Test",
130
+ "postedOn":"17-Mar-2022",
131
+ "postedBy":"Andrew McGlashan"
132
+ },
133
+ {
134
+ "title":"'It's the person Rod Marsh that I loved' - Dennis Lillee leads tributes at funeral ",
135
+ "linkUrl":"https://www.espncricinfo.com//story/it-s-the-person-rod-marsh-that-i-loved-dennis-lillee-leads-tributes-at-funeral-1305997",
136
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
137
+ "description":"The fast bowler was among friends and family to speak at the service at Adelaide Oval",
138
+ "postedOn":"17-Mar-2022",
139
+ "postedBy":"AAP"
140
+ },
141
+ {
142
+ "title":"Kapp does it again as South Africa trump New Zealand to make it four in four",
143
+ "linkUrl":"https://www.espncricinfo.com//series/icc-women-s-world-cup-2021-22-1219028/new-zealand-women-vs-south-africa-women-16th-match-1243923/match-report",
144
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
145
+ "description":"Amelia Kerr's three-four and Sophie Devine's 93 go in vain for New Zealand, who go down for the third time in the tournament",
146
+ "postedOn":"17-Mar-2022",
147
+ "postedBy":"Firdose Moonda"
148
+ },
149
+ {
150
+ "title":"Luke Wright steps down as Sussex T20 captain",
151
+ "linkUrl":"https://www.espncricinfo.com//story/luke-wright-steps-down-as-sussex-t20-captain-1305964",
152
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
153
+ "description":"Blast's all-time leading scorer quits captaincy after seven seasons in charge",
154
+ "postedOn":"16-Mar-2022",
155
+ "postedBy":"ESPNcricinfo staff"
156
+ },
157
+ {
158
+ "title":"DCMS chair weighs in as Yorkshire crisis deepens with potential resignation of Lord Patel",
159
+ "linkUrl":"https://www.espncricinfo.com//story/dcms-chair-weighs-in-as-yorkshire-crisis-deepens-with-potential-resignation-of-lord-patel-1305956",
160
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
161
+ "description":"Committee accused of pressurising ECB into suspending club from Test hosting",
162
+ "postedOn":"16-Mar-2022",
163
+ "postedBy":"ESPNcricinfo staff"
164
+ },
165
+ {
166
+ "title":"Babar Azam: 'This innings holds a lot of meaning for me'",
167
+ "linkUrl":"https://www.espncricinfo.com//story/pak-vs-aus-2nd-test-babar-azam-this-innings-holds-a-lot-of-meaning-for-me-1305944",
168
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
169
+ "description":"Pakistan's captain was thrilled by the crowd that showed up at the National Stadium to watch the final day unfold",
170
+ "postedOn":"16-Mar-2022",
171
+ "postedBy":"Danyal Rasool"
172
+ },
173
+ {
174
+ "title":"Daniel Sams joins Essex for Vitality T20 Blast",
175
+ "linkUrl":"https://www.espncricinfo.com//story/vitality-t20-blast-2022-daniel-sams-joins-essex-for-t20-blast-1305939",
176
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
177
+ "description":"Big-hitting left-arm seamer will arrive after completion of IPL stint",
178
+ "postedOn":"16-Mar-2022",
179
+ "postedBy":"ESPNcricinfo staff"
180
+ },
181
+ {
182
+ "title":"'If we took a couple of catches it might be a different scenario' - Pat Cummins rues missed chances",
183
+ "linkUrl":"https://www.espncricinfo.com//story/pak-vs-aus-2nd-test-2022-if-we-took-a-couple-of-catches-it-might-be-a-different-scenario-cummins-rues-drops-1305930",
184
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
185
+ "description":"Captain hails Swepson despite the debutant legspinner going wicketless and conceding 156 in the fourth innings",
186
+ "postedOn":"16-Mar-2022",
187
+ "postedBy":"Andrew McGlashan"
188
+ },
189
+ {
190
+ "title":"Hundred draft rescheduled to avoid clash with Shane Warne's funeral ",
191
+ "linkUrl":"https://www.espncricinfo.com//story/the-hundred-2022-draft-rescheduled-to-avoid-clash-with-shane-warnes-funeral-1305911",
192
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
193
+ "description":"Picks to be made behind closed doors in first week of April",
194
+ "postedOn":"16-Mar-2022",
195
+ "postedBy":"Matt Roller"
196
+ }
197
+ ]
198
+ },
199
+ "headers":{
200
+ "access-control-allow-credentials":"true",
201
+ "access-control-allow-origin":"*",
202
+ "connection":"keep-alive",
203
+ "content-length":"9107",
204
+ "content-type":"application/json; charset=utf-8",
205
+ "date":"Sat, 19 Mar 2022 16:13:38 GMT",
206
+ "etag":"W/\"2393-wpOZ8saddP2AZSiikGe92MNMA+o\"",
207
+ "server":"RapidAPI-1.2.8",
208
+ "via":"1.1 vegur",
209
+ "x-powered-by":"Express",
210
+ "x-rapidapi-region":"AWS - ap-southeast-1",
211
+ "x-rapidapi-version":"1.2.8"
212
+ },
213
+ "schema":{}
214
+ },
215
+ {
216
+ "name":"Get all news",
217
+ "url":"https://live-sports-news.p.rapidapi.com/news",
218
+ "description":"Get all news",
219
+ "method":"GET",
220
+ "required_parameters":[],
221
+ "optional_parameters":[
222
+ {
223
+ "name":"pageNo",
224
+ "type":"NUMBER",
225
+ "description":"",
226
+ "default":"2"
227
+ }
228
+ ],
229
+ "code":"import requests\n\nurl = \"https://live-sports-news.p.rapidapi.com/news\"\nquerystring = {\"pageNo\": pageno}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-sports-news.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
230
+ "statuscode":200,
231
+ "body":{
232
+ "pageNo":"2",
233
+ "totalRecords":"137530",
234
+ "data":[
235
+ {
236
+ "title":"New South Wales narrowly save follow-on to ensure draw",
237
+ "linkUrl":"https://www.espncricinfo.com//series/sheffield-shield-2021-22-1270433/new-south-wales-vs-western-australia-19th-match-1270445/match-report-4",
238
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
239
+ "description":"Western Australia could still earn the right to host the Shield final win a win in their final match",
240
+ "postedOn":"18-Mar-2022",
241
+ "postedBy":"ESPNcricinfo staff and AAP"
242
+ },
243
+ {
244
+ "title":"Matthews, Fletcher break Bangladesh hearts",
245
+ "linkUrl":"https://www.espncricinfo.com//series/icc-women-s-world-cup-2021-22-1219028/bangladesh-women-vs-west-indies-women-17th-match-1243924/match-report",
246
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
247
+ "description":"Shemaine Campbelle too contributed a match-defining half-century as West Indies pull off third win",
248
+ "postedOn":"17-Mar-2022",
249
+ "postedBy":"S Sudarshanan"
250
+ },
251
+ {
252
+ "title":"Tom Alsop signs for Sussex on season-long loan",
253
+ "linkUrl":"https://www.espncricinfo.com//story/tom-alsop-signs-for-sussex-on-season-long-loan-1306086",
254
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
255
+ "description":"Former England Lions keeper-batter has struggled for runs at Hampshire",
256
+ "postedOn":"17-Mar-2022",
257
+ "postedBy":"ESPNcricinfo staff"
258
+ },
259
+ {
260
+ "title":"Ben Stokes century sets up England declaration before West Indies dig in",
261
+ "linkUrl":"https://www.espncricinfo.com//series/england-tour-of-west-indies-2021-22-1256716/west-indies-vs-england-2nd-test-1256727/match-report-2",
262
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
263
+ "description":"Joe Root passes 150, Matt Fisher claims maiden Test wicket with second ball",
264
+ "postedOn":"17-Mar-2022",
265
+ "postedBy":"Valkerie Baynes"
266
+ },
267
+ {
268
+ "title":"Mohammad Rizwan: 'Nauman Ali's 0* and my hundred were of the same value'",
269
+ "linkUrl":"https://www.espncricinfo.com//story/pak-vs-aus-2nd-test-mohammad-rizwan-nauman-ali-s-0-and-my-hundred-were-of-the-same-value-1306080",
270
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
271
+ "description":"The wicketkeeper-batter lauds Pakistan for earning a stunning draw against the top-ranked Test team",
272
+ "postedOn":"17-Mar-2022",
273
+ "postedBy":"ESPNcricinfo staff"
274
+ },
275
+ {
276
+ "title":"South Africa without IPL-bound players for Bangladesh Tests, Zondo gets maiden call-up",
277
+ "linkUrl":"https://www.espncricinfo.com//story/sa-vs-ban-2021-22-south-africa-without-ipl-bound-players-for-bangladesh-tests-khaya-zondo-gets-maiden-call-up-1306072",
278
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
279
+ "description":"\"On the eve of a one-day series, and with a Test squad due to be announced, we're still not sure what is happening,\" Bavuma said earlier in the day",
280
+ "postedOn":"17-Mar-2022",
281
+ "postedBy":"Sruthi Ravindranath"
282
+ },
283
+ {
284
+ "title":"Mohammad Haris, Asif Afridi in Pakistan white-ball squads for Australia series",
285
+ "linkUrl":"https://www.espncricinfo.com//story/mohammad-haris-asif-afridi-in-pakistan-white-ball-squads-for-australia-series-1306066",
286
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
287
+ "description":"Hasan Ali replaces Mohammad Hasnain, whose action was found to be illegal",
288
+ "postedOn":"17-Mar-2022",
289
+ "postedBy":"Umar Farooq"
290
+ },
291
+ {
292
+ "title":"Victoria eye run chase after Murphy stars again",
293
+ "linkUrl":"https://www.espncricinfo.com//series/sheffield-shield-2021-22-1270433/victoria-vs-tasmania-20th-match-1270440/match-report-3",
294
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
295
+ "description":"After declaring behind the home side's bowlers made regular inroads",
296
+ "postedOn":"17-Mar-2022",
297
+ "postedBy":"AAP"
298
+ },
299
+ {
300
+ "title":"Kelly's bursts gives Western Australia chance of pushing for victory",
301
+ "linkUrl":"https://www.espncricinfo.com//series/sheffield-shield-2021-22-1270433/new-south-wales-vs-western-australia-19th-match-1270445/match-report-3",
302
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
303
+ "description":"Jason Sangha and Chris Tremain gave New South Wales hope of saving the follow-on",
304
+ "postedOn":"17-Mar-2022",
305
+ "postedBy":"AAP"
306
+ },
307
+ {
308
+ "title":"Tahlia McGrath: 2017 World Cup defeat to India 'reshaped our values'",
309
+ "linkUrl":"https://www.espncricinfo.com//story/wwc-2022-aus-vs-ind-tahlia-mcgrath-2017-world-cup-defeat-to-india-reshaped-our-values-1306041",
310
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
311
+ "description":"Recent success against India unlikely to matter in Saturday's contest in Auckland, says star Australia allrounder",
312
+ "postedOn":"17-Mar-2022",
313
+ "postedBy":"Annesha Ghosh"
314
+ },
315
+ {
316
+ "title":"Bangladesh's chance to break new ground in South Africa",
317
+ "linkUrl":"https://www.espncricinfo.com//series/bangladesh-in-south-africa-2021-22-1277070/south-africa-vs-bangladesh-1st-odi-1277097/match-preview",
318
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
319
+ "description":"Can Tamim Iqbal's men win their first ever ODI in SA, or will Temba Bavuma's team hold on to a proud 20-year record?",
320
+ "postedOn":"17-Mar-2022",
321
+ "postedBy":"Mohammad Isam"
322
+ },
323
+ {
324
+ "title":"'Will put everything into next week' - Pat Cummins confident Australia's bowlers can go again",
325
+ "linkUrl":"https://www.espncricinfo.com//story/pak-vs-aus-2nd-test-will-put-everything-into-next-week-pat-cummins-confident-australia-bowlers-can-go-again-1305990",
326
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
327
+ "description":"After 172 overs in the field in Karachi, recovery will be vital ahead of the deciding Test",
328
+ "postedOn":"17-Mar-2022",
329
+ "postedBy":"Andrew McGlashan"
330
+ },
331
+ {
332
+ "title":"'It's the person Rod Marsh that I loved' - Dennis Lillee leads tributes at funeral ",
333
+ "linkUrl":"https://www.espncricinfo.com//story/it-s-the-person-rod-marsh-that-i-loved-dennis-lillee-leads-tributes-at-funeral-1305997",
334
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
335
+ "description":"The fast bowler was among friends and family to speak at the service at Adelaide Oval",
336
+ "postedOn":"17-Mar-2022",
337
+ "postedBy":"AAP"
338
+ },
339
+ {
340
+ "title":"Kapp does it again as South Africa trump New Zealand to make it four in four",
341
+ "linkUrl":"https://www.espncricinfo.com//series/icc-women-s-world-cup-2021-22-1219028/new-zealand-women-vs-south-africa-women-16th-match-1243923/match-report",
342
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
343
+ "description":"Amelia Kerr's three-four and Sophie Devine's 93 go in vain for New Zealand, who go down for the third time in the tournament",
344
+ "postedOn":"17-Mar-2022",
345
+ "postedBy":"Firdose Moonda"
346
+ },
347
+ {
348
+ "title":"Luke Wright steps down as Sussex T20 captain",
349
+ "linkUrl":"https://www.espncricinfo.com//story/luke-wright-steps-down-as-sussex-t20-captain-1305964",
350
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
351
+ "description":"Blast's all-time leading scorer quits captaincy after seven seasons in charge",
352
+ "postedOn":"16-Mar-2022",
353
+ "postedBy":"ESPNcricinfo staff"
354
+ },
355
+ {
356
+ "title":"DCMS chair weighs in as Yorkshire crisis deepens with potential resignation of Lord Patel",
357
+ "linkUrl":"https://www.espncricinfo.com//story/dcms-chair-weighs-in-as-yorkshire-crisis-deepens-with-potential-resignation-of-lord-patel-1305956",
358
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
359
+ "description":"Committee accused of pressurising ECB into suspending club from Test hosting",
360
+ "postedOn":"16-Mar-2022",
361
+ "postedBy":"ESPNcricinfo staff"
362
+ },
363
+ {
364
+ "title":"Babar Azam: 'This innings holds a lot of meaning for me'",
365
+ "linkUrl":"https://www.espncricinfo.com//story/pak-vs-aus-2nd-test-babar-azam-this-innings-holds-a-lot-of-meaning-for-me-1305944",
366
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
367
+ "description":"Pakistan's captain was thrilled by the crowd that showed up at the National Stadium to watch the final day unfold",
368
+ "postedOn":"16-Mar-2022",
369
+ "postedBy":"Danyal Rasool"
370
+ },
371
+ {
372
+ "title":"Daniel Sams joins Essex for Vitality T20 Blast",
373
+ "linkUrl":"https://www.espncricinfo.com//story/vitality-t20-blast-2022-daniel-sams-joins-essex-for-t20-blast-1305939",
374
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
375
+ "description":"Big-hitting left-arm seamer will arrive after completion of IPL stint",
376
+ "postedOn":"16-Mar-2022",
377
+ "postedBy":"ESPNcricinfo staff"
378
+ },
379
+ {
380
+ "title":"'If we took a couple of catches it might be a different scenario' - Pat Cummins rues missed chances",
381
+ "linkUrl":"https://www.espncricinfo.com//story/pak-vs-aus-2nd-test-2022-if-we-took-a-couple-of-catches-it-might-be-a-different-scenario-cummins-rues-drops-1305930",
382
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
383
+ "description":"Captain hails Swepson despite the debutant legspinner going wicketless and conceding 156 in the fourth innings",
384
+ "postedOn":"16-Mar-2022",
385
+ "postedBy":"Andrew McGlashan"
386
+ },
387
+ {
388
+ "title":"Hundred draft rescheduled to avoid clash with Shane Warne's funeral ",
389
+ "linkUrl":"https://www.espncricinfo.com//story/the-hundred-2022-draft-rescheduled-to-avoid-clash-with-shane-warnes-funeral-1305911",
390
+ "imageUrl":"https://wassets.hscicdn.com/static/images/lazyimage.svg",
391
+ "description":"Picks to be made behind closed doors in first week of April",
392
+ "postedOn":"16-Mar-2022",
393
+ "postedBy":"Matt Roller"
394
+ }
395
+ ]
396
+ },
397
+ "headers":{
398
+ "access-control-allow-credentials":"true",
399
+ "access-control-allow-origin":"*",
400
+ "connection":"keep-alive",
401
+ "content-length":"9107",
402
+ "content-type":"application/json; charset=utf-8",
403
+ "date":"Sat, 19 Mar 2022 16:10:03 GMT",
404
+ "etag":"W/\"2393-wpOZ8saddP2AZSiikGe92MNMA+o\"",
405
+ "server":"RapidAPI-1.2.8",
406
+ "via":"1.1 vegur",
407
+ "x-powered-by":"Express",
408
+ "x-rapidapi-region":"AWS - ap-southeast-1",
409
+ "x-rapidapi-version":"1.2.8"
410
+ },
411
+ "schema":{}
412
+ },
413
+ {
414
+ "name":"Get category by id",
415
+ "url":"https://live-sports-news.p.rapidapi.com/categories/{id}",
416
+ "description":"Get category by id",
417
+ "method":"GET",
418
+ "required_parameters":[
419
+ {
420
+ "name":"_id",
421
+ "type":"string",
422
+ "description":"",
423
+ "default":"1"
424
+ }
425
+ ],
426
+ "optional_parameters":[],
427
+ "code":"import requests\n\nurl = \"https://live-sports-news.p.rapidapi.com/categories/{id}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-sports-news.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
428
+ "statuscode":200,
429
+ "body":[
430
+ {
431
+ "id":"1",
432
+ "category":"latest"
433
+ }
434
+ ],
435
+ "headers":{
436
+ "access-control-allow-credentials":"true",
437
+ "access-control-allow-origin":"*",
438
+ "connection":"keep-alive",
439
+ "content-length":"32",
440
+ "content-type":"application/json; charset=utf-8",
441
+ "date":"Sat, 19 Mar 2022 15:55:42 GMT",
442
+ "etag":"W/\"20-3/3WBPne45bEcDMGSPmrt9LBDws\"",
443
+ "server":"RapidAPI-1.2.8",
444
+ "via":"1.1 vegur",
445
+ "x-powered-by":"Express",
446
+ "x-rapidapi-region":"AWS - ap-southeast-1",
447
+ "x-rapidapi-version":"1.2.8"
448
+ },
449
+ "schema":{}
450
+ },
451
+ {
452
+ "name":"Get news categories",
453
+ "url":"https://live-sports-news.p.rapidapi.com/categories",
454
+ "description":"Get news categories",
455
+ "method":"GET",
456
+ "required_parameters":[],
457
+ "optional_parameters":[],
458
+ "code":"import requests\n\nurl = \"https://live-sports-news.p.rapidapi.com/categories\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"live-sports-news.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
459
+ "statuscode":200,
460
+ "body":[
461
+ {
462
+ "id":"1",
463
+ "category":"latest"
464
+ },
465
+ {
466
+ "id":"2",
467
+ "category":"covid"
468
+ },
469
+ {
470
+ "id":"3",
471
+ "category":"tampering"
472
+ },
473
+ {
474
+ "id":"4",
475
+ "category":"tech"
476
+ },
477
+ {
478
+ "id":"5",
479
+ "category":"racism"
480
+ }
481
+ ],
482
+ "headers":{
483
+ "access-control-allow-credentials":"true",
484
+ "access-control-allow-origin":"*",
485
+ "connection":"keep-alive",
486
+ "content-length":"156",
487
+ "content-type":"application/json; charset=utf-8",
488
+ "date":"Sat, 19 Mar 2022 15:51:43 GMT",
489
+ "etag":"W/\"9c-WSuqQSIfaS2TNIHxOrttUtHD76s\"",
490
+ "server":"RapidAPI-1.2.8",
491
+ "via":"1.1 vegur",
492
+ "x-powered-by":"Express",
493
+ "x-rapidapi-region":"AWS - ap-southeast-1",
494
+ "x-rapidapi-version":"1.2.8"
495
+ },
496
+ "schema":{}
497
+ }
498
+ ]
499
+ }
toolbench/toolenv/tools/Sports/live_sports_news/api.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_news_by_category_id(categoryid: int, pageno: int=2, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get news by category id"
12
+
13
+ """
14
+ url = f"https://live-sports-news.p.rapidapi.com/news/{categoryid}"
15
+ querystring = {}
16
+ if pageno:
17
+ querystring['pageNo'] = pageno
18
+
19
+ headers = {
20
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
21
+ "X-RapidAPI-Host": "live-sports-news.p.rapidapi.com"
22
+ }
23
+
24
+
25
+ response = requests.get(url, headers=headers, params=querystring)
26
+ try:
27
+ observation = response.json()
28
+ except:
29
+ observation = response.text
30
+ return observation
31
+
32
+ def get_all_news(pageno: int=2, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
33
+ """
34
+ "Get all news"
35
+
36
+ """
37
+ url = f"https://live-sports-news.p.rapidapi.com/news"
38
+ querystring = {}
39
+ if pageno:
40
+ querystring['pageNo'] = pageno
41
+
42
+ headers = {
43
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
44
+ "X-RapidAPI-Host": "live-sports-news.p.rapidapi.com"
45
+ }
46
+
47
+
48
+ response = requests.get(url, headers=headers, params=querystring)
49
+ try:
50
+ observation = response.json()
51
+ except:
52
+ observation = response.text
53
+ return observation
54
+
55
+ def get_category_by_id(is_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
56
+ """
57
+ "Get category by id"
58
+
59
+ """
60
+ url = f"https://live-sports-news.p.rapidapi.com/categories/{is_id}"
61
+ querystring = {}
62
+
63
+ headers = {
64
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
65
+ "X-RapidAPI-Host": "live-sports-news.p.rapidapi.com"
66
+ }
67
+
68
+
69
+ response = requests.get(url, headers=headers, params=querystring)
70
+ try:
71
+ observation = response.json()
72
+ except:
73
+ observation = response.text
74
+ return observation
75
+
76
+ def get_news_categories(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
77
+ """
78
+ "Get news categories"
79
+
80
+ """
81
+ url = f"https://live-sports-news.p.rapidapi.com/categories"
82
+ querystring = {}
83
+
84
+ headers = {
85
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
86
+ "X-RapidAPI-Host": "live-sports-news.p.rapidapi.com"
87
+ }
88
+
89
+
90
+ response = requests.get(url, headers=headers, params=querystring)
91
+ try:
92
+ observation = response.json()
93
+ except:
94
+ observation = response.text
95
+ return observation
96
+
toolbench/toolenv/tools/Sports/live_sports_odds.json ADDED
The diff for this file is too large to render. See raw diff
 
toolbench/toolenv/tools/Sports/live_sports_odds/api.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def v4_sports_sport_odds(sport: str, regions: str, oddsformat: str='decimal', markets: str='h2h,spreads', dateformat: str='iso', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Returns list of live and upcoming games for a given sport, showing bookmaker odds for the specified region and markets. Set the `sport` to a `sport_key` from the /sports endpoint. Alternatively if `sport=upcoming`, it will return a list of the next 8 upcoming games across all sports, as well as any live games. For more info, see [list of available sports](https://the-odds-api.com/sports-odds-data/sports-apis.html) and [list of available bookmakers](https://the-odds-api.com/sports-odds-data/bookmaker-apis.html)."
12
+ sport: sport key for which to return games and odds
13
+ regions: Determines which bookmakers appear in the response. Can be a comma delimited list of regions. Each region will count as 1 request against the usage quota for each market. Most use cases will only need to specify one region. For a list of bookmakers by region, see https://the-odds-api.com/sports-odds-data/bookmaker-apis.html
14
+ oddsformat: Format of returned odds.
15
+ markets: The odds market to return. Can be a comma delimited list of odds markets. Defaults to h2h (head to head / moneyline). Outrights only avaialable for select sports. Note each market counts as 1 request against the usage quota.
16
+ dateformat: Format of returned timestamps. Can be iso (ISO8601) or unix timestamp (seconds since epoch)
17
+
18
+ """
19
+ url = f"https://odds.p.rapidapi.com/v4/sports/{sport}/odds"
20
+ querystring = {'regions': regions, }
21
+ if oddsformat:
22
+ querystring['oddsFormat'] = oddsformat
23
+ if markets:
24
+ querystring['markets'] = markets
25
+ if dateformat:
26
+ querystring['dateFormat'] = dateformat
27
+
28
+ headers = {
29
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
30
+ "X-RapidAPI-Host": "odds.p.rapidapi.com"
31
+ }
32
+
33
+
34
+ response = requests.get(url, headers=headers, params=querystring)
35
+ try:
36
+ observation = response.json()
37
+ except:
38
+ observation = response.text
39
+ return observation
40
+
41
+ def v4_sports_sport_scores(sport: str, daysfrom: int=3, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
42
+ """
43
+ "Returns list of live and upcoming games for a given sport, and optionally recently completed games. Live and completed games will contain scores. **Currently in beta** and only available for selected sports. For more info, see the [list of available sports](https://the-odds-api.com/sports-odds-data/sports-apis.html)"
44
+ sport: sport key for which to return games and odds
45
+ daysfrom: The number of days in the past from which to return completed games. Valid values are integers from `1` to `3`. If this field is missing, only live and upcoming games are returned.
46
+
47
+ """
48
+ url = f"https://odds.p.rapidapi.com/v4/sports/{sport}/scores"
49
+ querystring = {}
50
+ if daysfrom:
51
+ querystring['daysFrom'] = daysfrom
52
+
53
+ headers = {
54
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
55
+ "X-RapidAPI-Host": "odds.p.rapidapi.com"
56
+ }
57
+
58
+
59
+ response = requests.get(url, headers=headers, params=querystring)
60
+ try:
61
+ observation = response.json()
62
+ except:
63
+ observation = response.text
64
+ return observation
65
+
66
+ def v4_sports(all: bool=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
67
+ """
68
+ "Returns a list of available sports and tournaments. Use the `sports_key` in requests for /odds and /scores endpoints."
69
+ all: When excluded, only recently updated (in-season) sports appear. Include this paramter to see all available sports
70
+
71
+ """
72
+ url = f"https://odds.p.rapidapi.com/v4/sports"
73
+ querystring = {}
74
+ if all:
75
+ querystring['all'] = all
76
+
77
+ headers = {
78
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
79
+ "X-RapidAPI-Host": "odds.p.rapidapi.com"
80
+ }
81
+
82
+
83
+ response = requests.get(url, headers=headers, params=querystring)
84
+ try:
85
+ observation = response.json()
86
+ except:
87
+ observation = response.text
88
+ return observation
89
+
toolbench/toolenv/tools/Sports/liverpool_latest_articles.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Liverpool Latest Articles",
3
+ "tool_description":"An API containing Liverpool F.C articles from The Guardian, The Times, Telegraph, BBC, Standard and The Sun newspapers football section.",
4
+ "title":"Liverpool Latest Articles",
5
+ "pricing":"FREE",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":388,
9
+ "avgSuccessRate":0,
10
+ "popularityScore":0,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/tev-code/api/liverpool-latest-articles/",
14
+ "host":"liverpool-latest-articles.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Get Individual News Source News",
18
+ "url":"https://liverpool-latest-articles.p.rapidapi.com/football/{newspaperid}",
19
+ "description":"Get Liverpool F.C news from specific newspaper.",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"newspaperId",
24
+ "type":"string",
25
+ "description":"",
26
+ "default":"thegaurdian"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://liverpool-latest-articles.p.rapidapi.com/football/{newspaperid}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"liverpool-latest-articles.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ },
36
+ {
37
+ "name":"Get all Liverpool F.C news",
38
+ "url":"https://liverpool-latest-articles.p.rapidapi.com/football",
39
+ "description":"This endpoint will provide you with all Liverpool F.C news from 5 of the most popular U.K newspapers.",
40
+ "method":"GET",
41
+ "required_parameters":[],
42
+ "optional_parameters":[],
43
+ "code":"import requests\n\nurl = \"https://liverpool-latest-articles.p.rapidapi.com/football\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"liverpool-latest-articles.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
44
+ "statuscode":200,
45
+ "body":{
46
+ "key1":"value",
47
+ "key2":"value"
48
+ },
49
+ "headers":{},
50
+ "schema":{}
51
+ }
52
+ ]
53
+ }