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,104 @@
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.play_attributes_list_dto import PlayAttributesListDto
23
+ from victorycode_sdk.models.play_clip_list_details_dto import PlayClipListDetailsDto
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class PlayClipListItemDto(BaseModel):
29
+ """
30
+ PlayClipListItemDto
31
+ """ # noqa: E501
32
+ play_id: StrictStr = Field(alias="playId", json_schema_extra={"examples": ["play-id"]})
33
+ play_number: Union[StrictFloat, StrictInt] = Field(alias="playNumber", json_schema_extra={"examples": [1]})
34
+ clip: PlayClipListDetailsDto
35
+ attributes: PlayAttributesListDto
36
+ events: List[Dict[str, Any]] = Field(json_schema_extra={"examples": [[]]})
37
+ __properties: ClassVar[List[str]] = ["playId", "playNumber", "clip", "attributes", "events"]
38
+
39
+ model_config = ConfigDict(
40
+ validate_by_name=True,
41
+ validate_by_alias=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ return json.dumps(to_jsonable_python(self.to_dict()))
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of PlayClipListItemDto from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of clip
79
+ if self.clip:
80
+ _dict['clip'] = self.clip.to_dict()
81
+ # override the default output from pydantic by calling `to_dict()` of attributes
82
+ if self.attributes:
83
+ _dict['attributes'] = self.attributes.to_dict()
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of PlayClipListItemDto from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "playId": obj.get("playId"),
97
+ "playNumber": obj.get("playNumber"),
98
+ "clip": PlayClipListDetailsDto.from_dict(obj["clip"]) if obj.get("clip") is not None else None,
99
+ "attributes": PlayAttributesListDto.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None,
100
+ "events": obj.get("events")
101
+ })
102
+ return _obj
103
+
104
+
@@ -0,0 +1,202 @@
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, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional, Union
22
+ from victorycode_sdk.models.scoring_play_player_involved_dto import ScoringPlayPlayerInvolvedDto
23
+ from victorycode_sdk.models.scoring_summary_pro_team_dto import ScoringSummaryProTeamDto
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class ProScoringPlayDto(BaseModel):
29
+ """
30
+ ProScoringPlayDto
31
+ """ # noqa: E501
32
+ drive_number: Optional[Union[StrictFloat, StrictInt]] = Field(alias="driveNumber")
33
+ drive_plays_count: Union[StrictFloat, StrictInt] = Field(alias="drivePlaysCount")
34
+ drive_yards: Optional[Union[StrictFloat, StrictInt]] = Field(alias="driveYards")
35
+ drive_time_of_possession: Optional[StrictStr] = Field(alias="driveTimeOfPossession")
36
+ play_id: StrictStr = Field(alias="playId")
37
+ team_id: StrictStr = Field(alias="teamId")
38
+ team: ScoringSummaryProTeamDto
39
+ period: Optional[Union[StrictFloat, StrictInt]]
40
+ game_clock: Optional[StrictStr] = Field(alias="gameClock")
41
+ scoring_type: StrictStr = Field(alias="scoringType")
42
+ scoring_method: StrictStr = Field(alias="scoringMethod")
43
+ try_type: Optional[StrictStr] = Field(alias="tryType")
44
+ try_method: Optional[StrictStr] = Field(alias="tryMethod")
45
+ scoring_yardage: Union[StrictFloat, StrictInt] = Field(alias="scoringYardage")
46
+ players_involved: List[ScoringPlayPlayerInvolvedDto] = Field(alias="playersInvolved")
47
+ away_team_score: Union[StrictFloat, StrictInt] = Field(alias="awayTeamScore")
48
+ home_team_score: Union[StrictFloat, StrictInt] = Field(alias="homeTeamScore")
49
+ scoring_text: StrictStr = Field(alias="scoringText")
50
+ __properties: ClassVar[List[str]] = ["driveNumber", "drivePlaysCount", "driveYards", "driveTimeOfPossession", "playId", "teamId", "team", "period", "gameClock", "scoringType", "scoringMethod", "tryType", "tryMethod", "scoringYardage", "playersInvolved", "awayTeamScore", "homeTeamScore", "scoringText"]
51
+
52
+ @field_validator('scoring_type')
53
+ def scoring_type_validate_enum(cls, value):
54
+ """Validates the enum"""
55
+ if value not in set(['TOUCHDOWN', 'FIELD_GOAL', 'SAFETY']):
56
+ raise ValueError("must be one of enum values ('TOUCHDOWN', 'FIELD_GOAL', 'SAFETY')")
57
+ return value
58
+
59
+ @field_validator('scoring_method')
60
+ def scoring_method_validate_enum(cls, value):
61
+ """Validates the enum"""
62
+ if value not in set(['RUN', 'PASS', 'FIELD_GOAL', 'KICKOFF', 'PUNT', 'EXTRA_POINT', 'TWO_POINT_CONVERSION', 'NO_PLAY', 'UNIDENTIFIABLE']):
63
+ raise ValueError("must be one of enum values ('RUN', 'PASS', 'FIELD_GOAL', 'KICKOFF', 'PUNT', 'EXTRA_POINT', 'TWO_POINT_CONVERSION', 'NO_PLAY', 'UNIDENTIFIABLE')")
64
+ return value
65
+
66
+ @field_validator('try_type')
67
+ def try_type_validate_enum(cls, value):
68
+ """Validates the enum"""
69
+ if value is None:
70
+ return value
71
+
72
+ if value not in set(['EXTRA_POINT', 'TWO_POINT_CONVERSION']):
73
+ raise ValueError("must be one of enum values ('EXTRA_POINT', 'TWO_POINT_CONVERSION')")
74
+ return value
75
+
76
+ @field_validator('try_method')
77
+ def try_method_validate_enum(cls, value):
78
+ """Validates the enum"""
79
+ if value is None:
80
+ return value
81
+
82
+ if value not in set(['RUN', 'PASS', 'FIELD_GOAL', 'KICKOFF', 'PUNT', 'EXTRA_POINT', 'TWO_POINT_CONVERSION', 'NO_PLAY', 'UNIDENTIFIABLE']):
83
+ raise ValueError("must be one of enum values ('RUN', 'PASS', 'FIELD_GOAL', 'KICKOFF', 'PUNT', 'EXTRA_POINT', 'TWO_POINT_CONVERSION', 'NO_PLAY', 'UNIDENTIFIABLE')")
84
+ return value
85
+
86
+ model_config = ConfigDict(
87
+ validate_by_name=True,
88
+ validate_by_alias=True,
89
+ validate_assignment=True,
90
+ protected_namespaces=(),
91
+ )
92
+
93
+
94
+ def to_str(self) -> str:
95
+ """Returns the string representation of the model using alias"""
96
+ return pprint.pformat(self.model_dump(by_alias=True))
97
+
98
+ def to_json(self) -> str:
99
+ """Returns the JSON representation of the model using alias"""
100
+ return json.dumps(to_jsonable_python(self.to_dict()))
101
+
102
+ @classmethod
103
+ def from_json(cls, json_str: str) -> Optional[Self]:
104
+ """Create an instance of ProScoringPlayDto from a JSON string"""
105
+ return cls.from_dict(json.loads(json_str))
106
+
107
+ def to_dict(self) -> Dict[str, Any]:
108
+ """Return the dictionary representation of the model using alias.
109
+
110
+ This has the following differences from calling pydantic's
111
+ `self.model_dump(by_alias=True)`:
112
+
113
+ * `None` is only added to the output dict for nullable fields that
114
+ were set at model initialization. Other fields with value `None`
115
+ are ignored.
116
+ """
117
+ excluded_fields: Set[str] = set([
118
+ ])
119
+
120
+ _dict = self.model_dump(
121
+ by_alias=True,
122
+ exclude=excluded_fields,
123
+ exclude_none=True,
124
+ )
125
+ # override the default output from pydantic by calling `to_dict()` of team
126
+ if self.team:
127
+ _dict['team'] = self.team.to_dict()
128
+ # override the default output from pydantic by calling `to_dict()` of each item in players_involved (list)
129
+ _items = []
130
+ if self.players_involved:
131
+ for _item_players_involved in self.players_involved:
132
+ _items.append(_item_players_involved.to_dict() if _item_players_involved is not None else None)
133
+ _dict['playersInvolved'] = _items
134
+ # set to None if drive_number (nullable) is None
135
+ # and model_fields_set contains the field
136
+ if self.drive_number is None and "drive_number" in self.model_fields_set:
137
+ _dict['driveNumber'] = None
138
+
139
+ # set to None if drive_yards (nullable) is None
140
+ # and model_fields_set contains the field
141
+ if self.drive_yards is None and "drive_yards" in self.model_fields_set:
142
+ _dict['driveYards'] = None
143
+
144
+ # set to None if drive_time_of_possession (nullable) is None
145
+ # and model_fields_set contains the field
146
+ if self.drive_time_of_possession is None and "drive_time_of_possession" in self.model_fields_set:
147
+ _dict['driveTimeOfPossession'] = None
148
+
149
+ # set to None if period (nullable) is None
150
+ # and model_fields_set contains the field
151
+ if self.period is None and "period" in self.model_fields_set:
152
+ _dict['period'] = None
153
+
154
+ # set to None if game_clock (nullable) is None
155
+ # and model_fields_set contains the field
156
+ if self.game_clock is None and "game_clock" in self.model_fields_set:
157
+ _dict['gameClock'] = None
158
+
159
+ # set to None if try_type (nullable) is None
160
+ # and model_fields_set contains the field
161
+ if self.try_type is None and "try_type" in self.model_fields_set:
162
+ _dict['tryType'] = None
163
+
164
+ # set to None if try_method (nullable) is None
165
+ # and model_fields_set contains the field
166
+ if self.try_method is None and "try_method" in self.model_fields_set:
167
+ _dict['tryMethod'] = None
168
+
169
+ return _dict
170
+
171
+ @classmethod
172
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
173
+ """Create an instance of ProScoringPlayDto from a dict"""
174
+ if obj is None:
175
+ return None
176
+
177
+ if not isinstance(obj, dict):
178
+ return cls.model_validate(obj)
179
+
180
+ _obj = cls.model_validate({
181
+ "driveNumber": obj.get("driveNumber"),
182
+ "drivePlaysCount": obj.get("drivePlaysCount"),
183
+ "driveYards": obj.get("driveYards"),
184
+ "driveTimeOfPossession": obj.get("driveTimeOfPossession"),
185
+ "playId": obj.get("playId"),
186
+ "teamId": obj.get("teamId"),
187
+ "team": ScoringSummaryProTeamDto.from_dict(obj["team"]) if obj.get("team") is not None else None,
188
+ "period": obj.get("period"),
189
+ "gameClock": obj.get("gameClock"),
190
+ "scoringType": obj.get("scoringType"),
191
+ "scoringMethod": obj.get("scoringMethod"),
192
+ "tryType": obj.get("tryType"),
193
+ "tryMethod": obj.get("tryMethod"),
194
+ "scoringYardage": obj.get("scoringYardage"),
195
+ "playersInvolved": [ScoringPlayPlayerInvolvedDto.from_dict(_item) for _item in obj["playersInvolved"]] if obj.get("playersInvolved") is not None else None,
196
+ "awayTeamScore": obj.get("awayTeamScore"),
197
+ "homeTeamScore": obj.get("homeTeamScore"),
198
+ "scoringText": obj.get("scoringText")
199
+ })
200
+ return _obj
201
+
202
+
@@ -0,0 +1,101 @@
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
21
+ from typing import Any, ClassVar, Dict, List
22
+ from victorycode_sdk.models.receiving_stats_dto import ReceivingStatsDto
23
+ from victorycode_sdk.models.receiving_totals_dto import ReceivingTotalsDto
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class ReceivingSectionDto(BaseModel):
29
+ """
30
+ ReceivingSectionDto
31
+ """ # noqa: E501
32
+ players: List[ReceivingStatsDto]
33
+ totals: ReceivingTotalsDto
34
+ __properties: ClassVar[List[str]] = ["players", "totals"]
35
+
36
+ model_config = ConfigDict(
37
+ validate_by_name=True,
38
+ validate_by_alias=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of ReceivingSectionDto from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of each item in players (list)
76
+ _items = []
77
+ if self.players:
78
+ for _item_players in self.players:
79
+ _items.append(_item_players.to_dict() if _item_players is not None else None)
80
+ _dict['players'] = _items
81
+ # override the default output from pydantic by calling `to_dict()` of totals
82
+ if self.totals:
83
+ _dict['totals'] = self.totals.to_dict()
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of ReceivingSectionDto from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "players": [ReceivingStatsDto.from_dict(_item) for _item in obj["players"]] if obj.get("players") is not None else None,
97
+ "totals": ReceivingTotalsDto.from_dict(obj["totals"]) if obj.get("totals") is not None else None
98
+ })
99
+ return _obj
100
+
101
+
@@ -0,0 +1,104 @@
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 ReceivingStatsDto(BaseModel):
27
+ """
28
+ ReceivingStatsDto
29
+ """ # noqa: E501
30
+ player_name: StrictStr = Field(alias="playerName", json_schema_extra={"examples": ["DeVonta Smith"]})
31
+ jersey_number: Union[StrictFloat, StrictInt] = Field(alias="jerseyNumber", json_schema_extra={"examples": [6]})
32
+ player_id: StrictStr = Field(alias="playerId", json_schema_extra={"examples": ["wr6"]})
33
+ receptions: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [4]})
34
+ yards: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [55]})
35
+ avg: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [13.8]})
36
+ touchdowns: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [0]})
37
+ long: Union[StrictFloat, StrictInt] = Field(description="Longest reception in yards", json_schema_extra={"examples": [28]})
38
+ targets: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [4]})
39
+ __properties: ClassVar[List[str]] = ["playerName", "jerseyNumber", "playerId", "receptions", "yards", "avg", "touchdowns", "long", "targets"]
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 ReceivingStatsDto 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
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of ReceivingStatsDto from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "playerName": obj.get("playerName"),
93
+ "jerseyNumber": obj.get("jerseyNumber"),
94
+ "playerId": obj.get("playerId"),
95
+ "receptions": obj.get("receptions"),
96
+ "yards": obj.get("yards"),
97
+ "avg": obj.get("avg"),
98
+ "touchdowns": obj.get("touchdowns"),
99
+ "long": obj.get("long"),
100
+ "targets": obj.get("targets")
101
+ })
102
+ return _obj
103
+
104
+
@@ -0,0 +1,98 @@
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 ReceivingTotalsDto(BaseModel):
27
+ """
28
+ ReceivingTotalsDto
29
+ """ # noqa: E501
30
+ receptions: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [4]})
31
+ yards: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [55]})
32
+ avg: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [13.8]})
33
+ touchdowns: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [0]})
34
+ long: Union[StrictFloat, StrictInt] = Field(description="Longest reception in yards", json_schema_extra={"examples": [28]})
35
+ targets: Union[StrictFloat, StrictInt] = Field(json_schema_extra={"examples": [4]})
36
+ __properties: ClassVar[List[str]] = ["receptions", "yards", "avg", "touchdowns", "long", "targets"]
37
+
38
+ model_config = ConfigDict(
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(to_jsonable_python(self.to_dict()))
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of ReceivingTotalsDto from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of ReceivingTotalsDto from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "receptions": obj.get("receptions"),
90
+ "yards": obj.get("yards"),
91
+ "avg": obj.get("avg"),
92
+ "touchdowns": obj.get("touchdowns"),
93
+ "long": obj.get("long"),
94
+ "targets": obj.get("targets")
95
+ })
96
+ return _obj
97
+
98
+