rustat-python-api 0.4.10__tar.gz → 0.4.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rustat-python-api-0.4.10/rustat_python_api.egg-info → rustat-python-api-0.4.12}/PKG-INFO +1 -1
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api/parser.py +21 -2
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12/rustat_python_api.egg-info}/PKG-INFO +1 -1
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/setup.py +1 -1
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/LICENSE +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/README.md +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/pyproject.toml +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api/__init__.py +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api/config.py +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api/models_api.py +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api/processing.py +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api/urls.py +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api.egg-info/SOURCES.txt +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api.egg-info/dependency_links.txt +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api.egg-info/requires.txt +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api.egg-info/top_level.txt +0 -0
- {rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/setup.cfg +0 -0
|
@@ -97,7 +97,7 @@ class RuStatParser:
|
|
|
97
97
|
self,
|
|
98
98
|
match_id: int,
|
|
99
99
|
process: bool = True,
|
|
100
|
-
return_subs: bool =
|
|
100
|
+
return_subs: bool = True
|
|
101
101
|
) -> pd.DataFrame | None | tuple[pd.DataFrame, pd.DataFrame]:
|
|
102
102
|
data = self.resp2data(
|
|
103
103
|
self.urls["events"].format(
|
|
@@ -133,7 +133,7 @@ class RuStatParser:
|
|
|
133
133
|
|
|
134
134
|
df = processing(df)
|
|
135
135
|
|
|
136
|
-
return df, subs if return_subs else df
|
|
136
|
+
return (df, subs) if return_subs else df
|
|
137
137
|
|
|
138
138
|
def get_tracking(self, match_id: int) -> pd.DataFrame | None:
|
|
139
139
|
data = self.resp2data(
|
|
@@ -206,3 +206,22 @@ class RuStatParser:
|
|
|
206
206
|
return {}
|
|
207
207
|
|
|
208
208
|
return data['data']['team']
|
|
209
|
+
|
|
210
|
+
def get_players_minutes_in_match(self, match_id: int) -> dict:
|
|
211
|
+
data = self.get_players_match_stats(match_id)
|
|
212
|
+
|
|
213
|
+
if not data:
|
|
214
|
+
return {}
|
|
215
|
+
|
|
216
|
+
players_minutes = {}
|
|
217
|
+
|
|
218
|
+
for team_data in data:
|
|
219
|
+
for player_data in team_data['player']:
|
|
220
|
+
player_id = int(player_data['id'])
|
|
221
|
+
|
|
222
|
+
minutes = [float(metric['value']) for metric in player_data['param'] if metric['id'] == '288']
|
|
223
|
+
minutes = minutes[0] if minutes else 0
|
|
224
|
+
|
|
225
|
+
players_minutes[player_id] = minutes
|
|
226
|
+
|
|
227
|
+
return players_minutes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api.egg-info/requires.txt
RENAMED
|
File without changes
|
{rustat-python-api-0.4.10 → rustat-python-api-0.4.12}/rustat_python_api.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|