crawlora-sofascore 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,1816 @@
1
+ from __future__ import annotations
2
+
3
+ import sys
4
+ from typing import Any, Callable, Iterable, Iterator, Literal, Mapping, overload
5
+
6
+ if sys.version_info >= (3, 11):
7
+ from typing import NotRequired, Required, TypedDict, Unpack
8
+ else:
9
+ from typing_extensions import NotRequired, Required, TypedDict, Unpack
10
+
11
+ ResponseType = Literal["auto", "json", "text", "stream"]
12
+
13
+ class CrawloraError(Exception):
14
+ status: int
15
+ code: int | None
16
+ body: Any
17
+ raw_body: str
18
+ headers: Mapping[str, str]
19
+ request_id: str | None
20
+ def __init__(self, message: str, *, status: int = ..., code: int | None = ..., body: Any = ..., raw_body: str = ..., headers: Mapping[str, str] | None = ..., request_id: str | None = ..., cause: BaseException | None = ...) -> None: ...
21
+
22
+ class CrawloraClientError(CrawloraError): ...
23
+ class CrawloraServerError(CrawloraError): ...
24
+ class CrawloraNetworkError(CrawloraError): ...
25
+
26
+ class _RequestOptions(TypedDict, total=False):
27
+ _response_type: ResponseType
28
+ _timeout: float
29
+ _headers: Mapping[str, str]
30
+
31
+ ModelAppResponse = TypedDict('ModelAppResponse', {
32
+ 'code': NotRequired[int],
33
+ 'data': NotRequired[Any],
34
+ 'msg': NotRequired[Any],
35
+ }, total=False)
36
+
37
+ ModelSofascoreTournamentSeasonsResponseDoc = TypedDict('ModelSofascoreTournamentSeasonsResponseDoc', {
38
+ 'code': NotRequired[int],
39
+ 'data': NotRequired[ModelSofascoreTournamentSeasonsResponse],
40
+ 'msg': NotRequired[str],
41
+ }, total=False)
42
+
43
+ ModelSofascoreTournamentSeasonsResponse = TypedDict('ModelSofascoreTournamentSeasonsResponse', {
44
+ 'count': NotRequired[int],
45
+ 'fetched_at': NotRequired[str],
46
+ 'seasons': NotRequired[list[ModelSofascoreSeason]],
47
+ 'source_url': NotRequired[str],
48
+ 'tournament_id': NotRequired[int],
49
+ }, total=False)
50
+
51
+ ModelSofascoreSeason = TypedDict('ModelSofascoreSeason', {
52
+ 'id': NotRequired[int],
53
+ 'name': NotRequired[str],
54
+ 'year': NotRequired[str],
55
+ }, total=False)
56
+
57
+ ModelSofascoreTeamPlayersResponseDoc = TypedDict('ModelSofascoreTeamPlayersResponseDoc', {
58
+ 'code': NotRequired[int],
59
+ 'data': NotRequired[ModelSofascoreTeamPlayersResponse],
60
+ 'msg': NotRequired[str],
61
+ }, total=False)
62
+
63
+ ModelSofascoreTeamPlayersResponse = TypedDict('ModelSofascoreTeamPlayersResponse', {
64
+ 'count': NotRequired[int],
65
+ 'fetched_at': NotRequired[str],
66
+ 'players': NotRequired[list[ModelSofascoreSquadPlayer]],
67
+ 'source_url': NotRequired[str],
68
+ 'team_id': NotRequired[int],
69
+ }, total=False)
70
+
71
+ ModelSofascoreSquadPlayer = TypedDict('ModelSofascoreSquadPlayer', {
72
+ 'country': NotRequired[str],
73
+ 'date_of_birth': NotRequired[str],
74
+ 'height': NotRequired[int],
75
+ 'id': NotRequired[int],
76
+ 'jersey_number': NotRequired[str],
77
+ 'market_value': NotRequired[int],
78
+ 'market_value_currency': NotRequired[str],
79
+ 'name': NotRequired[str],
80
+ 'position': NotRequired[str],
81
+ 'preferred_foot': NotRequired[str],
82
+ 'short_name': NotRequired[str],
83
+ 'slug': NotRequired[str],
84
+ }, total=False)
85
+
86
+ ModelSofascoreTeamEventsResponseDoc = TypedDict('ModelSofascoreTeamEventsResponseDoc', {
87
+ 'code': NotRequired[int],
88
+ 'data': NotRequired[ModelSofascoreTeamEventsResponse],
89
+ 'msg': NotRequired[str],
90
+ }, total=False)
91
+
92
+ ModelSofascoreTeamEventsResponse = TypedDict('ModelSofascoreTeamEventsResponse', {
93
+ 'count': NotRequired[int],
94
+ 'direction': NotRequired[str],
95
+ 'events': NotRequired[list[ModelSofascoreEventSummary]],
96
+ 'fetched_at': NotRequired[str],
97
+ 'has_next_page': NotRequired[bool],
98
+ 'page': NotRequired[int],
99
+ 'source_url': NotRequired[str],
100
+ 'team_id': NotRequired[int],
101
+ }, total=False)
102
+
103
+ ModelSofascoreEventSummary = TypedDict('ModelSofascoreEventSummary', {
104
+ 'away_score': NotRequired[ModelSofascoreScoreLine],
105
+ 'away_team': NotRequired[ModelSofascoreTeamRef],
106
+ 'home_score': NotRequired[ModelSofascoreScoreLine],
107
+ 'home_team': NotRequired[ModelSofascoreTeamRef],
108
+ 'id': NotRequired[int],
109
+ 'slug': NotRequired[str],
110
+ 'start_time': NotRequired[str],
111
+ 'start_timestamp': NotRequired[int],
112
+ 'status': NotRequired[ModelSofascoreEventStatus],
113
+ 'tournament': NotRequired[ModelSofascoreTournamentRef],
114
+ 'winner_code': NotRequired[int],
115
+ }, total=False)
116
+
117
+ ModelSofascoreTournamentRef = TypedDict('ModelSofascoreTournamentRef', {
118
+ 'category': NotRequired[str],
119
+ 'id': NotRequired[int],
120
+ 'name': NotRequired[str],
121
+ 'slug': NotRequired[str],
122
+ 'unique_tournament_id': NotRequired[int],
123
+ 'unique_tournament_name': NotRequired[str],
124
+ }, total=False)
125
+
126
+ ModelSofascoreEventStatus = TypedDict('ModelSofascoreEventStatus', {
127
+ 'code': NotRequired[int],
128
+ 'description': NotRequired[str],
129
+ 'type': NotRequired[str],
130
+ }, total=False)
131
+
132
+ ModelSofascoreTeamRef = TypedDict('ModelSofascoreTeamRef', {
133
+ 'country': NotRequired[str],
134
+ 'id': NotRequired[int],
135
+ 'name': NotRequired[str],
136
+ 'national': NotRequired[bool],
137
+ 'short_name': NotRequired[str],
138
+ 'slug': NotRequired[str],
139
+ }, total=False)
140
+
141
+ ModelSofascoreScoreLine = TypedDict('ModelSofascoreScoreLine', {
142
+ 'current': NotRequired[int],
143
+ 'period1': NotRequired[int],
144
+ 'period2': NotRequired[int],
145
+ }, total=False)
146
+
147
+ ModelSofascoreTeamResponseDoc = TypedDict('ModelSofascoreTeamResponseDoc', {
148
+ 'code': NotRequired[int],
149
+ 'data': NotRequired[ModelSofascoreTeamResponse],
150
+ 'msg': NotRequired[str],
151
+ }, total=False)
152
+
153
+ ModelSofascoreTeamResponse = TypedDict('ModelSofascoreTeamResponse', {
154
+ 'fetched_at': NotRequired[str],
155
+ 'source_url': NotRequired[str],
156
+ 'team': NotRequired[ModelSofascoreTeamDetail],
157
+ }, total=False)
158
+
159
+ ModelSofascoreTeamDetail = TypedDict('ModelSofascoreTeamDetail', {
160
+ 'country': NotRequired[str],
161
+ 'id': NotRequired[int],
162
+ 'manager': NotRequired[str],
163
+ 'name': NotRequired[str],
164
+ 'national': NotRequired[bool],
165
+ 'primary_color': NotRequired[str],
166
+ 'short_name': NotRequired[str],
167
+ 'slug': NotRequired[str],
168
+ 'sport': NotRequired[str],
169
+ 'tournament_id': NotRequired[int],
170
+ 'tournament_name': NotRequired[str],
171
+ 'venue': NotRequired[str],
172
+ 'venue_capacity': NotRequired[int],
173
+ 'venue_city': NotRequired[str],
174
+ }, total=False)
175
+
176
+ ModelSofascoreStandingsResponseDoc = TypedDict('ModelSofascoreStandingsResponseDoc', {
177
+ 'code': NotRequired[int],
178
+ 'data': NotRequired[ModelSofascoreStandingsResponse],
179
+ 'msg': NotRequired[str],
180
+ }, total=False)
181
+
182
+ ModelSofascoreStandingsResponse = TypedDict('ModelSofascoreStandingsResponse', {
183
+ 'fetched_at': NotRequired[str],
184
+ 'groups': NotRequired[list[ModelSofascoreStandingsGroup]],
185
+ 'season_id': NotRequired[int],
186
+ 'source_url': NotRequired[str],
187
+ 'tournament_id': NotRequired[int],
188
+ 'type': NotRequired[str],
189
+ }, total=False)
190
+
191
+ ModelSofascoreStandingsGroup = TypedDict('ModelSofascoreStandingsGroup', {
192
+ 'name': NotRequired[str],
193
+ 'rows': NotRequired[list[ModelSofascoreStandingsRow]],
194
+ }, total=False)
195
+
196
+ ModelSofascoreStandingsRow = TypedDict('ModelSofascoreStandingsRow', {
197
+ 'draws': NotRequired[int],
198
+ 'losses': NotRequired[int],
199
+ 'matches': NotRequired[int],
200
+ 'points': NotRequired[int],
201
+ 'position': NotRequired[int],
202
+ 'promotion': NotRequired[str],
203
+ 'scores_against': NotRequired[int],
204
+ 'scores_for': NotRequired[int],
205
+ 'team': NotRequired[ModelSofascoreTeamRef],
206
+ 'wins': NotRequired[int],
207
+ }, total=False)
208
+
209
+ ModelSofascoreSearchResponseDoc = TypedDict('ModelSofascoreSearchResponseDoc', {
210
+ 'code': NotRequired[int],
211
+ 'data': NotRequired[ModelSofascoreSearchResponse],
212
+ 'msg': NotRequired[str],
213
+ }, total=False)
214
+
215
+ ModelSofascoreSearchResponse = TypedDict('ModelSofascoreSearchResponse', {
216
+ 'count': NotRequired[int],
217
+ 'fetched_at': NotRequired[str],
218
+ 'query': NotRequired[str],
219
+ 'results': NotRequired[list[ModelSofascoreSearchResult]],
220
+ 'source_url': NotRequired[str],
221
+ }, total=False)
222
+
223
+ ModelSofascoreSearchResult = TypedDict('ModelSofascoreSearchResult', {
224
+ 'country': NotRequired[str],
225
+ 'id': NotRequired[int],
226
+ 'name': NotRequired[str],
227
+ 'slug': NotRequired[str],
228
+ 'sport': NotRequired[str],
229
+ 'team_id': NotRequired[int],
230
+ 'team_name': NotRequired[str],
231
+ 'type': NotRequired[str],
232
+ }, total=False)
233
+
234
+ ModelSofascoreRoundEventsResponseDoc = TypedDict('ModelSofascoreRoundEventsResponseDoc', {
235
+ 'code': NotRequired[int],
236
+ 'data': NotRequired[ModelSofascoreRoundEventsResponse],
237
+ 'msg': NotRequired[str],
238
+ }, total=False)
239
+
240
+ ModelSofascoreRoundEventsResponse = TypedDict('ModelSofascoreRoundEventsResponse', {
241
+ 'count': NotRequired[int],
242
+ 'events': NotRequired[list[ModelSofascoreEventSummary]],
243
+ 'fetched_at': NotRequired[str],
244
+ 'has_next_page': NotRequired[bool],
245
+ 'round': NotRequired[int],
246
+ 'season_id': NotRequired[int],
247
+ 'source_url': NotRequired[str],
248
+ 'tournament_id': NotRequired[int],
249
+ }, total=False)
250
+
251
+ ModelSofascorePlayerResponseDoc = TypedDict('ModelSofascorePlayerResponseDoc', {
252
+ 'code': NotRequired[int],
253
+ 'data': NotRequired[ModelSofascorePlayerResponse],
254
+ 'msg': NotRequired[str],
255
+ }, total=False)
256
+
257
+ ModelSofascorePlayerResponse = TypedDict('ModelSofascorePlayerResponse', {
258
+ 'fetched_at': NotRequired[str],
259
+ 'player': NotRequired[ModelSofascorePlayerDetail],
260
+ 'source_url': NotRequired[str],
261
+ }, total=False)
262
+
263
+ ModelSofascorePlayerDetail = TypedDict('ModelSofascorePlayerDetail', {
264
+ 'country': NotRequired[str],
265
+ 'date_of_birth': NotRequired[str],
266
+ 'deceased': NotRequired[bool],
267
+ 'height': NotRequired[int],
268
+ 'id': NotRequired[int],
269
+ 'jersey_number': NotRequired[str],
270
+ 'market_value': NotRequired[int],
271
+ 'market_value_currency': NotRequired[str],
272
+ 'name': NotRequired[str],
273
+ 'position': NotRequired[str],
274
+ 'preferred_foot': NotRequired[str],
275
+ 'short_name': NotRequired[str],
276
+ 'slug': NotRequired[str],
277
+ 'team': NotRequired[ModelSofascoreTeamRef],
278
+ }, total=False)
279
+
280
+ ModelSofascoreLiveEventsResponseDoc = TypedDict('ModelSofascoreLiveEventsResponseDoc', {
281
+ 'code': NotRequired[int],
282
+ 'data': NotRequired[ModelSofascoreLiveEventsResponse],
283
+ 'msg': NotRequired[str],
284
+ }, total=False)
285
+
286
+ ModelSofascoreLiveEventsResponse = TypedDict('ModelSofascoreLiveEventsResponse', {
287
+ 'count': NotRequired[int],
288
+ 'events': NotRequired[list[ModelSofascoreEventSummary]],
289
+ 'fetched_at': NotRequired[str],
290
+ 'source_url': NotRequired[str],
291
+ 'sport': NotRequired[str],
292
+ }, total=False)
293
+
294
+ ModelSofascoreEventStatisticsResponseDoc = TypedDict('ModelSofascoreEventStatisticsResponseDoc', {
295
+ 'code': NotRequired[int],
296
+ 'data': NotRequired[ModelSofascoreEventStatisticsResponse],
297
+ 'msg': NotRequired[str],
298
+ }, total=False)
299
+
300
+ ModelSofascoreEventStatisticsResponse = TypedDict('ModelSofascoreEventStatisticsResponse', {
301
+ 'event_id': NotRequired[int],
302
+ 'fetched_at': NotRequired[str],
303
+ 'periods': NotRequired[list[ModelSofascoreStatPeriod]],
304
+ 'source_url': NotRequired[str],
305
+ }, total=False)
306
+
307
+ ModelSofascoreStatPeriod = TypedDict('ModelSofascoreStatPeriod', {
308
+ 'groups': NotRequired[list[ModelSofascoreStatGroup]],
309
+ 'period': NotRequired[str],
310
+ }, total=False)
311
+
312
+ ModelSofascoreStatGroup = TypedDict('ModelSofascoreStatGroup', {
313
+ 'items': NotRequired[list[ModelSofascoreStatItem]],
314
+ 'name': NotRequired[str],
315
+ }, total=False)
316
+
317
+ ModelSofascoreStatItem = TypedDict('ModelSofascoreStatItem', {
318
+ 'away': NotRequired[str],
319
+ 'home': NotRequired[str],
320
+ 'key': NotRequired[str],
321
+ 'name': NotRequired[str],
322
+ }, total=False)
323
+
324
+ ModelSofascoreEventOddsResponseDoc = TypedDict('ModelSofascoreEventOddsResponseDoc', {
325
+ 'code': NotRequired[int],
326
+ 'data': NotRequired[ModelSofascoreEventOddsResponse],
327
+ 'msg': NotRequired[str],
328
+ }, total=False)
329
+
330
+ ModelSofascoreEventOddsResponse = TypedDict('ModelSofascoreEventOddsResponse', {
331
+ 'count': NotRequired[int],
332
+ 'event_id': NotRequired[int],
333
+ 'fetched_at': NotRequired[str],
334
+ 'markets': NotRequired[list[ModelSofascoreOddsMarket]],
335
+ 'source_url': NotRequired[str],
336
+ }, total=False)
337
+
338
+ ModelSofascoreOddsMarket = TypedDict('ModelSofascoreOddsMarket', {
339
+ 'choices': NotRequired[list[ModelSofascoreOddsChoice]],
340
+ 'group': NotRequired[str],
341
+ 'name': NotRequired[str],
342
+ 'period': NotRequired[str],
343
+ 'suspended': NotRequired[bool],
344
+ }, total=False)
345
+
346
+ ModelSofascoreOddsChoice = TypedDict('ModelSofascoreOddsChoice', {
347
+ 'name': NotRequired[str],
348
+ 'value': NotRequired[str],
349
+ 'winning': NotRequired[bool],
350
+ }, total=False)
351
+
352
+ ModelSofascoreEventLineupsResponseDoc = TypedDict('ModelSofascoreEventLineupsResponseDoc', {
353
+ 'code': NotRequired[int],
354
+ 'data': NotRequired[ModelSofascoreEventLineupsResponse],
355
+ 'msg': NotRequired[str],
356
+ }, total=False)
357
+
358
+ ModelSofascoreEventLineupsResponse = TypedDict('ModelSofascoreEventLineupsResponse', {
359
+ 'away': NotRequired[ModelSofascoreTeamLineup],
360
+ 'confirmed': NotRequired[bool],
361
+ 'event_id': NotRequired[int],
362
+ 'fetched_at': NotRequired[str],
363
+ 'home': NotRequired[ModelSofascoreTeamLineup],
364
+ 'source_url': NotRequired[str],
365
+ }, total=False)
366
+
367
+ ModelSofascoreTeamLineup = TypedDict('ModelSofascoreTeamLineup', {
368
+ 'formation': NotRequired[str],
369
+ 'players': NotRequired[list[ModelSofascoreLineupPlayer]],
370
+ }, total=False)
371
+
372
+ ModelSofascoreLineupPlayer = TypedDict('ModelSofascoreLineupPlayer', {
373
+ 'jersey_number': NotRequired[str],
374
+ 'player': NotRequired[ModelSofascorePlayerRef],
375
+ 'position': NotRequired[str],
376
+ 'substitute': NotRequired[bool],
377
+ }, total=False)
378
+
379
+ ModelSofascorePlayerRef = TypedDict('ModelSofascorePlayerRef', {
380
+ 'country': NotRequired[str],
381
+ 'id': NotRequired[int],
382
+ 'name': NotRequired[str],
383
+ 'position': NotRequired[str],
384
+ 'short_name': NotRequired[str],
385
+ 'slug': NotRequired[str],
386
+ }, total=False)
387
+
388
+ ModelSofascoreEventIncidentsResponseDoc = TypedDict('ModelSofascoreEventIncidentsResponseDoc', {
389
+ 'code': NotRequired[int],
390
+ 'data': NotRequired[ModelSofascoreEventIncidentsResponse],
391
+ 'msg': NotRequired[str],
392
+ }, total=False)
393
+
394
+ ModelSofascoreEventIncidentsResponse = TypedDict('ModelSofascoreEventIncidentsResponse', {
395
+ 'count': NotRequired[int],
396
+ 'event_id': NotRequired[int],
397
+ 'fetched_at': NotRequired[str],
398
+ 'incidents': NotRequired[list[ModelSofascoreIncident]],
399
+ 'source_url': NotRequired[str],
400
+ }, total=False)
401
+
402
+ ModelSofascoreIncident = TypedDict('ModelSofascoreIncident', {
403
+ 'added_time': NotRequired[int],
404
+ 'away_score': NotRequired[int],
405
+ 'card_color': NotRequired[str],
406
+ 'home_score': NotRequired[int],
407
+ 'is_home': NotRequired[bool],
408
+ 'player': NotRequired[str],
409
+ 'player_in': NotRequired[str],
410
+ 'player_out': NotRequired[str],
411
+ 'reason': NotRequired[str],
412
+ 'text': NotRequired[str],
413
+ 'time': NotRequired[int],
414
+ 'type': NotRequired[str],
415
+ }, total=False)
416
+
417
+ ModelSofascoreEventH2HresponseDoc = TypedDict('ModelSofascoreEventH2HresponseDoc', {
418
+ 'code': NotRequired[int],
419
+ 'data': NotRequired[ModelSofascoreEventH2Hresponse],
420
+ 'msg': NotRequired[str],
421
+ }, total=False)
422
+
423
+ ModelSofascoreEventH2Hresponse = TypedDict('ModelSofascoreEventH2Hresponse', {
424
+ 'event_id': NotRequired[int],
425
+ 'fetched_at': NotRequired[str],
426
+ 'manager_duel': NotRequired[ModelSofascoreTeamDuel],
427
+ 'source_url': NotRequired[str],
428
+ 'team_duel': NotRequired[ModelSofascoreTeamDuel],
429
+ }, total=False)
430
+
431
+ ModelSofascoreTeamDuel = TypedDict('ModelSofascoreTeamDuel', {
432
+ 'away_wins': NotRequired[int],
433
+ 'draws': NotRequired[int],
434
+ 'home_wins': NotRequired[int],
435
+ }, total=False)
436
+
437
+ ModelSofascoreEventResponseDoc = TypedDict('ModelSofascoreEventResponseDoc', {
438
+ 'code': NotRequired[int],
439
+ 'data': NotRequired[ModelSofascoreEventResponse],
440
+ 'msg': NotRequired[str],
441
+ }, total=False)
442
+
443
+ ModelSofascoreEventResponse = TypedDict('ModelSofascoreEventResponse', {
444
+ 'event': NotRequired[ModelSofascoreEventDetail],
445
+ 'fetched_at': NotRequired[str],
446
+ 'source_url': NotRequired[str],
447
+ }, total=False)
448
+
449
+ ModelSofascoreEventDetail = TypedDict('ModelSofascoreEventDetail', {
450
+ 'attendance': NotRequired[int],
451
+ 'away_score': NotRequired[ModelSofascoreScoreLine],
452
+ 'away_team': NotRequired[ModelSofascoreTeamRef],
453
+ 'home_score': NotRequired[ModelSofascoreScoreLine],
454
+ 'home_team': NotRequired[ModelSofascoreTeamRef],
455
+ 'id': NotRequired[int],
456
+ 'referee': NotRequired[ModelSofascoreReferee],
457
+ 'slug': NotRequired[str],
458
+ 'start_time': NotRequired[str],
459
+ 'start_timestamp': NotRequired[int],
460
+ 'status': NotRequired[ModelSofascoreEventStatus],
461
+ 'tournament': NotRequired[ModelSofascoreTournamentRef],
462
+ 'venue': NotRequired[ModelSofascoreVenue],
463
+ 'winner_code': NotRequired[int],
464
+ }, total=False)
465
+
466
+ ModelSofascoreVenue = TypedDict('ModelSofascoreVenue', {
467
+ 'capacity': NotRequired[int],
468
+ 'city': NotRequired[str],
469
+ 'country': NotRequired[str],
470
+ 'name': NotRequired[str],
471
+ }, total=False)
472
+
473
+ ModelSofascoreReferee = TypedDict('ModelSofascoreReferee', {
474
+ 'country': NotRequired[str],
475
+ 'id': NotRequired[int],
476
+ 'name': NotRequired[str],
477
+ }, total=False)
478
+
479
+ SofascoreEventResponse = ModelSofascoreEventResponseDoc
480
+ SofascoreEventParams = TypedDict('SofascoreEventParams', {
481
+ '_response_type': NotRequired[ResponseType],
482
+ '_timeout': NotRequired[float],
483
+ '_headers': NotRequired[Mapping[str, str]],
484
+ 'id': Required[str],
485
+ }, total=False)
486
+
487
+ SofascoreEventH2hResponse = ModelSofascoreEventH2HresponseDoc
488
+ SofascoreEventH2hParams = TypedDict('SofascoreEventH2hParams', {
489
+ '_response_type': NotRequired[ResponseType],
490
+ '_timeout': NotRequired[float],
491
+ '_headers': NotRequired[Mapping[str, str]],
492
+ 'id': Required[str],
493
+ }, total=False)
494
+
495
+ SofascoreEventIncidentsResponse = ModelSofascoreEventIncidentsResponseDoc
496
+ SofascoreEventIncidentsParams = TypedDict('SofascoreEventIncidentsParams', {
497
+ '_response_type': NotRequired[ResponseType],
498
+ '_timeout': NotRequired[float],
499
+ '_headers': NotRequired[Mapping[str, str]],
500
+ 'id': Required[str],
501
+ }, total=False)
502
+
503
+ SofascoreEventLineupsResponse = ModelSofascoreEventLineupsResponseDoc
504
+ SofascoreEventLineupsParams = TypedDict('SofascoreEventLineupsParams', {
505
+ '_response_type': NotRequired[ResponseType],
506
+ '_timeout': NotRequired[float],
507
+ '_headers': NotRequired[Mapping[str, str]],
508
+ 'id': Required[str],
509
+ }, total=False)
510
+
511
+ SofascoreEventOddsResponse = ModelSofascoreEventOddsResponseDoc
512
+ SofascoreEventOddsParams = TypedDict('SofascoreEventOddsParams', {
513
+ '_response_type': NotRequired[ResponseType],
514
+ '_timeout': NotRequired[float],
515
+ '_headers': NotRequired[Mapping[str, str]],
516
+ 'id': Required[str],
517
+ }, total=False)
518
+
519
+ SofascoreEventStatisticsResponse = ModelSofascoreEventStatisticsResponseDoc
520
+ SofascoreEventStatisticsParams = TypedDict('SofascoreEventStatisticsParams', {
521
+ '_response_type': NotRequired[ResponseType],
522
+ '_timeout': NotRequired[float],
523
+ '_headers': NotRequired[Mapping[str, str]],
524
+ 'id': Required[str],
525
+ }, total=False)
526
+
527
+ SofascoreLiveEventsResponse = ModelSofascoreLiveEventsResponseDoc
528
+ SofascoreLiveEventsParams = TypedDict('SofascoreLiveEventsParams', {
529
+ '_response_type': NotRequired[ResponseType],
530
+ '_timeout': NotRequired[float],
531
+ '_headers': NotRequired[Mapping[str, str]],
532
+ 'sport': Required[Literal['football', 'basketball', 'tennis']],
533
+ }, total=False)
534
+
535
+ SofascorePlayerResponse = ModelSofascorePlayerResponseDoc
536
+ SofascorePlayerParams = TypedDict('SofascorePlayerParams', {
537
+ '_response_type': NotRequired[ResponseType],
538
+ '_timeout': NotRequired[float],
539
+ '_headers': NotRequired[Mapping[str, str]],
540
+ 'id': Required[str],
541
+ }, total=False)
542
+
543
+ SofascoreRoundEventsResponse = ModelSofascoreRoundEventsResponseDoc
544
+ SofascoreRoundEventsParams = TypedDict('SofascoreRoundEventsParams', {
545
+ '_response_type': NotRequired[ResponseType],
546
+ '_timeout': NotRequired[float],
547
+ '_headers': NotRequired[Mapping[str, str]],
548
+ 'id': Required[str],
549
+ 'season': Required[str],
550
+ 'round': Required[int],
551
+ }, total=False)
552
+
553
+ SofascoreSearchResponse = ModelSofascoreSearchResponseDoc
554
+ SofascoreSearchParams = TypedDict('SofascoreSearchParams', {
555
+ '_response_type': NotRequired[ResponseType],
556
+ '_timeout': NotRequired[float],
557
+ '_headers': NotRequired[Mapping[str, str]],
558
+ 'q': Required[str],
559
+ }, total=False)
560
+
561
+ SofascoreStandingsResponse = ModelSofascoreStandingsResponseDoc
562
+ SofascoreStandingsParams = TypedDict('SofascoreStandingsParams', {
563
+ '_response_type': NotRequired[ResponseType],
564
+ '_timeout': NotRequired[float],
565
+ '_headers': NotRequired[Mapping[str, str]],
566
+ 'id': Required[str],
567
+ 'season': Required[str],
568
+ 'type': Required[Literal['total', 'home', 'away']],
569
+ }, total=False)
570
+
571
+ SofascoreTeamResponse = ModelSofascoreTeamResponseDoc
572
+ SofascoreTeamParams = TypedDict('SofascoreTeamParams', {
573
+ '_response_type': NotRequired[ResponseType],
574
+ '_timeout': NotRequired[float],
575
+ '_headers': NotRequired[Mapping[str, str]],
576
+ 'id': Required[str],
577
+ }, total=False)
578
+
579
+ SofascoreTeamEventsResponse = ModelSofascoreTeamEventsResponseDoc
580
+ SofascoreTeamEventsParams = TypedDict('SofascoreTeamEventsParams', {
581
+ '_response_type': NotRequired[ResponseType],
582
+ '_timeout': NotRequired[float],
583
+ '_headers': NotRequired[Mapping[str, str]],
584
+ 'id': Required[str],
585
+ 'direction': Required[Literal['next', 'last']],
586
+ 'page': NotRequired[int],
587
+ }, total=False)
588
+
589
+ SofascoreTeamPlayersResponse = ModelSofascoreTeamPlayersResponseDoc
590
+ SofascoreTeamPlayersParams = TypedDict('SofascoreTeamPlayersParams', {
591
+ '_response_type': NotRequired[ResponseType],
592
+ '_timeout': NotRequired[float],
593
+ '_headers': NotRequired[Mapping[str, str]],
594
+ 'id': Required[str],
595
+ }, total=False)
596
+
597
+ SofascoreTournamentSeasonsResponse = ModelSofascoreTournamentSeasonsResponseDoc
598
+ SofascoreTournamentSeasonsParams = TypedDict('SofascoreTournamentSeasonsParams', {
599
+ '_response_type': NotRequired[ResponseType],
600
+ '_timeout': NotRequired[float],
601
+ '_headers': NotRequired[Mapping[str, str]],
602
+ 'id': Required[str],
603
+ }, total=False)
604
+
605
+ class SofascoreGroup:
606
+ @overload
607
+ def event(self, **params: Unpack[SofascoreEventStreamParams]) -> BinaryIO: ...
608
+ @overload
609
+ def event(self, **params: Unpack[SofascoreEventTextResponseParams]) -> str: ...
610
+ @overload
611
+ def event(self, **params: Unpack[SofascoreEventDefaultParams]) -> SofascoreEventResponse: ...
612
+ @overload
613
+ def event_h2h(self, **params: Unpack[SofascoreEventH2hStreamParams]) -> BinaryIO: ...
614
+ @overload
615
+ def event_h2h(self, **params: Unpack[SofascoreEventH2hTextResponseParams]) -> str: ...
616
+ @overload
617
+ def event_h2h(self, **params: Unpack[SofascoreEventH2hDefaultParams]) -> SofascoreEventH2hResponse: ...
618
+ @overload
619
+ def event_incidents(self, **params: Unpack[SofascoreEventIncidentsStreamParams]) -> BinaryIO: ...
620
+ @overload
621
+ def event_incidents(self, **params: Unpack[SofascoreEventIncidentsTextResponseParams]) -> str: ...
622
+ @overload
623
+ def event_incidents(self, **params: Unpack[SofascoreEventIncidentsDefaultParams]) -> SofascoreEventIncidentsResponse: ...
624
+ @overload
625
+ def event_lineups(self, **params: Unpack[SofascoreEventLineupsStreamParams]) -> BinaryIO: ...
626
+ @overload
627
+ def event_lineups(self, **params: Unpack[SofascoreEventLineupsTextResponseParams]) -> str: ...
628
+ @overload
629
+ def event_lineups(self, **params: Unpack[SofascoreEventLineupsDefaultParams]) -> SofascoreEventLineupsResponse: ...
630
+ @overload
631
+ def event_odds(self, **params: Unpack[SofascoreEventOddsStreamParams]) -> BinaryIO: ...
632
+ @overload
633
+ def event_odds(self, **params: Unpack[SofascoreEventOddsTextResponseParams]) -> str: ...
634
+ @overload
635
+ def event_odds(self, **params: Unpack[SofascoreEventOddsDefaultParams]) -> SofascoreEventOddsResponse: ...
636
+ @overload
637
+ def event_statistics(self, **params: Unpack[SofascoreEventStatisticsStreamParams]) -> BinaryIO: ...
638
+ @overload
639
+ def event_statistics(self, **params: Unpack[SofascoreEventStatisticsTextResponseParams]) -> str: ...
640
+ @overload
641
+ def event_statistics(self, **params: Unpack[SofascoreEventStatisticsDefaultParams]) -> SofascoreEventStatisticsResponse: ...
642
+ @overload
643
+ def live_events(self, **params: Unpack[SofascoreLiveEventsStreamParams]) -> BinaryIO: ...
644
+ @overload
645
+ def live_events(self, **params: Unpack[SofascoreLiveEventsTextResponseParams]) -> str: ...
646
+ @overload
647
+ def live_events(self, **params: Unpack[SofascoreLiveEventsDefaultParams]) -> SofascoreLiveEventsResponse: ...
648
+ @overload
649
+ def player(self, **params: Unpack[SofascorePlayerStreamParams]) -> BinaryIO: ...
650
+ @overload
651
+ def player(self, **params: Unpack[SofascorePlayerTextResponseParams]) -> str: ...
652
+ @overload
653
+ def player(self, **params: Unpack[SofascorePlayerDefaultParams]) -> SofascorePlayerResponse: ...
654
+ @overload
655
+ def round_events(self, **params: Unpack[SofascoreRoundEventsStreamParams]) -> BinaryIO: ...
656
+ @overload
657
+ def round_events(self, **params: Unpack[SofascoreRoundEventsTextResponseParams]) -> str: ...
658
+ @overload
659
+ def round_events(self, **params: Unpack[SofascoreRoundEventsDefaultParams]) -> SofascoreRoundEventsResponse: ...
660
+ @overload
661
+ def search(self, **params: Unpack[SofascoreSearchStreamParams]) -> BinaryIO: ...
662
+ @overload
663
+ def search(self, **params: Unpack[SofascoreSearchTextResponseParams]) -> str: ...
664
+ @overload
665
+ def search(self, **params: Unpack[SofascoreSearchDefaultParams]) -> SofascoreSearchResponse: ...
666
+ @overload
667
+ def standings(self, **params: Unpack[SofascoreStandingsStreamParams]) -> BinaryIO: ...
668
+ @overload
669
+ def standings(self, **params: Unpack[SofascoreStandingsTextResponseParams]) -> str: ...
670
+ @overload
671
+ def standings(self, **params: Unpack[SofascoreStandingsDefaultParams]) -> SofascoreStandingsResponse: ...
672
+ @overload
673
+ def team(self, **params: Unpack[SofascoreTeamStreamParams]) -> BinaryIO: ...
674
+ @overload
675
+ def team(self, **params: Unpack[SofascoreTeamTextResponseParams]) -> str: ...
676
+ @overload
677
+ def team(self, **params: Unpack[SofascoreTeamDefaultParams]) -> SofascoreTeamResponse: ...
678
+ @overload
679
+ def team_events(self, **params: Unpack[SofascoreTeamEventsStreamParams]) -> BinaryIO: ...
680
+ @overload
681
+ def team_events(self, **params: Unpack[SofascoreTeamEventsTextResponseParams]) -> str: ...
682
+ @overload
683
+ def team_events(self, **params: Unpack[SofascoreTeamEventsDefaultParams]) -> SofascoreTeamEventsResponse: ...
684
+ @overload
685
+ def team_players(self, **params: Unpack[SofascoreTeamPlayersStreamParams]) -> BinaryIO: ...
686
+ @overload
687
+ def team_players(self, **params: Unpack[SofascoreTeamPlayersTextResponseParams]) -> str: ...
688
+ @overload
689
+ def team_players(self, **params: Unpack[SofascoreTeamPlayersDefaultParams]) -> SofascoreTeamPlayersResponse: ...
690
+ @overload
691
+ def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsStreamParams]) -> BinaryIO: ...
692
+ @overload
693
+ def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsTextResponseParams]) -> str: ...
694
+ @overload
695
+ def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsDefaultParams]) -> SofascoreTournamentSeasonsResponse: ...
696
+
697
+ OperationId = Literal[
698
+ 'sofascore-event',
699
+ 'sofascore-event-h2h',
700
+ 'sofascore-event-incidents',
701
+ 'sofascore-event-lineups',
702
+ 'sofascore-event-odds',
703
+ 'sofascore-event-statistics',
704
+ 'sofascore-live-events',
705
+ 'sofascore-player',
706
+ 'sofascore-round-events',
707
+ 'sofascore-search',
708
+ 'sofascore-standings',
709
+ 'sofascore-team',
710
+ 'sofascore-team-events',
711
+ 'sofascore-team-players',
712
+ 'sofascore-tournament-seasons',
713
+ ]
714
+
715
+ class CrawloraClient:
716
+ sofascore: SofascoreGroup
717
+ api_key: str
718
+ jwt_token: str
719
+ base_url: str
720
+ timeout: float
721
+ retries: int
722
+ retry_delay: float
723
+ max_retry_delay: float
724
+ retry_statuses: frozenset[int] | None
725
+ retry_predicate: Callable[[int, BaseException | None], bool] | None
726
+ on_retry: Callable[[int, BaseException, float], None] | None
727
+ request_id: bool
728
+ idempotency_keys: bool
729
+ rate_limit: float | None
730
+ max_concurrency: int | None
731
+ logger: Callable[[Mapping[str, Any]], None] | None
732
+ before_request: list[Callable[[dict[str, Any]], None]]
733
+ after_response: list[Callable[[str, int, Mapping[str, str], Any], Any]]
734
+ headers: dict[str, str]
735
+ user_agent: str
736
+ def _is_retryable(self, status: int, exc: BaseException | None) -> bool: ...
737
+ def _compute_retry_delay(self, attempt: int, headers: Mapping[str, str]) -> float: ...
738
+ def _log(self, event: Mapping[str, Any]) -> None: ...
739
+ def __init__(
740
+ self,
741
+ *,
742
+ api_key: str | None = ...,
743
+ jwt_token: str | None = ...,
744
+ base_url: str | None = ...,
745
+ timeout: float = ...,
746
+ retries: int = ...,
747
+ retry_delay: float = ...,
748
+ max_retry_delay: float = ...,
749
+ retry_statuses: Iterable[int] | None = ...,
750
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
751
+ on_retry: Callable[[int, BaseException, float], None] | None = ...,
752
+ request_id: bool = ...,
753
+ idempotency_keys: bool = ...,
754
+ rate_limit: float | None = ...,
755
+ max_concurrency: int | None = ...,
756
+ logger: Callable[[Mapping[str, Any]], None] | None = ...,
757
+ before_request: Callable[[dict[str, Any]], None] | Iterable[Callable[[dict[str, Any]], None]] | None = ...,
758
+ after_response: Callable[[str, int, Mapping[str, str], Any], Any] | Iterable[Callable[[str, int, Mapping[str, str], Any], Any]] | None = ...,
759
+ headers: Mapping[str, str] | None = ...,
760
+ user_agent: str | None = ...,
761
+ transport: Callable[..., Any] | None = ...,
762
+ ) -> None: ...
763
+ def close(self) -> None: ...
764
+ def __enter__(self) -> CrawloraClient: ...
765
+ def __exit__(self, *exc: Any) -> None: ...
766
+ def paginate(
767
+ self,
768
+ operation_id: str,
769
+ params: Mapping[str, Any] | None = ...,
770
+ *,
771
+ page_param: str | None = ...,
772
+ cursor_param: str | None = ...,
773
+ next_cursor: Callable[[Any], Any] | None = ...,
774
+ start: Any = ...,
775
+ step: int = ...,
776
+ max_pages: int | None = ...,
777
+ response_type: ResponseType = ...,
778
+ timeout: float | None = ...,
779
+ headers: Mapping[str, str] | None = ...,
780
+ ) -> Iterator[Any]: ...
781
+ def paginate_items(
782
+ self,
783
+ operation_id: str,
784
+ params: Mapping[str, Any] | None = ...,
785
+ *,
786
+ items: Callable[[Any], Any] | None = ...,
787
+ page_param: str | None = ...,
788
+ cursor_param: str | None = ...,
789
+ next_cursor: Callable[[Any], Any] | None = ...,
790
+ start: Any = ...,
791
+ step: int = ...,
792
+ max_pages: int | None = ...,
793
+ response_type: ResponseType = ...,
794
+ timeout: float | None = ...,
795
+ headers: Mapping[str, str] | None = ...,
796
+ ) -> Iterator[Any]: ...
797
+ @overload
798
+ def operation(
799
+ self,
800
+ operation_id: Literal['sofascore-event'],
801
+ params: SofascoreEventParams,
802
+ *,
803
+ response_type: ResponseType = ...,
804
+ timeout: float | None = ...,
805
+ headers: Mapping[str, str] | None = ...,
806
+ retries: int | None = ...,
807
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
808
+ ) -> SofascoreEventResponse: ...
809
+ @overload
810
+ def operation(
811
+ self,
812
+ operation_id: Literal['sofascore-event-h2h'],
813
+ params: SofascoreEventH2hParams,
814
+ *,
815
+ response_type: ResponseType = ...,
816
+ timeout: float | None = ...,
817
+ headers: Mapping[str, str] | None = ...,
818
+ retries: int | None = ...,
819
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
820
+ ) -> SofascoreEventH2hResponse: ...
821
+ @overload
822
+ def operation(
823
+ self,
824
+ operation_id: Literal['sofascore-event-incidents'],
825
+ params: SofascoreEventIncidentsParams,
826
+ *,
827
+ response_type: ResponseType = ...,
828
+ timeout: float | None = ...,
829
+ headers: Mapping[str, str] | None = ...,
830
+ retries: int | None = ...,
831
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
832
+ ) -> SofascoreEventIncidentsResponse: ...
833
+ @overload
834
+ def operation(
835
+ self,
836
+ operation_id: Literal['sofascore-event-lineups'],
837
+ params: SofascoreEventLineupsParams,
838
+ *,
839
+ response_type: ResponseType = ...,
840
+ timeout: float | None = ...,
841
+ headers: Mapping[str, str] | None = ...,
842
+ retries: int | None = ...,
843
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
844
+ ) -> SofascoreEventLineupsResponse: ...
845
+ @overload
846
+ def operation(
847
+ self,
848
+ operation_id: Literal['sofascore-event-odds'],
849
+ params: SofascoreEventOddsParams,
850
+ *,
851
+ response_type: ResponseType = ...,
852
+ timeout: float | None = ...,
853
+ headers: Mapping[str, str] | None = ...,
854
+ retries: int | None = ...,
855
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
856
+ ) -> SofascoreEventOddsResponse: ...
857
+ @overload
858
+ def operation(
859
+ self,
860
+ operation_id: Literal['sofascore-event-statistics'],
861
+ params: SofascoreEventStatisticsParams,
862
+ *,
863
+ response_type: ResponseType = ...,
864
+ timeout: float | None = ...,
865
+ headers: Mapping[str, str] | None = ...,
866
+ retries: int | None = ...,
867
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
868
+ ) -> SofascoreEventStatisticsResponse: ...
869
+ @overload
870
+ def operation(
871
+ self,
872
+ operation_id: Literal['sofascore-live-events'],
873
+ params: SofascoreLiveEventsParams,
874
+ *,
875
+ response_type: ResponseType = ...,
876
+ timeout: float | None = ...,
877
+ headers: Mapping[str, str] | None = ...,
878
+ retries: int | None = ...,
879
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
880
+ ) -> SofascoreLiveEventsResponse: ...
881
+ @overload
882
+ def operation(
883
+ self,
884
+ operation_id: Literal['sofascore-player'],
885
+ params: SofascorePlayerParams,
886
+ *,
887
+ response_type: ResponseType = ...,
888
+ timeout: float | None = ...,
889
+ headers: Mapping[str, str] | None = ...,
890
+ retries: int | None = ...,
891
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
892
+ ) -> SofascorePlayerResponse: ...
893
+ @overload
894
+ def operation(
895
+ self,
896
+ operation_id: Literal['sofascore-round-events'],
897
+ params: SofascoreRoundEventsParams,
898
+ *,
899
+ response_type: ResponseType = ...,
900
+ timeout: float | None = ...,
901
+ headers: Mapping[str, str] | None = ...,
902
+ retries: int | None = ...,
903
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
904
+ ) -> SofascoreRoundEventsResponse: ...
905
+ @overload
906
+ def operation(
907
+ self,
908
+ operation_id: Literal['sofascore-search'],
909
+ params: SofascoreSearchParams,
910
+ *,
911
+ response_type: ResponseType = ...,
912
+ timeout: float | None = ...,
913
+ headers: Mapping[str, str] | None = ...,
914
+ retries: int | None = ...,
915
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
916
+ ) -> SofascoreSearchResponse: ...
917
+ @overload
918
+ def operation(
919
+ self,
920
+ operation_id: Literal['sofascore-standings'],
921
+ params: SofascoreStandingsParams,
922
+ *,
923
+ response_type: ResponseType = ...,
924
+ timeout: float | None = ...,
925
+ headers: Mapping[str, str] | None = ...,
926
+ retries: int | None = ...,
927
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
928
+ ) -> SofascoreStandingsResponse: ...
929
+ @overload
930
+ def operation(
931
+ self,
932
+ operation_id: Literal['sofascore-team'],
933
+ params: SofascoreTeamParams,
934
+ *,
935
+ response_type: ResponseType = ...,
936
+ timeout: float | None = ...,
937
+ headers: Mapping[str, str] | None = ...,
938
+ retries: int | None = ...,
939
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
940
+ ) -> SofascoreTeamResponse: ...
941
+ @overload
942
+ def operation(
943
+ self,
944
+ operation_id: Literal['sofascore-team-events'],
945
+ params: SofascoreTeamEventsParams,
946
+ *,
947
+ response_type: ResponseType = ...,
948
+ timeout: float | None = ...,
949
+ headers: Mapping[str, str] | None = ...,
950
+ retries: int | None = ...,
951
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
952
+ ) -> SofascoreTeamEventsResponse: ...
953
+ @overload
954
+ def operation(
955
+ self,
956
+ operation_id: Literal['sofascore-team-players'],
957
+ params: SofascoreTeamPlayersParams,
958
+ *,
959
+ response_type: ResponseType = ...,
960
+ timeout: float | None = ...,
961
+ headers: Mapping[str, str] | None = ...,
962
+ retries: int | None = ...,
963
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
964
+ ) -> SofascoreTeamPlayersResponse: ...
965
+ @overload
966
+ def operation(
967
+ self,
968
+ operation_id: Literal['sofascore-tournament-seasons'],
969
+ params: SofascoreTournamentSeasonsParams,
970
+ *,
971
+ response_type: ResponseType = ...,
972
+ timeout: float | None = ...,
973
+ headers: Mapping[str, str] | None = ...,
974
+ retries: int | None = ...,
975
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
976
+ ) -> SofascoreTournamentSeasonsResponse: ...
977
+ @overload
978
+ def operation(
979
+ self,
980
+ operation_id: str,
981
+ params: Mapping[str, Any] | None = ...,
982
+ *,
983
+ response_type: ResponseType = ...,
984
+ timeout: float | None = ...,
985
+ headers: Mapping[str, str] | None = ...,
986
+ retries: int | None = ...,
987
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
988
+ ) -> Any: ...
989
+ @overload
990
+ def request(
991
+ self,
992
+ operation_id: Literal['sofascore-event'],
993
+ params: SofascoreEventParams,
994
+ *,
995
+ response_type: ResponseType = ...,
996
+ timeout: float | None = ...,
997
+ headers: Mapping[str, str] | None = ...,
998
+ retries: int | None = ...,
999
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1000
+ ) -> SofascoreEventResponse: ...
1001
+ @overload
1002
+ def request(
1003
+ self,
1004
+ operation_id: Literal['sofascore-event-h2h'],
1005
+ params: SofascoreEventH2hParams,
1006
+ *,
1007
+ response_type: ResponseType = ...,
1008
+ timeout: float | None = ...,
1009
+ headers: Mapping[str, str] | None = ...,
1010
+ retries: int | None = ...,
1011
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1012
+ ) -> SofascoreEventH2hResponse: ...
1013
+ @overload
1014
+ def request(
1015
+ self,
1016
+ operation_id: Literal['sofascore-event-incidents'],
1017
+ params: SofascoreEventIncidentsParams,
1018
+ *,
1019
+ response_type: ResponseType = ...,
1020
+ timeout: float | None = ...,
1021
+ headers: Mapping[str, str] | None = ...,
1022
+ retries: int | None = ...,
1023
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1024
+ ) -> SofascoreEventIncidentsResponse: ...
1025
+ @overload
1026
+ def request(
1027
+ self,
1028
+ operation_id: Literal['sofascore-event-lineups'],
1029
+ params: SofascoreEventLineupsParams,
1030
+ *,
1031
+ response_type: ResponseType = ...,
1032
+ timeout: float | None = ...,
1033
+ headers: Mapping[str, str] | None = ...,
1034
+ retries: int | None = ...,
1035
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1036
+ ) -> SofascoreEventLineupsResponse: ...
1037
+ @overload
1038
+ def request(
1039
+ self,
1040
+ operation_id: Literal['sofascore-event-odds'],
1041
+ params: SofascoreEventOddsParams,
1042
+ *,
1043
+ response_type: ResponseType = ...,
1044
+ timeout: float | None = ...,
1045
+ headers: Mapping[str, str] | None = ...,
1046
+ retries: int | None = ...,
1047
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1048
+ ) -> SofascoreEventOddsResponse: ...
1049
+ @overload
1050
+ def request(
1051
+ self,
1052
+ operation_id: Literal['sofascore-event-statistics'],
1053
+ params: SofascoreEventStatisticsParams,
1054
+ *,
1055
+ response_type: ResponseType = ...,
1056
+ timeout: float | None = ...,
1057
+ headers: Mapping[str, str] | None = ...,
1058
+ retries: int | None = ...,
1059
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1060
+ ) -> SofascoreEventStatisticsResponse: ...
1061
+ @overload
1062
+ def request(
1063
+ self,
1064
+ operation_id: Literal['sofascore-live-events'],
1065
+ params: SofascoreLiveEventsParams,
1066
+ *,
1067
+ response_type: ResponseType = ...,
1068
+ timeout: float | None = ...,
1069
+ headers: Mapping[str, str] | None = ...,
1070
+ retries: int | None = ...,
1071
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1072
+ ) -> SofascoreLiveEventsResponse: ...
1073
+ @overload
1074
+ def request(
1075
+ self,
1076
+ operation_id: Literal['sofascore-player'],
1077
+ params: SofascorePlayerParams,
1078
+ *,
1079
+ response_type: ResponseType = ...,
1080
+ timeout: float | None = ...,
1081
+ headers: Mapping[str, str] | None = ...,
1082
+ retries: int | None = ...,
1083
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1084
+ ) -> SofascorePlayerResponse: ...
1085
+ @overload
1086
+ def request(
1087
+ self,
1088
+ operation_id: Literal['sofascore-round-events'],
1089
+ params: SofascoreRoundEventsParams,
1090
+ *,
1091
+ response_type: ResponseType = ...,
1092
+ timeout: float | None = ...,
1093
+ headers: Mapping[str, str] | None = ...,
1094
+ retries: int | None = ...,
1095
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1096
+ ) -> SofascoreRoundEventsResponse: ...
1097
+ @overload
1098
+ def request(
1099
+ self,
1100
+ operation_id: Literal['sofascore-search'],
1101
+ params: SofascoreSearchParams,
1102
+ *,
1103
+ response_type: ResponseType = ...,
1104
+ timeout: float | None = ...,
1105
+ headers: Mapping[str, str] | None = ...,
1106
+ retries: int | None = ...,
1107
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1108
+ ) -> SofascoreSearchResponse: ...
1109
+ @overload
1110
+ def request(
1111
+ self,
1112
+ operation_id: Literal['sofascore-standings'],
1113
+ params: SofascoreStandingsParams,
1114
+ *,
1115
+ response_type: ResponseType = ...,
1116
+ timeout: float | None = ...,
1117
+ headers: Mapping[str, str] | None = ...,
1118
+ retries: int | None = ...,
1119
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1120
+ ) -> SofascoreStandingsResponse: ...
1121
+ @overload
1122
+ def request(
1123
+ self,
1124
+ operation_id: Literal['sofascore-team'],
1125
+ params: SofascoreTeamParams,
1126
+ *,
1127
+ response_type: ResponseType = ...,
1128
+ timeout: float | None = ...,
1129
+ headers: Mapping[str, str] | None = ...,
1130
+ retries: int | None = ...,
1131
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1132
+ ) -> SofascoreTeamResponse: ...
1133
+ @overload
1134
+ def request(
1135
+ self,
1136
+ operation_id: Literal['sofascore-team-events'],
1137
+ params: SofascoreTeamEventsParams,
1138
+ *,
1139
+ response_type: ResponseType = ...,
1140
+ timeout: float | None = ...,
1141
+ headers: Mapping[str, str] | None = ...,
1142
+ retries: int | None = ...,
1143
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1144
+ ) -> SofascoreTeamEventsResponse: ...
1145
+ @overload
1146
+ def request(
1147
+ self,
1148
+ operation_id: Literal['sofascore-team-players'],
1149
+ params: SofascoreTeamPlayersParams,
1150
+ *,
1151
+ response_type: ResponseType = ...,
1152
+ timeout: float | None = ...,
1153
+ headers: Mapping[str, str] | None = ...,
1154
+ retries: int | None = ...,
1155
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1156
+ ) -> SofascoreTeamPlayersResponse: ...
1157
+ @overload
1158
+ def request(
1159
+ self,
1160
+ operation_id: Literal['sofascore-tournament-seasons'],
1161
+ params: SofascoreTournamentSeasonsParams,
1162
+ *,
1163
+ response_type: ResponseType = ...,
1164
+ timeout: float | None = ...,
1165
+ headers: Mapping[str, str] | None = ...,
1166
+ retries: int | None = ...,
1167
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1168
+ ) -> SofascoreTournamentSeasonsResponse: ...
1169
+ @overload
1170
+ def request(
1171
+ self,
1172
+ operation_id: str,
1173
+ params: Mapping[str, Any] | None = ...,
1174
+ *,
1175
+ response_type: ResponseType = ...,
1176
+ timeout: float | None = ...,
1177
+ headers: Mapping[str, str] | None = ...,
1178
+ retries: int | None = ...,
1179
+ retry_predicate: Callable[[int, BaseException | None], bool] | None = ...,
1180
+ ) -> Any: ...
1181
+
1182
+ VERSION: str
1183
+
1184
+ # Internal helpers reused by the async client; not part of the public API.
1185
+ def _build_request(base_url: str, operation: Mapping[str, Any], params: dict[str, Any]) -> tuple[Any, Any, dict[str, str]]: ...
1186
+ def _merge_headers(*sources: Mapping[str, str]) -> dict[str, str]: ...
1187
+ def _auth_headers(security: list[str], api_key: str, jwt_token: str) -> dict[str, str]: ...
1188
+ def _ensure_request_id(headers: dict[str, str]) -> str: ...
1189
+ def _header_value(headers: Mapping[str, str], name: str) -> str: ...
1190
+ def _parse_response(body: bytes, content_type: str, response_type: str) -> Any: ...
1191
+ def _validate_response_type(response_type: str) -> ResponseType: ...
1192
+ def _api_error_class(status: int) -> type[CrawloraError]: ...
1193
+ def _run_before_request(hooks: list[Any], ctx: dict[str, Any]) -> None: ...
1194
+ def _run_after_response(hooks: list[Any], operation_id: Any, status: int, headers: Mapping[str, str], body: Any) -> Any: ...
1195
+ def _allowed_params(operation_id: str) -> set[str]: ...
1196
+
1197
+ from typing import BinaryIO
1198
+
1199
+ class AsyncCrawloraClient:
1200
+ def __init__(self, **kwargs: Any) -> None: ...
1201
+ async def aclose(self) -> None: ...
1202
+ async def __aenter__(self) -> AsyncCrawloraClient: ...
1203
+ async def __aexit__(self, *exc: Any) -> None: ...
1204
+ async def request(self, operation_id: str, params: Mapping[str, Any] | None = ..., *, response_type: ResponseType = ..., timeout: float | None = ..., headers: Mapping[str, str] | None = ..., retries: int | None = ..., retry_predicate: Callable[[int, BaseException | None], bool] | None = ...) -> Any: ...
1205
+
1206
+ class SofascoreClient(CrawloraClient):
1207
+ def __enter__(self) -> SofascoreClient: ...
1208
+ @overload
1209
+ def event(self, **params: Unpack[SofascoreEventStreamParams]) -> BinaryIO: ...
1210
+ @overload
1211
+ def event(self, **params: Unpack[SofascoreEventTextResponseParams]) -> str: ...
1212
+ @overload
1213
+ def event(self, **params: Unpack[SofascoreEventDefaultParams]) -> SofascoreEventResponse: ...
1214
+ @overload
1215
+ def event_h2h(self, **params: Unpack[SofascoreEventH2hStreamParams]) -> BinaryIO: ...
1216
+ @overload
1217
+ def event_h2h(self, **params: Unpack[SofascoreEventH2hTextResponseParams]) -> str: ...
1218
+ @overload
1219
+ def event_h2h(self, **params: Unpack[SofascoreEventH2hDefaultParams]) -> SofascoreEventH2hResponse: ...
1220
+ @overload
1221
+ def event_incidents(self, **params: Unpack[SofascoreEventIncidentsStreamParams]) -> BinaryIO: ...
1222
+ @overload
1223
+ def event_incidents(self, **params: Unpack[SofascoreEventIncidentsTextResponseParams]) -> str: ...
1224
+ @overload
1225
+ def event_incidents(self, **params: Unpack[SofascoreEventIncidentsDefaultParams]) -> SofascoreEventIncidentsResponse: ...
1226
+ @overload
1227
+ def event_lineups(self, **params: Unpack[SofascoreEventLineupsStreamParams]) -> BinaryIO: ...
1228
+ @overload
1229
+ def event_lineups(self, **params: Unpack[SofascoreEventLineupsTextResponseParams]) -> str: ...
1230
+ @overload
1231
+ def event_lineups(self, **params: Unpack[SofascoreEventLineupsDefaultParams]) -> SofascoreEventLineupsResponse: ...
1232
+ @overload
1233
+ def event_odds(self, **params: Unpack[SofascoreEventOddsStreamParams]) -> BinaryIO: ...
1234
+ @overload
1235
+ def event_odds(self, **params: Unpack[SofascoreEventOddsTextResponseParams]) -> str: ...
1236
+ @overload
1237
+ def event_odds(self, **params: Unpack[SofascoreEventOddsDefaultParams]) -> SofascoreEventOddsResponse: ...
1238
+ @overload
1239
+ def event_statistics(self, **params: Unpack[SofascoreEventStatisticsStreamParams]) -> BinaryIO: ...
1240
+ @overload
1241
+ def event_statistics(self, **params: Unpack[SofascoreEventStatisticsTextResponseParams]) -> str: ...
1242
+ @overload
1243
+ def event_statistics(self, **params: Unpack[SofascoreEventStatisticsDefaultParams]) -> SofascoreEventStatisticsResponse: ...
1244
+ @overload
1245
+ def live_events(self, **params: Unpack[SofascoreLiveEventsStreamParams]) -> BinaryIO: ...
1246
+ @overload
1247
+ def live_events(self, **params: Unpack[SofascoreLiveEventsTextResponseParams]) -> str: ...
1248
+ @overload
1249
+ def live_events(self, **params: Unpack[SofascoreLiveEventsDefaultParams]) -> SofascoreLiveEventsResponse: ...
1250
+ @overload
1251
+ def player(self, **params: Unpack[SofascorePlayerStreamParams]) -> BinaryIO: ...
1252
+ @overload
1253
+ def player(self, **params: Unpack[SofascorePlayerTextResponseParams]) -> str: ...
1254
+ @overload
1255
+ def player(self, **params: Unpack[SofascorePlayerDefaultParams]) -> SofascorePlayerResponse: ...
1256
+ @overload
1257
+ def round_events(self, **params: Unpack[SofascoreRoundEventsStreamParams]) -> BinaryIO: ...
1258
+ @overload
1259
+ def round_events(self, **params: Unpack[SofascoreRoundEventsTextResponseParams]) -> str: ...
1260
+ @overload
1261
+ def round_events(self, **params: Unpack[SofascoreRoundEventsDefaultParams]) -> SofascoreRoundEventsResponse: ...
1262
+ @overload
1263
+ def search(self, **params: Unpack[SofascoreSearchStreamParams]) -> BinaryIO: ...
1264
+ @overload
1265
+ def search(self, **params: Unpack[SofascoreSearchTextResponseParams]) -> str: ...
1266
+ @overload
1267
+ def search(self, **params: Unpack[SofascoreSearchDefaultParams]) -> SofascoreSearchResponse: ...
1268
+ @overload
1269
+ def standings(self, **params: Unpack[SofascoreStandingsStreamParams]) -> BinaryIO: ...
1270
+ @overload
1271
+ def standings(self, **params: Unpack[SofascoreStandingsTextResponseParams]) -> str: ...
1272
+ @overload
1273
+ def standings(self, **params: Unpack[SofascoreStandingsDefaultParams]) -> SofascoreStandingsResponse: ...
1274
+ @overload
1275
+ def team(self, **params: Unpack[SofascoreTeamStreamParams]) -> BinaryIO: ...
1276
+ @overload
1277
+ def team(self, **params: Unpack[SofascoreTeamTextResponseParams]) -> str: ...
1278
+ @overload
1279
+ def team(self, **params: Unpack[SofascoreTeamDefaultParams]) -> SofascoreTeamResponse: ...
1280
+ @overload
1281
+ def team_events(self, **params: Unpack[SofascoreTeamEventsStreamParams]) -> BinaryIO: ...
1282
+ @overload
1283
+ def team_events(self, **params: Unpack[SofascoreTeamEventsTextResponseParams]) -> str: ...
1284
+ @overload
1285
+ def team_events(self, **params: Unpack[SofascoreTeamEventsDefaultParams]) -> SofascoreTeamEventsResponse: ...
1286
+ @overload
1287
+ def team_players(self, **params: Unpack[SofascoreTeamPlayersStreamParams]) -> BinaryIO: ...
1288
+ @overload
1289
+ def team_players(self, **params: Unpack[SofascoreTeamPlayersTextResponseParams]) -> str: ...
1290
+ @overload
1291
+ def team_players(self, **params: Unpack[SofascoreTeamPlayersDefaultParams]) -> SofascoreTeamPlayersResponse: ...
1292
+ @overload
1293
+ def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsStreamParams]) -> BinaryIO: ...
1294
+ @overload
1295
+ def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsTextResponseParams]) -> str: ...
1296
+ @overload
1297
+ def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsDefaultParams]) -> SofascoreTournamentSeasonsResponse: ...
1298
+
1299
+ class AsyncSofascoreClient(AsyncCrawloraClient):
1300
+ async def __aenter__(self) -> AsyncSofascoreClient: ...
1301
+ sofascore: _AsyncSofascoreGroup
1302
+ @overload
1303
+ async def event(self, **params: Unpack[SofascoreEventStreamParams]) -> BinaryIO: ...
1304
+ @overload
1305
+ async def event(self, **params: Unpack[SofascoreEventTextResponseParams]) -> str: ...
1306
+ @overload
1307
+ async def event(self, **params: Unpack[SofascoreEventDefaultParams]) -> SofascoreEventResponse: ...
1308
+ @overload
1309
+ async def event_h2h(self, **params: Unpack[SofascoreEventH2hStreamParams]) -> BinaryIO: ...
1310
+ @overload
1311
+ async def event_h2h(self, **params: Unpack[SofascoreEventH2hTextResponseParams]) -> str: ...
1312
+ @overload
1313
+ async def event_h2h(self, **params: Unpack[SofascoreEventH2hDefaultParams]) -> SofascoreEventH2hResponse: ...
1314
+ @overload
1315
+ async def event_incidents(self, **params: Unpack[SofascoreEventIncidentsStreamParams]) -> BinaryIO: ...
1316
+ @overload
1317
+ async def event_incidents(self, **params: Unpack[SofascoreEventIncidentsTextResponseParams]) -> str: ...
1318
+ @overload
1319
+ async def event_incidents(self, **params: Unpack[SofascoreEventIncidentsDefaultParams]) -> SofascoreEventIncidentsResponse: ...
1320
+ @overload
1321
+ async def event_lineups(self, **params: Unpack[SofascoreEventLineupsStreamParams]) -> BinaryIO: ...
1322
+ @overload
1323
+ async def event_lineups(self, **params: Unpack[SofascoreEventLineupsTextResponseParams]) -> str: ...
1324
+ @overload
1325
+ async def event_lineups(self, **params: Unpack[SofascoreEventLineupsDefaultParams]) -> SofascoreEventLineupsResponse: ...
1326
+ @overload
1327
+ async def event_odds(self, **params: Unpack[SofascoreEventOddsStreamParams]) -> BinaryIO: ...
1328
+ @overload
1329
+ async def event_odds(self, **params: Unpack[SofascoreEventOddsTextResponseParams]) -> str: ...
1330
+ @overload
1331
+ async def event_odds(self, **params: Unpack[SofascoreEventOddsDefaultParams]) -> SofascoreEventOddsResponse: ...
1332
+ @overload
1333
+ async def event_statistics(self, **params: Unpack[SofascoreEventStatisticsStreamParams]) -> BinaryIO: ...
1334
+ @overload
1335
+ async def event_statistics(self, **params: Unpack[SofascoreEventStatisticsTextResponseParams]) -> str: ...
1336
+ @overload
1337
+ async def event_statistics(self, **params: Unpack[SofascoreEventStatisticsDefaultParams]) -> SofascoreEventStatisticsResponse: ...
1338
+ @overload
1339
+ async def live_events(self, **params: Unpack[SofascoreLiveEventsStreamParams]) -> BinaryIO: ...
1340
+ @overload
1341
+ async def live_events(self, **params: Unpack[SofascoreLiveEventsTextResponseParams]) -> str: ...
1342
+ @overload
1343
+ async def live_events(self, **params: Unpack[SofascoreLiveEventsDefaultParams]) -> SofascoreLiveEventsResponse: ...
1344
+ @overload
1345
+ async def player(self, **params: Unpack[SofascorePlayerStreamParams]) -> BinaryIO: ...
1346
+ @overload
1347
+ async def player(self, **params: Unpack[SofascorePlayerTextResponseParams]) -> str: ...
1348
+ @overload
1349
+ async def player(self, **params: Unpack[SofascorePlayerDefaultParams]) -> SofascorePlayerResponse: ...
1350
+ @overload
1351
+ async def round_events(self, **params: Unpack[SofascoreRoundEventsStreamParams]) -> BinaryIO: ...
1352
+ @overload
1353
+ async def round_events(self, **params: Unpack[SofascoreRoundEventsTextResponseParams]) -> str: ...
1354
+ @overload
1355
+ async def round_events(self, **params: Unpack[SofascoreRoundEventsDefaultParams]) -> SofascoreRoundEventsResponse: ...
1356
+ @overload
1357
+ async def search(self, **params: Unpack[SofascoreSearchStreamParams]) -> BinaryIO: ...
1358
+ @overload
1359
+ async def search(self, **params: Unpack[SofascoreSearchTextResponseParams]) -> str: ...
1360
+ @overload
1361
+ async def search(self, **params: Unpack[SofascoreSearchDefaultParams]) -> SofascoreSearchResponse: ...
1362
+ @overload
1363
+ async def standings(self, **params: Unpack[SofascoreStandingsStreamParams]) -> BinaryIO: ...
1364
+ @overload
1365
+ async def standings(self, **params: Unpack[SofascoreStandingsTextResponseParams]) -> str: ...
1366
+ @overload
1367
+ async def standings(self, **params: Unpack[SofascoreStandingsDefaultParams]) -> SofascoreStandingsResponse: ...
1368
+ @overload
1369
+ async def team(self, **params: Unpack[SofascoreTeamStreamParams]) -> BinaryIO: ...
1370
+ @overload
1371
+ async def team(self, **params: Unpack[SofascoreTeamTextResponseParams]) -> str: ...
1372
+ @overload
1373
+ async def team(self, **params: Unpack[SofascoreTeamDefaultParams]) -> SofascoreTeamResponse: ...
1374
+ @overload
1375
+ async def team_events(self, **params: Unpack[SofascoreTeamEventsStreamParams]) -> BinaryIO: ...
1376
+ @overload
1377
+ async def team_events(self, **params: Unpack[SofascoreTeamEventsTextResponseParams]) -> str: ...
1378
+ @overload
1379
+ async def team_events(self, **params: Unpack[SofascoreTeamEventsDefaultParams]) -> SofascoreTeamEventsResponse: ...
1380
+ @overload
1381
+ async def team_players(self, **params: Unpack[SofascoreTeamPlayersStreamParams]) -> BinaryIO: ...
1382
+ @overload
1383
+ async def team_players(self, **params: Unpack[SofascoreTeamPlayersTextResponseParams]) -> str: ...
1384
+ @overload
1385
+ async def team_players(self, **params: Unpack[SofascoreTeamPlayersDefaultParams]) -> SofascoreTeamPlayersResponse: ...
1386
+ @overload
1387
+ async def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsStreamParams]) -> BinaryIO: ...
1388
+ @overload
1389
+ async def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsTextResponseParams]) -> str: ...
1390
+ @overload
1391
+ async def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsDefaultParams]) -> SofascoreTournamentSeasonsResponse: ...
1392
+
1393
+ class _AsyncSofascoreGroup:
1394
+ @overload
1395
+ async def event(self, **params: Unpack[SofascoreEventStreamParams]) -> BinaryIO: ...
1396
+ @overload
1397
+ async def event(self, **params: Unpack[SofascoreEventTextResponseParams]) -> str: ...
1398
+ @overload
1399
+ async def event(self, **params: Unpack[SofascoreEventDefaultParams]) -> SofascoreEventResponse: ...
1400
+ @overload
1401
+ async def event_h2h(self, **params: Unpack[SofascoreEventH2hStreamParams]) -> BinaryIO: ...
1402
+ @overload
1403
+ async def event_h2h(self, **params: Unpack[SofascoreEventH2hTextResponseParams]) -> str: ...
1404
+ @overload
1405
+ async def event_h2h(self, **params: Unpack[SofascoreEventH2hDefaultParams]) -> SofascoreEventH2hResponse: ...
1406
+ @overload
1407
+ async def event_incidents(self, **params: Unpack[SofascoreEventIncidentsStreamParams]) -> BinaryIO: ...
1408
+ @overload
1409
+ async def event_incidents(self, **params: Unpack[SofascoreEventIncidentsTextResponseParams]) -> str: ...
1410
+ @overload
1411
+ async def event_incidents(self, **params: Unpack[SofascoreEventIncidentsDefaultParams]) -> SofascoreEventIncidentsResponse: ...
1412
+ @overload
1413
+ async def event_lineups(self, **params: Unpack[SofascoreEventLineupsStreamParams]) -> BinaryIO: ...
1414
+ @overload
1415
+ async def event_lineups(self, **params: Unpack[SofascoreEventLineupsTextResponseParams]) -> str: ...
1416
+ @overload
1417
+ async def event_lineups(self, **params: Unpack[SofascoreEventLineupsDefaultParams]) -> SofascoreEventLineupsResponse: ...
1418
+ @overload
1419
+ async def event_odds(self, **params: Unpack[SofascoreEventOddsStreamParams]) -> BinaryIO: ...
1420
+ @overload
1421
+ async def event_odds(self, **params: Unpack[SofascoreEventOddsTextResponseParams]) -> str: ...
1422
+ @overload
1423
+ async def event_odds(self, **params: Unpack[SofascoreEventOddsDefaultParams]) -> SofascoreEventOddsResponse: ...
1424
+ @overload
1425
+ async def event_statistics(self, **params: Unpack[SofascoreEventStatisticsStreamParams]) -> BinaryIO: ...
1426
+ @overload
1427
+ async def event_statistics(self, **params: Unpack[SofascoreEventStatisticsTextResponseParams]) -> str: ...
1428
+ @overload
1429
+ async def event_statistics(self, **params: Unpack[SofascoreEventStatisticsDefaultParams]) -> SofascoreEventStatisticsResponse: ...
1430
+ @overload
1431
+ async def live_events(self, **params: Unpack[SofascoreLiveEventsStreamParams]) -> BinaryIO: ...
1432
+ @overload
1433
+ async def live_events(self, **params: Unpack[SofascoreLiveEventsTextResponseParams]) -> str: ...
1434
+ @overload
1435
+ async def live_events(self, **params: Unpack[SofascoreLiveEventsDefaultParams]) -> SofascoreLiveEventsResponse: ...
1436
+ @overload
1437
+ async def player(self, **params: Unpack[SofascorePlayerStreamParams]) -> BinaryIO: ...
1438
+ @overload
1439
+ async def player(self, **params: Unpack[SofascorePlayerTextResponseParams]) -> str: ...
1440
+ @overload
1441
+ async def player(self, **params: Unpack[SofascorePlayerDefaultParams]) -> SofascorePlayerResponse: ...
1442
+ @overload
1443
+ async def round_events(self, **params: Unpack[SofascoreRoundEventsStreamParams]) -> BinaryIO: ...
1444
+ @overload
1445
+ async def round_events(self, **params: Unpack[SofascoreRoundEventsTextResponseParams]) -> str: ...
1446
+ @overload
1447
+ async def round_events(self, **params: Unpack[SofascoreRoundEventsDefaultParams]) -> SofascoreRoundEventsResponse: ...
1448
+ @overload
1449
+ async def search(self, **params: Unpack[SofascoreSearchStreamParams]) -> BinaryIO: ...
1450
+ @overload
1451
+ async def search(self, **params: Unpack[SofascoreSearchTextResponseParams]) -> str: ...
1452
+ @overload
1453
+ async def search(self, **params: Unpack[SofascoreSearchDefaultParams]) -> SofascoreSearchResponse: ...
1454
+ @overload
1455
+ async def standings(self, **params: Unpack[SofascoreStandingsStreamParams]) -> BinaryIO: ...
1456
+ @overload
1457
+ async def standings(self, **params: Unpack[SofascoreStandingsTextResponseParams]) -> str: ...
1458
+ @overload
1459
+ async def standings(self, **params: Unpack[SofascoreStandingsDefaultParams]) -> SofascoreStandingsResponse: ...
1460
+ @overload
1461
+ async def team(self, **params: Unpack[SofascoreTeamStreamParams]) -> BinaryIO: ...
1462
+ @overload
1463
+ async def team(self, **params: Unpack[SofascoreTeamTextResponseParams]) -> str: ...
1464
+ @overload
1465
+ async def team(self, **params: Unpack[SofascoreTeamDefaultParams]) -> SofascoreTeamResponse: ...
1466
+ @overload
1467
+ async def team_events(self, **params: Unpack[SofascoreTeamEventsStreamParams]) -> BinaryIO: ...
1468
+ @overload
1469
+ async def team_events(self, **params: Unpack[SofascoreTeamEventsTextResponseParams]) -> str: ...
1470
+ @overload
1471
+ async def team_events(self, **params: Unpack[SofascoreTeamEventsDefaultParams]) -> SofascoreTeamEventsResponse: ...
1472
+ @overload
1473
+ async def team_players(self, **params: Unpack[SofascoreTeamPlayersStreamParams]) -> BinaryIO: ...
1474
+ @overload
1475
+ async def team_players(self, **params: Unpack[SofascoreTeamPlayersTextResponseParams]) -> str: ...
1476
+ @overload
1477
+ async def team_players(self, **params: Unpack[SofascoreTeamPlayersDefaultParams]) -> SofascoreTeamPlayersResponse: ...
1478
+ @overload
1479
+ async def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsStreamParams]) -> BinaryIO: ...
1480
+ @overload
1481
+ async def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsTextResponseParams]) -> str: ...
1482
+ @overload
1483
+ async def tournament_seasons(self, **params: Unpack[SofascoreTournamentSeasonsDefaultParams]) -> SofascoreTournamentSeasonsResponse: ...
1484
+
1485
+ SofascoreEventDefaultParams = TypedDict('SofascoreEventDefaultParams', {
1486
+ '_timeout': NotRequired[float],
1487
+ '_headers': NotRequired[Mapping[str, str]],
1488
+ '_response_type': NotRequired[Literal["auto", "json"]],
1489
+ 'id': Required[str],
1490
+ }, total=False)
1491
+
1492
+ SofascoreEventTextResponseParams = TypedDict('SofascoreEventTextResponseParams', {
1493
+ '_timeout': NotRequired[float],
1494
+ '_headers': NotRequired[Mapping[str, str]],
1495
+ '_response_type': Required[Literal["text"]],
1496
+ 'id': Required[str],
1497
+ }, total=False)
1498
+
1499
+ SofascoreEventStreamParams = TypedDict('SofascoreEventStreamParams', {
1500
+ '_timeout': NotRequired[float],
1501
+ '_headers': NotRequired[Mapping[str, str]],
1502
+ '_response_type': Required[Literal["stream"]],
1503
+ 'id': Required[str],
1504
+ }, total=False)
1505
+
1506
+ SofascoreEventH2hDefaultParams = TypedDict('SofascoreEventH2hDefaultParams', {
1507
+ '_timeout': NotRequired[float],
1508
+ '_headers': NotRequired[Mapping[str, str]],
1509
+ '_response_type': NotRequired[Literal["auto", "json"]],
1510
+ 'id': Required[str],
1511
+ }, total=False)
1512
+
1513
+ SofascoreEventH2hTextResponseParams = TypedDict('SofascoreEventH2hTextResponseParams', {
1514
+ '_timeout': NotRequired[float],
1515
+ '_headers': NotRequired[Mapping[str, str]],
1516
+ '_response_type': Required[Literal["text"]],
1517
+ 'id': Required[str],
1518
+ }, total=False)
1519
+
1520
+ SofascoreEventH2hStreamParams = TypedDict('SofascoreEventH2hStreamParams', {
1521
+ '_timeout': NotRequired[float],
1522
+ '_headers': NotRequired[Mapping[str, str]],
1523
+ '_response_type': Required[Literal["stream"]],
1524
+ 'id': Required[str],
1525
+ }, total=False)
1526
+
1527
+ SofascoreEventIncidentsDefaultParams = TypedDict('SofascoreEventIncidentsDefaultParams', {
1528
+ '_timeout': NotRequired[float],
1529
+ '_headers': NotRequired[Mapping[str, str]],
1530
+ '_response_type': NotRequired[Literal["auto", "json"]],
1531
+ 'id': Required[str],
1532
+ }, total=False)
1533
+
1534
+ SofascoreEventIncidentsTextResponseParams = TypedDict('SofascoreEventIncidentsTextResponseParams', {
1535
+ '_timeout': NotRequired[float],
1536
+ '_headers': NotRequired[Mapping[str, str]],
1537
+ '_response_type': Required[Literal["text"]],
1538
+ 'id': Required[str],
1539
+ }, total=False)
1540
+
1541
+ SofascoreEventIncidentsStreamParams = TypedDict('SofascoreEventIncidentsStreamParams', {
1542
+ '_timeout': NotRequired[float],
1543
+ '_headers': NotRequired[Mapping[str, str]],
1544
+ '_response_type': Required[Literal["stream"]],
1545
+ 'id': Required[str],
1546
+ }, total=False)
1547
+
1548
+ SofascoreEventLineupsDefaultParams = TypedDict('SofascoreEventLineupsDefaultParams', {
1549
+ '_timeout': NotRequired[float],
1550
+ '_headers': NotRequired[Mapping[str, str]],
1551
+ '_response_type': NotRequired[Literal["auto", "json"]],
1552
+ 'id': Required[str],
1553
+ }, total=False)
1554
+
1555
+ SofascoreEventLineupsTextResponseParams = TypedDict('SofascoreEventLineupsTextResponseParams', {
1556
+ '_timeout': NotRequired[float],
1557
+ '_headers': NotRequired[Mapping[str, str]],
1558
+ '_response_type': Required[Literal["text"]],
1559
+ 'id': Required[str],
1560
+ }, total=False)
1561
+
1562
+ SofascoreEventLineupsStreamParams = TypedDict('SofascoreEventLineupsStreamParams', {
1563
+ '_timeout': NotRequired[float],
1564
+ '_headers': NotRequired[Mapping[str, str]],
1565
+ '_response_type': Required[Literal["stream"]],
1566
+ 'id': Required[str],
1567
+ }, total=False)
1568
+
1569
+ SofascoreEventOddsDefaultParams = TypedDict('SofascoreEventOddsDefaultParams', {
1570
+ '_timeout': NotRequired[float],
1571
+ '_headers': NotRequired[Mapping[str, str]],
1572
+ '_response_type': NotRequired[Literal["auto", "json"]],
1573
+ 'id': Required[str],
1574
+ }, total=False)
1575
+
1576
+ SofascoreEventOddsTextResponseParams = TypedDict('SofascoreEventOddsTextResponseParams', {
1577
+ '_timeout': NotRequired[float],
1578
+ '_headers': NotRequired[Mapping[str, str]],
1579
+ '_response_type': Required[Literal["text"]],
1580
+ 'id': Required[str],
1581
+ }, total=False)
1582
+
1583
+ SofascoreEventOddsStreamParams = TypedDict('SofascoreEventOddsStreamParams', {
1584
+ '_timeout': NotRequired[float],
1585
+ '_headers': NotRequired[Mapping[str, str]],
1586
+ '_response_type': Required[Literal["stream"]],
1587
+ 'id': Required[str],
1588
+ }, total=False)
1589
+
1590
+ SofascoreEventStatisticsDefaultParams = TypedDict('SofascoreEventStatisticsDefaultParams', {
1591
+ '_timeout': NotRequired[float],
1592
+ '_headers': NotRequired[Mapping[str, str]],
1593
+ '_response_type': NotRequired[Literal["auto", "json"]],
1594
+ 'id': Required[str],
1595
+ }, total=False)
1596
+
1597
+ SofascoreEventStatisticsTextResponseParams = TypedDict('SofascoreEventStatisticsTextResponseParams', {
1598
+ '_timeout': NotRequired[float],
1599
+ '_headers': NotRequired[Mapping[str, str]],
1600
+ '_response_type': Required[Literal["text"]],
1601
+ 'id': Required[str],
1602
+ }, total=False)
1603
+
1604
+ SofascoreEventStatisticsStreamParams = TypedDict('SofascoreEventStatisticsStreamParams', {
1605
+ '_timeout': NotRequired[float],
1606
+ '_headers': NotRequired[Mapping[str, str]],
1607
+ '_response_type': Required[Literal["stream"]],
1608
+ 'id': Required[str],
1609
+ }, total=False)
1610
+
1611
+ SofascoreLiveEventsDefaultParams = TypedDict('SofascoreLiveEventsDefaultParams', {
1612
+ '_timeout': NotRequired[float],
1613
+ '_headers': NotRequired[Mapping[str, str]],
1614
+ '_response_type': NotRequired[Literal["auto", "json"]],
1615
+ 'sport': Required[Literal['football', 'basketball', 'tennis']],
1616
+ }, total=False)
1617
+
1618
+ SofascoreLiveEventsTextResponseParams = TypedDict('SofascoreLiveEventsTextResponseParams', {
1619
+ '_timeout': NotRequired[float],
1620
+ '_headers': NotRequired[Mapping[str, str]],
1621
+ '_response_type': Required[Literal["text"]],
1622
+ 'sport': Required[Literal['football', 'basketball', 'tennis']],
1623
+ }, total=False)
1624
+
1625
+ SofascoreLiveEventsStreamParams = TypedDict('SofascoreLiveEventsStreamParams', {
1626
+ '_timeout': NotRequired[float],
1627
+ '_headers': NotRequired[Mapping[str, str]],
1628
+ '_response_type': Required[Literal["stream"]],
1629
+ 'sport': Required[Literal['football', 'basketball', 'tennis']],
1630
+ }, total=False)
1631
+
1632
+ SofascorePlayerDefaultParams = TypedDict('SofascorePlayerDefaultParams', {
1633
+ '_timeout': NotRequired[float],
1634
+ '_headers': NotRequired[Mapping[str, str]],
1635
+ '_response_type': NotRequired[Literal["auto", "json"]],
1636
+ 'id': Required[str],
1637
+ }, total=False)
1638
+
1639
+ SofascorePlayerTextResponseParams = TypedDict('SofascorePlayerTextResponseParams', {
1640
+ '_timeout': NotRequired[float],
1641
+ '_headers': NotRequired[Mapping[str, str]],
1642
+ '_response_type': Required[Literal["text"]],
1643
+ 'id': Required[str],
1644
+ }, total=False)
1645
+
1646
+ SofascorePlayerStreamParams = TypedDict('SofascorePlayerStreamParams', {
1647
+ '_timeout': NotRequired[float],
1648
+ '_headers': NotRequired[Mapping[str, str]],
1649
+ '_response_type': Required[Literal["stream"]],
1650
+ 'id': Required[str],
1651
+ }, total=False)
1652
+
1653
+ SofascoreRoundEventsDefaultParams = TypedDict('SofascoreRoundEventsDefaultParams', {
1654
+ '_timeout': NotRequired[float],
1655
+ '_headers': NotRequired[Mapping[str, str]],
1656
+ '_response_type': NotRequired[Literal["auto", "json"]],
1657
+ 'id': Required[str],
1658
+ 'season': Required[str],
1659
+ 'round': Required[int],
1660
+ }, total=False)
1661
+
1662
+ SofascoreRoundEventsTextResponseParams = TypedDict('SofascoreRoundEventsTextResponseParams', {
1663
+ '_timeout': NotRequired[float],
1664
+ '_headers': NotRequired[Mapping[str, str]],
1665
+ '_response_type': Required[Literal["text"]],
1666
+ 'id': Required[str],
1667
+ 'season': Required[str],
1668
+ 'round': Required[int],
1669
+ }, total=False)
1670
+
1671
+ SofascoreRoundEventsStreamParams = TypedDict('SofascoreRoundEventsStreamParams', {
1672
+ '_timeout': NotRequired[float],
1673
+ '_headers': NotRequired[Mapping[str, str]],
1674
+ '_response_type': Required[Literal["stream"]],
1675
+ 'id': Required[str],
1676
+ 'season': Required[str],
1677
+ 'round': Required[int],
1678
+ }, total=False)
1679
+
1680
+ SofascoreSearchDefaultParams = TypedDict('SofascoreSearchDefaultParams', {
1681
+ '_timeout': NotRequired[float],
1682
+ '_headers': NotRequired[Mapping[str, str]],
1683
+ '_response_type': NotRequired[Literal["auto", "json"]],
1684
+ 'q': Required[str],
1685
+ }, total=False)
1686
+
1687
+ SofascoreSearchTextResponseParams = TypedDict('SofascoreSearchTextResponseParams', {
1688
+ '_timeout': NotRequired[float],
1689
+ '_headers': NotRequired[Mapping[str, str]],
1690
+ '_response_type': Required[Literal["text"]],
1691
+ 'q': Required[str],
1692
+ }, total=False)
1693
+
1694
+ SofascoreSearchStreamParams = TypedDict('SofascoreSearchStreamParams', {
1695
+ '_timeout': NotRequired[float],
1696
+ '_headers': NotRequired[Mapping[str, str]],
1697
+ '_response_type': Required[Literal["stream"]],
1698
+ 'q': Required[str],
1699
+ }, total=False)
1700
+
1701
+ SofascoreStandingsDefaultParams = TypedDict('SofascoreStandingsDefaultParams', {
1702
+ '_timeout': NotRequired[float],
1703
+ '_headers': NotRequired[Mapping[str, str]],
1704
+ '_response_type': NotRequired[Literal["auto", "json"]],
1705
+ 'id': Required[str],
1706
+ 'season': Required[str],
1707
+ 'type': Required[Literal['total', 'home', 'away']],
1708
+ }, total=False)
1709
+
1710
+ SofascoreStandingsTextResponseParams = TypedDict('SofascoreStandingsTextResponseParams', {
1711
+ '_timeout': NotRequired[float],
1712
+ '_headers': NotRequired[Mapping[str, str]],
1713
+ '_response_type': Required[Literal["text"]],
1714
+ 'id': Required[str],
1715
+ 'season': Required[str],
1716
+ 'type': Required[Literal['total', 'home', 'away']],
1717
+ }, total=False)
1718
+
1719
+ SofascoreStandingsStreamParams = TypedDict('SofascoreStandingsStreamParams', {
1720
+ '_timeout': NotRequired[float],
1721
+ '_headers': NotRequired[Mapping[str, str]],
1722
+ '_response_type': Required[Literal["stream"]],
1723
+ 'id': Required[str],
1724
+ 'season': Required[str],
1725
+ 'type': Required[Literal['total', 'home', 'away']],
1726
+ }, total=False)
1727
+
1728
+ SofascoreTeamDefaultParams = TypedDict('SofascoreTeamDefaultParams', {
1729
+ '_timeout': NotRequired[float],
1730
+ '_headers': NotRequired[Mapping[str, str]],
1731
+ '_response_type': NotRequired[Literal["auto", "json"]],
1732
+ 'id': Required[str],
1733
+ }, total=False)
1734
+
1735
+ SofascoreTeamTextResponseParams = TypedDict('SofascoreTeamTextResponseParams', {
1736
+ '_timeout': NotRequired[float],
1737
+ '_headers': NotRequired[Mapping[str, str]],
1738
+ '_response_type': Required[Literal["text"]],
1739
+ 'id': Required[str],
1740
+ }, total=False)
1741
+
1742
+ SofascoreTeamStreamParams = TypedDict('SofascoreTeamStreamParams', {
1743
+ '_timeout': NotRequired[float],
1744
+ '_headers': NotRequired[Mapping[str, str]],
1745
+ '_response_type': Required[Literal["stream"]],
1746
+ 'id': Required[str],
1747
+ }, total=False)
1748
+
1749
+ SofascoreTeamEventsDefaultParams = TypedDict('SofascoreTeamEventsDefaultParams', {
1750
+ '_timeout': NotRequired[float],
1751
+ '_headers': NotRequired[Mapping[str, str]],
1752
+ '_response_type': NotRequired[Literal["auto", "json"]],
1753
+ 'id': Required[str],
1754
+ 'direction': Required[Literal['next', 'last']],
1755
+ 'page': NotRequired[int],
1756
+ }, total=False)
1757
+
1758
+ SofascoreTeamEventsTextResponseParams = TypedDict('SofascoreTeamEventsTextResponseParams', {
1759
+ '_timeout': NotRequired[float],
1760
+ '_headers': NotRequired[Mapping[str, str]],
1761
+ '_response_type': Required[Literal["text"]],
1762
+ 'id': Required[str],
1763
+ 'direction': Required[Literal['next', 'last']],
1764
+ 'page': NotRequired[int],
1765
+ }, total=False)
1766
+
1767
+ SofascoreTeamEventsStreamParams = TypedDict('SofascoreTeamEventsStreamParams', {
1768
+ '_timeout': NotRequired[float],
1769
+ '_headers': NotRequired[Mapping[str, str]],
1770
+ '_response_type': Required[Literal["stream"]],
1771
+ 'id': Required[str],
1772
+ 'direction': Required[Literal['next', 'last']],
1773
+ 'page': NotRequired[int],
1774
+ }, total=False)
1775
+
1776
+ SofascoreTeamPlayersDefaultParams = TypedDict('SofascoreTeamPlayersDefaultParams', {
1777
+ '_timeout': NotRequired[float],
1778
+ '_headers': NotRequired[Mapping[str, str]],
1779
+ '_response_type': NotRequired[Literal["auto", "json"]],
1780
+ 'id': Required[str],
1781
+ }, total=False)
1782
+
1783
+ SofascoreTeamPlayersTextResponseParams = TypedDict('SofascoreTeamPlayersTextResponseParams', {
1784
+ '_timeout': NotRequired[float],
1785
+ '_headers': NotRequired[Mapping[str, str]],
1786
+ '_response_type': Required[Literal["text"]],
1787
+ 'id': Required[str],
1788
+ }, total=False)
1789
+
1790
+ SofascoreTeamPlayersStreamParams = TypedDict('SofascoreTeamPlayersStreamParams', {
1791
+ '_timeout': NotRequired[float],
1792
+ '_headers': NotRequired[Mapping[str, str]],
1793
+ '_response_type': Required[Literal["stream"]],
1794
+ 'id': Required[str],
1795
+ }, total=False)
1796
+
1797
+ SofascoreTournamentSeasonsDefaultParams = TypedDict('SofascoreTournamentSeasonsDefaultParams', {
1798
+ '_timeout': NotRequired[float],
1799
+ '_headers': NotRequired[Mapping[str, str]],
1800
+ '_response_type': NotRequired[Literal["auto", "json"]],
1801
+ 'id': Required[str],
1802
+ }, total=False)
1803
+
1804
+ SofascoreTournamentSeasonsTextResponseParams = TypedDict('SofascoreTournamentSeasonsTextResponseParams', {
1805
+ '_timeout': NotRequired[float],
1806
+ '_headers': NotRequired[Mapping[str, str]],
1807
+ '_response_type': Required[Literal["text"]],
1808
+ 'id': Required[str],
1809
+ }, total=False)
1810
+
1811
+ SofascoreTournamentSeasonsStreamParams = TypedDict('SofascoreTournamentSeasonsStreamParams', {
1812
+ '_timeout': NotRequired[float],
1813
+ '_headers': NotRequired[Mapping[str, str]],
1814
+ '_response_type': Required[Literal["stream"]],
1815
+ 'id': Required[str],
1816
+ }, total=False)