victorycode-sdk 1.0.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.
Files changed (121) hide show
  1. victorycode_sdk/__init__.py +260 -0
  2. victorycode_sdk/api/__init__.py +13 -0
  3. victorycode_sdk/api/authentication_api.py +285 -0
  4. victorycode_sdk/api/classification_api.py +1203 -0
  5. victorycode_sdk/api/game_recap_api.py +1395 -0
  6. victorycode_sdk/api/games_api.py +1497 -0
  7. victorycode_sdk/api/mascot_api.py +1203 -0
  8. victorycode_sdk/api/plays_events_api.py +1057 -0
  9. victorycode_sdk/api/teams_api.py +1220 -0
  10. victorycode_sdk/api/uploads_api.py +872 -0
  11. victorycode_sdk/api/venue_api.py +1203 -0
  12. victorycode_sdk/api_client.py +833 -0
  13. victorycode_sdk/api_response.py +21 -0
  14. victorycode_sdk/configuration.py +698 -0
  15. victorycode_sdk/exceptions.py +218 -0
  16. victorycode_sdk/models/__init__.py +114 -0
  17. victorycode_sdk/models/add_video_to_game_with_s3_link_dto.py +90 -0
  18. victorycode_sdk/models/address.py +96 -0
  19. victorycode_sdk/models/address_dto.py +96 -0
  20. victorycode_sdk/models/bad_request_error_response_dto.py +90 -0
  21. victorycode_sdk/models/classification.py +90 -0
  22. victorycode_sdk/models/client_create_game_with_video_url_dto.py +130 -0
  23. victorycode_sdk/models/complete_multipart_upload_dto.py +97 -0
  24. victorycode_sdk/models/complete_multipart_upload_response.py +90 -0
  25. victorycode_sdk/models/complete_multipart_upload_response_dto.py +94 -0
  26. victorycode_sdk/models/completed_part_dto.py +90 -0
  27. victorycode_sdk/models/conflict_error_response_dto.py +90 -0
  28. victorycode_sdk/models/coordinates.py +90 -0
  29. victorycode_sdk/models/coordinates_dto.py +90 -0
  30. victorycode_sdk/models/create_classification_dto.py +90 -0
  31. victorycode_sdk/models/create_mascot_dto.py +90 -0
  32. victorycode_sdk/models/create_team_dto.py +108 -0
  33. victorycode_sdk/models/create_team_response_dto.py +106 -0
  34. victorycode_sdk/models/create_venue_dto.py +102 -0
  35. victorycode_sdk/models/defense_section_dto.py +101 -0
  36. victorycode_sdk/models/defense_stats_dto.py +106 -0
  37. victorycode_sdk/models/defense_totals_dto.py +100 -0
  38. victorycode_sdk/models/delete_response_dto.py +90 -0
  39. victorycode_sdk/models/down_efficiency_dto.py +90 -0
  40. victorycode_sdk/models/fetch_team_response_dto.py +117 -0
  41. victorycode_sdk/models/fumble_section_dto.py +101 -0
  42. victorycode_sdk/models/fumble_stats_dto.py +98 -0
  43. victorycode_sdk/models/fumble_totals_dto.py +92 -0
  44. victorycode_sdk/models/game_all_play_list_item_dto.py +106 -0
  45. victorycode_sdk/models/game_box_score_meta_dto.py +104 -0
  46. victorycode_sdk/models/game_box_score_response_dto.py +98 -0
  47. victorycode_sdk/models/game_box_score_teams_dto.py +97 -0
  48. victorycode_sdk/models/game_details_response.py +108 -0
  49. victorycode_sdk/models/game_recap_scoring_summary_pro_response.py +101 -0
  50. victorycode_sdk/models/game_recap_scoring_summary_response.py +101 -0
  51. victorycode_sdk/models/game_recap_team_stats_response.py +101 -0
  52. victorycode_sdk/models/game_score_response.py +101 -0
  53. victorycode_sdk/models/game_scoring_summary_data_dto.py +104 -0
  54. victorycode_sdk/models/get_parts_presign_url_response.py +88 -0
  55. victorycode_sdk/models/get_parts_presign_url_response_dto.py +94 -0
  56. victorycode_sdk/models/initiate_multipart_upload_dto.py +92 -0
  57. victorycode_sdk/models/initiate_multipart_upload_response.py +88 -0
  58. victorycode_sdk/models/initiate_multipart_upload_response_dto.py +94 -0
  59. victorycode_sdk/models/interception_section_dto.py +101 -0
  60. victorycode_sdk/models/interception_stats_dto.py +98 -0
  61. victorycode_sdk/models/interception_totals_dto.py +92 -0
  62. victorycode_sdk/models/kicking_section_dto.py +101 -0
  63. victorycode_sdk/models/kicking_stats_dto.py +106 -0
  64. victorycode_sdk/models/kicking_totals_dto.py +100 -0
  65. victorycode_sdk/models/line_of_scrimmage_dto.py +90 -0
  66. victorycode_sdk/models/list_classification_paginated_response_dto.py +101 -0
  67. victorycode_sdk/models/list_game_all_plays_response_dto.py +103 -0
  68. victorycode_sdk/models/list_games_paginated_response_dto.py +101 -0
  69. victorycode_sdk/models/list_mascot_paginated_response_dto.py +101 -0
  70. victorycode_sdk/models/list_play_clips_response_dto.py +105 -0
  71. victorycode_sdk/models/list_team_paginated_response_dto.py +101 -0
  72. victorycode_sdk/models/list_venue_paginated_response_dto.py +101 -0
  73. victorycode_sdk/models/list_video_paginated_response_dto.py +103 -0
  74. victorycode_sdk/models/mascot.py +90 -0
  75. victorycode_sdk/models/mascot_response_dto.py +96 -0
  76. victorycode_sdk/models/not_found_error_response_dto.py +90 -0
  77. victorycode_sdk/models/offense_dto.py +92 -0
  78. victorycode_sdk/models/passing_dto.py +98 -0
  79. victorycode_sdk/models/passing_section_dto.py +101 -0
  80. victorycode_sdk/models/passing_stats_dto.py +117 -0
  81. victorycode_sdk/models/passing_totals_dto.py +111 -0
  82. victorycode_sdk/models/period_score_dto.py +94 -0
  83. victorycode_sdk/models/play_attributes_list_dto.py +106 -0
  84. victorycode_sdk/models/play_clip_list_details_dto.py +104 -0
  85. victorycode_sdk/models/play_clip_list_item_dto.py +104 -0
  86. victorycode_sdk/models/pro_scoring_play_dto.py +202 -0
  87. victorycode_sdk/models/receiving_section_dto.py +101 -0
  88. victorycode_sdk/models/receiving_stats_dto.py +104 -0
  89. victorycode_sdk/models/receiving_totals_dto.py +98 -0
  90. victorycode_sdk/models/red_zone_dto.py +90 -0
  91. victorycode_sdk/models/rushing_dto.py +92 -0
  92. victorycode_sdk/models/rushing_section_dto.py +101 -0
  93. victorycode_sdk/models/rushing_stats_dto.py +102 -0
  94. victorycode_sdk/models/rushing_totals_dto.py +96 -0
  95. victorycode_sdk/models/scoring_play_player_involved_dto.py +106 -0
  96. victorycode_sdk/models/scoring_summary_pro_team_dto.py +90 -0
  97. victorycode_sdk/models/single_classification_response_dto.py +94 -0
  98. victorycode_sdk/models/single_mascot_response_dto.py +94 -0
  99. victorycode_sdk/models/single_team_response_dto.py +94 -0
  100. victorycode_sdk/models/single_venue_response_dto.py +99 -0
  101. victorycode_sdk/models/single_video_response_dto.py +94 -0
  102. victorycode_sdk/models/team_basic_info_dto.py +96 -0
  103. victorycode_sdk/models/team_box_score_dto.py +139 -0
  104. victorycode_sdk/models/team_score_dto.py +109 -0
  105. victorycode_sdk/models/team_stats_dto.py +137 -0
  106. victorycode_sdk/models/token_response.py +92 -0
  107. victorycode_sdk/models/turnovers_dto.py +92 -0
  108. victorycode_sdk/models/unauthorized_error_response_dto.py +90 -0
  109. victorycode_sdk/models/update_classification_dto.py +90 -0
  110. victorycode_sdk/models/update_mascot_dto.py +90 -0
  111. victorycode_sdk/models/update_team_dto.py +108 -0
  112. victorycode_sdk/models/update_venue_dto.py +102 -0
  113. victorycode_sdk/models/venue.py +102 -0
  114. victorycode_sdk/models/video_list_item_dto.py +96 -0
  115. victorycode_sdk/py.typed +0 -0
  116. victorycode_sdk/rest.py +334 -0
  117. victorycode_sdk-1.0.0.dist-info/METADATA +288 -0
  118. victorycode_sdk-1.0.0.dist-info/RECORD +121 -0
  119. victorycode_sdk-1.0.0.dist-info/WHEEL +5 -0
  120. victorycode_sdk-1.0.0.dist-info/licenses/LICENSE +21 -0
  121. victorycode_sdk-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,139 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Victory Code Client API
5
+
6
+ Client APIs for Tactix partners: authenticate, upload game video, and retrieve games, plays, game recaps and team metadata.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from victorycode_sdk.models.defense_section_dto import DefenseSectionDto
23
+ from victorycode_sdk.models.fumble_section_dto import FumbleSectionDto
24
+ from victorycode_sdk.models.interception_section_dto import InterceptionSectionDto
25
+ from victorycode_sdk.models.kicking_section_dto import KickingSectionDto
26
+ from victorycode_sdk.models.passing_section_dto import PassingSectionDto
27
+ from victorycode_sdk.models.receiving_section_dto import ReceivingSectionDto
28
+ from victorycode_sdk.models.rushing_section_dto import RushingSectionDto
29
+ from typing import Optional, Set
30
+ from typing_extensions import Self
31
+ from pydantic_core import to_jsonable_python
32
+
33
+ class TeamBoxScoreDto(BaseModel):
34
+ """
35
+ TeamBoxScoreDto
36
+ """ # noqa: E501
37
+ team_id: StrictStr = Field(alias="teamId", json_schema_extra={"examples": ["69e60993e0ce1105d162eff3"]})
38
+ team_name: StrictStr = Field(alias="teamName", json_schema_extra={"examples": ["Philadelphia Eagles"]})
39
+ logo_url: Optional[StrictStr] = Field(default=None, alias="logoUrl", json_schema_extra={"examples": ["https://cdn.example.com/logos/phi.png"]})
40
+ passing: PassingSectionDto
41
+ rushing: RushingSectionDto
42
+ receiving: ReceivingSectionDto
43
+ fumbles: FumbleSectionDto
44
+ defense: DefenseSectionDto
45
+ kicking: KickingSectionDto
46
+ interceptions: InterceptionSectionDto
47
+ __properties: ClassVar[List[str]] = ["teamId", "teamName", "logoUrl", "passing", "rushing", "receiving", "fumbles", "defense", "kicking", "interceptions"]
48
+
49
+ model_config = ConfigDict(
50
+ validate_by_name=True,
51
+ validate_by_alias=True,
52
+ validate_assignment=True,
53
+ protected_namespaces=(),
54
+ )
55
+
56
+
57
+ def to_str(self) -> str:
58
+ """Returns the string representation of the model using alias"""
59
+ return pprint.pformat(self.model_dump(by_alias=True))
60
+
61
+ def to_json(self) -> str:
62
+ """Returns the JSON representation of the model using alias"""
63
+ return json.dumps(to_jsonable_python(self.to_dict()))
64
+
65
+ @classmethod
66
+ def from_json(cls, json_str: str) -> Optional[Self]:
67
+ """Create an instance of TeamBoxScoreDto from a JSON string"""
68
+ return cls.from_dict(json.loads(json_str))
69
+
70
+ def to_dict(self) -> Dict[str, Any]:
71
+ """Return the dictionary representation of the model using alias.
72
+
73
+ This has the following differences from calling pydantic's
74
+ `self.model_dump(by_alias=True)`:
75
+
76
+ * `None` is only added to the output dict for nullable fields that
77
+ were set at model initialization. Other fields with value `None`
78
+ are ignored.
79
+ """
80
+ excluded_fields: Set[str] = set([
81
+ ])
82
+
83
+ _dict = self.model_dump(
84
+ by_alias=True,
85
+ exclude=excluded_fields,
86
+ exclude_none=True,
87
+ )
88
+ # override the default output from pydantic by calling `to_dict()` of passing
89
+ if self.passing:
90
+ _dict['passing'] = self.passing.to_dict()
91
+ # override the default output from pydantic by calling `to_dict()` of rushing
92
+ if self.rushing:
93
+ _dict['rushing'] = self.rushing.to_dict()
94
+ # override the default output from pydantic by calling `to_dict()` of receiving
95
+ if self.receiving:
96
+ _dict['receiving'] = self.receiving.to_dict()
97
+ # override the default output from pydantic by calling `to_dict()` of fumbles
98
+ if self.fumbles:
99
+ _dict['fumbles'] = self.fumbles.to_dict()
100
+ # override the default output from pydantic by calling `to_dict()` of defense
101
+ if self.defense:
102
+ _dict['defense'] = self.defense.to_dict()
103
+ # override the default output from pydantic by calling `to_dict()` of kicking
104
+ if self.kicking:
105
+ _dict['kicking'] = self.kicking.to_dict()
106
+ # override the default output from pydantic by calling `to_dict()` of interceptions
107
+ if self.interceptions:
108
+ _dict['interceptions'] = self.interceptions.to_dict()
109
+ # set to None if logo_url (nullable) is None
110
+ # and model_fields_set contains the field
111
+ if self.logo_url is None and "logo_url" in self.model_fields_set:
112
+ _dict['logoUrl'] = None
113
+
114
+ return _dict
115
+
116
+ @classmethod
117
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
118
+ """Create an instance of TeamBoxScoreDto from a dict"""
119
+ if obj is None:
120
+ return None
121
+
122
+ if not isinstance(obj, dict):
123
+ return cls.model_validate(obj)
124
+
125
+ _obj = cls.model_validate({
126
+ "teamId": obj.get("teamId"),
127
+ "teamName": obj.get("teamName"),
128
+ "logoUrl": obj.get("logoUrl"),
129
+ "passing": PassingSectionDto.from_dict(obj["passing"]) if obj.get("passing") is not None else None,
130
+ "rushing": RushingSectionDto.from_dict(obj["rushing"]) if obj.get("rushing") is not None else None,
131
+ "receiving": ReceivingSectionDto.from_dict(obj["receiving"]) if obj.get("receiving") is not None else None,
132
+ "fumbles": FumbleSectionDto.from_dict(obj["fumbles"]) if obj.get("fumbles") is not None else None,
133
+ "defense": DefenseSectionDto.from_dict(obj["defense"]) if obj.get("defense") is not None else None,
134
+ "kicking": KickingSectionDto.from_dict(obj["kicking"]) if obj.get("kicking") is not None else None,
135
+ "interceptions": InterceptionSectionDto.from_dict(obj["interceptions"]) if obj.get("interceptions") is not None else None
136
+ })
137
+ return _obj
138
+
139
+
@@ -0,0 +1,109 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Victory Code Client API
5
+
6
+ Client APIs for Tactix partners: authenticate, upload game video, and retrieve games, plays, game recaps and team metadata.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Union
22
+ from victorycode_sdk.models.period_score_dto import PeriodScoreDto
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+ from pydantic_core import to_jsonable_python
26
+
27
+ class TeamScoreDto(BaseModel):
28
+ """
29
+ TeamScoreDto
30
+ """ # noqa: E501
31
+ team_id: StrictStr = Field(alias="teamId")
32
+ source_id: StrictStr = Field(alias="sourceId")
33
+ name: StrictStr
34
+ short_name: StrictStr = Field(alias="shortName")
35
+ mascot: StrictStr
36
+ classification: StrictStr
37
+ total_score: Union[StrictFloat, StrictInt] = Field(alias="totalScore")
38
+ period_scores: List[PeriodScoreDto] = Field(alias="periodScores")
39
+ __properties: ClassVar[List[str]] = ["teamId", "sourceId", "name", "shortName", "mascot", "classification", "totalScore", "periodScores"]
40
+
41
+ model_config = ConfigDict(
42
+ validate_by_name=True,
43
+ validate_by_alias=True,
44
+ validate_assignment=True,
45
+ protected_namespaces=(),
46
+ )
47
+
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ return json.dumps(to_jsonable_python(self.to_dict()))
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Optional[Self]:
59
+ """Create an instance of TeamScoreDto from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
68
+ * `None` is only added to the output dict for nullable fields that
69
+ were set at model initialization. Other fields with value `None`
70
+ are ignored.
71
+ """
72
+ excluded_fields: Set[str] = set([
73
+ ])
74
+
75
+ _dict = self.model_dump(
76
+ by_alias=True,
77
+ exclude=excluded_fields,
78
+ exclude_none=True,
79
+ )
80
+ # override the default output from pydantic by calling `to_dict()` of each item in period_scores (list)
81
+ _items = []
82
+ if self.period_scores:
83
+ for _item_period_scores in self.period_scores:
84
+ _items.append(_item_period_scores.to_dict() if _item_period_scores is not None else None)
85
+ _dict['periodScores'] = _items
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of TeamScoreDto from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "teamId": obj.get("teamId"),
99
+ "sourceId": obj.get("sourceId"),
100
+ "name": obj.get("name"),
101
+ "shortName": obj.get("shortName"),
102
+ "mascot": obj.get("mascot"),
103
+ "classification": obj.get("classification"),
104
+ "totalScore": obj.get("totalScore"),
105
+ "periodScores": [PeriodScoreDto.from_dict(_item) for _item in obj["periodScores"]] if obj.get("periodScores") is not None else None
106
+ })
107
+ return _obj
108
+
109
+
@@ -0,0 +1,137 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Victory Code Client API
5
+
6
+ Client APIs for Tactix partners: authenticate, upload game video, and retrieve games, plays, game recaps and team metadata.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from victorycode_sdk.models.down_efficiency_dto import DownEfficiencyDto
23
+ from victorycode_sdk.models.offense_dto import OffenseDto
24
+ from victorycode_sdk.models.passing_dto import PassingDto
25
+ from victorycode_sdk.models.red_zone_dto import RedZoneDto
26
+ from victorycode_sdk.models.rushing_dto import RushingDto
27
+ from victorycode_sdk.models.turnovers_dto import TurnoversDto
28
+ from typing import Optional, Set
29
+ from typing_extensions import Self
30
+ from pydantic_core import to_jsonable_python
31
+
32
+ class TeamStatsDto(BaseModel):
33
+ """
34
+ TeamStatsDto
35
+ """ # noqa: E501
36
+ team_id: StrictStr = Field(alias="teamId")
37
+ source_id: StrictStr = Field(alias="sourceId")
38
+ name: StrictStr
39
+ short_name: StrictStr = Field(alias="shortName")
40
+ mascot: StrictStr
41
+ classification: StrictStr
42
+ down_efficiency: List[DownEfficiencyDto] = Field(alias="downEfficiency")
43
+ offense: OffenseDto
44
+ passing: PassingDto
45
+ rushing: RushingDto
46
+ red_zone: RedZoneDto = Field(alias="redZone")
47
+ turnovers: TurnoversDto
48
+ __properties: ClassVar[List[str]] = ["teamId", "sourceId", "name", "shortName", "mascot", "classification", "downEfficiency", "offense", "passing", "rushing", "redZone", "turnovers"]
49
+
50
+ model_config = ConfigDict(
51
+ validate_by_name=True,
52
+ validate_by_alias=True,
53
+ validate_assignment=True,
54
+ protected_namespaces=(),
55
+ )
56
+
57
+
58
+ def to_str(self) -> str:
59
+ """Returns the string representation of the model using alias"""
60
+ return pprint.pformat(self.model_dump(by_alias=True))
61
+
62
+ def to_json(self) -> str:
63
+ """Returns the JSON representation of the model using alias"""
64
+ return json.dumps(to_jsonable_python(self.to_dict()))
65
+
66
+ @classmethod
67
+ def from_json(cls, json_str: str) -> Optional[Self]:
68
+ """Create an instance of TeamStatsDto from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self) -> Dict[str, Any]:
72
+ """Return the dictionary representation of the model using alias.
73
+
74
+ This has the following differences from calling pydantic's
75
+ `self.model_dump(by_alias=True)`:
76
+
77
+ * `None` is only added to the output dict for nullable fields that
78
+ were set at model initialization. Other fields with value `None`
79
+ are ignored.
80
+ """
81
+ excluded_fields: Set[str] = set([
82
+ ])
83
+
84
+ _dict = self.model_dump(
85
+ by_alias=True,
86
+ exclude=excluded_fields,
87
+ exclude_none=True,
88
+ )
89
+ # override the default output from pydantic by calling `to_dict()` of each item in down_efficiency (list)
90
+ _items = []
91
+ if self.down_efficiency:
92
+ for _item_down_efficiency in self.down_efficiency:
93
+ _items.append(_item_down_efficiency.to_dict() if _item_down_efficiency is not None else None)
94
+ _dict['downEfficiency'] = _items
95
+ # override the default output from pydantic by calling `to_dict()` of offense
96
+ if self.offense:
97
+ _dict['offense'] = self.offense.to_dict()
98
+ # override the default output from pydantic by calling `to_dict()` of passing
99
+ if self.passing:
100
+ _dict['passing'] = self.passing.to_dict()
101
+ # override the default output from pydantic by calling `to_dict()` of rushing
102
+ if self.rushing:
103
+ _dict['rushing'] = self.rushing.to_dict()
104
+ # override the default output from pydantic by calling `to_dict()` of red_zone
105
+ if self.red_zone:
106
+ _dict['redZone'] = self.red_zone.to_dict()
107
+ # override the default output from pydantic by calling `to_dict()` of turnovers
108
+ if self.turnovers:
109
+ _dict['turnovers'] = self.turnovers.to_dict()
110
+ return _dict
111
+
112
+ @classmethod
113
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
114
+ """Create an instance of TeamStatsDto from a dict"""
115
+ if obj is None:
116
+ return None
117
+
118
+ if not isinstance(obj, dict):
119
+ return cls.model_validate(obj)
120
+
121
+ _obj = cls.model_validate({
122
+ "teamId": obj.get("teamId"),
123
+ "sourceId": obj.get("sourceId"),
124
+ "name": obj.get("name"),
125
+ "shortName": obj.get("shortName"),
126
+ "mascot": obj.get("mascot"),
127
+ "classification": obj.get("classification"),
128
+ "downEfficiency": [DownEfficiencyDto.from_dict(_item) for _item in obj["downEfficiency"]] if obj.get("downEfficiency") is not None else None,
129
+ "offense": OffenseDto.from_dict(obj["offense"]) if obj.get("offense") is not None else None,
130
+ "passing": PassingDto.from_dict(obj["passing"]) if obj.get("passing") is not None else None,
131
+ "rushing": RushingDto.from_dict(obj["rushing"]) if obj.get("rushing") is not None else None,
132
+ "redZone": RedZoneDto.from_dict(obj["redZone"]) if obj.get("redZone") is not None else None,
133
+ "turnovers": TurnoversDto.from_dict(obj["turnovers"]) if obj.get("turnovers") is not None else None
134
+ })
135
+ return _obj
136
+
137
+
@@ -0,0 +1,92 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Victory Code Client API
5
+
6
+ Client APIs for Tactix partners: authenticate, upload game video, and retrieve games, plays, game recaps and team metadata.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
25
+
26
+ class TokenResponse(BaseModel):
27
+ """
28
+ TokenResponse
29
+ """ # noqa: E501
30
+ access_token: StrictStr = Field(description="The bearer token used for subsequent API requests.", alias="accessToken", json_schema_extra={"examples": ["eyJhbGciOiJIUzI1Ni..."]})
31
+ token_type: StrictStr = Field(description="The type of token.", alias="tokenType", json_schema_extra={"examples": ["Bearer"]})
32
+ expires_in: Union[StrictFloat, StrictInt] = Field(description="The duration of the token validity in seconds.", alias="expiresIn", json_schema_extra={"examples": [3600]})
33
+ __properties: ClassVar[List[str]] = ["accessToken", "tokenType", "expiresIn"]
34
+
35
+ model_config = ConfigDict(
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of TokenResponse from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of TokenResponse from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "accessToken": obj.get("accessToken"),
87
+ "tokenType": obj.get("tokenType"),
88
+ "expiresIn": obj.get("expiresIn")
89
+ })
90
+ return _obj
91
+
92
+
@@ -0,0 +1,92 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Victory Code Client API
5
+
6
+ Client APIs for Tactix partners: authenticate, upload game video, and retrieve games, plays, game recaps and team metadata.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
25
+
26
+ class TurnoversDto(BaseModel):
27
+ """
28
+ TurnoversDto
29
+ """ # noqa: E501
30
+ total: Union[StrictFloat, StrictInt]
31
+ fumbles_lost: Union[StrictFloat, StrictInt] = Field(alias="fumblesLost")
32
+ interceptions: Union[StrictFloat, StrictInt]
33
+ __properties: ClassVar[List[str]] = ["total", "fumblesLost", "interceptions"]
34
+
35
+ model_config = ConfigDict(
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of TurnoversDto from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of TurnoversDto from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "total": obj.get("total"),
87
+ "fumblesLost": obj.get("fumblesLost"),
88
+ "interceptions": obj.get("interceptions")
89
+ })
90
+ return _obj
91
+
92
+
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Victory Code Client API
5
+
6
+ Client APIs for Tactix partners: authenticate, upload game video, and retrieve games, plays, game recaps and team metadata.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
25
+
26
+ class UnauthorizedErrorResponseDto(BaseModel):
27
+ """
28
+ UnauthorizedErrorResponseDto
29
+ """ # noqa: E501
30
+ code: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [401]})
31
+ message: StrictStr = Field(json_schema_extra={"examples": ["Authentication failed"]})
32
+ __properties: ClassVar[List[str]] = ["code", "message"]
33
+
34
+ model_config = ConfigDict(
35
+ validate_by_name=True,
36
+ validate_by_alias=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of UnauthorizedErrorResponseDto from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of UnauthorizedErrorResponseDto from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "code": obj.get("code"),
86
+ "message": obj.get("message")
87
+ })
88
+ return _obj
89
+
90
+