pyke.models.spectator_v5

  1# generated by datamodel-codegen:
  2#   filename:  schema.json
  3#   timestamp: 2025-10-21T19:09:51+00:00
  4
  5from __future__ import annotations
  6
  7from enum import Enum
  8from typing import List, Optional
  9
 10from pydantic import BaseModel, Field
 11
 12
 13class BannedChampion(BaseModel):
 14    """@public"""
 15
 16    pick_turn: int = Field(
 17        ...,
 18        alias="pickTurn",
 19        description="The turn during which the champion was banned",
 20    )
 21    champion_id: int = Field(
 22        ..., alias="championId", description="The ID of the banned champion"
 23    )
 24    team_id: int = Field(
 25        ..., alias="teamId", description="The ID of the team that banned the champion"
 26    )
 27
 28
 29class Observer(BaseModel):
 30    """@public"""
 31
 32    encryption_key: str = Field(
 33        ...,
 34        alias="encryptionKey",
 35        description="Key used to decrypt the spectator grid game data for playback",
 36    )
 37
 38
 39class Perks(BaseModel):
 40    """@public"""
 41
 42    perk_ids: List[int] = Field(
 43        ..., alias="perkIds", description="IDs of the perks/runes assigned."
 44    )
 45    perk_style: int = Field(..., alias="perkStyle", description="Primary runes path")
 46    perk_sub_style: int = Field(
 47        ..., alias="perkSubStyle", description="Secondary runes path"
 48    )
 49
 50
 51class GameCustomizationObject(BaseModel):
 52    """@public"""
 53
 54    category: str = Field(..., description="Category identifier for Game Customization")
 55    content: str = Field(..., description="Game Customization content")
 56
 57
 58class GameMode(Enum):
 59    """@public"""
 60
 61    classic = "CLASSIC"
 62    odin = "ODIN"
 63    aram = "ARAM"
 64    tutorial = "TUTORIAL"
 65    oneforall = "ONEFORALL"
 66    ascension = "ASCENSION"
 67    firstblood = "FIRSTBLOOD"
 68    kingporo = "KINGPORO"
 69
 70
 71class GameType(Enum):
 72    """@public"""
 73
 74    custom_game = "CUSTOM_GAME"
 75    matched_game = "MATCHED_GAME"
 76    tutorial_game = "TUTORIAL_GAME"
 77
 78
 79class Participant(BaseModel):
 80    """@public"""
 81
 82    bot: bool = Field(
 83        ..., description="Flag indicating whether or not this participant is a bot"
 84    )
 85    spell2_id: int = Field(
 86        ...,
 87        alias="spell2Id",
 88        description="The ID of the second summoner spell used by this participant",
 89    )
 90    profile_icon_id: int = Field(
 91        ...,
 92        alias="profileIconId",
 93        description="The ID of the profile icon used by this participant",
 94    )
 95    puuid: Optional[str] = Field(
 96        None, description="Encrypted puuid of this participant"
 97    )
 98    champion_id: int = Field(
 99        ...,
100        alias="championId",
101        description="The ID of the champion played by this participant",
102    )
103    team_id: int = Field(
104        ...,
105        alias="teamId",
106        description="The team ID of this participant, indicating the participant's team",
107    )
108    spell1_id: int = Field(
109        ...,
110        alias="spell1Id",
111        description="The ID of the first summoner spell used by this participant",
112    )
113    riot_id: Optional[str] = Field(None, alias="riotId")
114
115
116class CurrentGameParticipant(BaseModel):
117    """@public"""
118
119    champion_id: int = Field(
120        ...,
121        alias="championId",
122        description="The ID of the champion played by this participant",
123    )
124    perks: Optional[Perks] = Field(None, description="Perks/Runes Reforged Information")
125    profile_icon_id: int = Field(
126        ...,
127        alias="profileIconId",
128        description="The ID of the profile icon used by this participant",
129    )
130    bot: bool = Field(
131        ..., description="Flag indicating whether or not this participant is a bot"
132    )
133    team_id: int = Field(
134        ...,
135        alias="teamId",
136        description="The team ID of this participant, indicating the participant's team",
137    )
138    puuid: Optional[str] = Field(
139        None, description="The encrypted puuid of this participant"
140    )
141    spell1_id: int = Field(
142        ...,
143        alias="spell1Id",
144        description="The ID of the first summoner spell used by this participant",
145    )
146    spell2_id: int = Field(
147        ...,
148        alias="spell2Id",
149        description="The ID of the second summoner spell used by this participant",
150    )
151    game_customization_objects: List[GameCustomizationObject] = Field(
152        ..., alias="gameCustomizationObjects", description="List of Game Customizations"
153    )
154    riot_id: Optional[str] = Field(None, alias="riotId")
155
156
157class FeaturedGameInfo(BaseModel):
158    """@public"""
159
160    game_mode: GameMode = Field(
161        ...,
162        alias="gameMode",
163        description="The game mode\n             (Legal values:  CLASSIC,  ODIN,  ARAM,  TUTORIAL,  ONEFORALL,  ASCENSION,  FIRSTBLOOD,  KINGPORO)",
164    )
165    game_length: int = Field(
166        ...,
167        alias="gameLength",
168        description="The amount of time in seconds that has passed since the game started",
169    )
170    map_id: int = Field(..., alias="mapId", description="The ID of the map")
171    game_type: GameType = Field(
172        ...,
173        alias="gameType",
174        description="The game type\n             (Legal values:  CUSTOM_GAME,  MATCHED_GAME,  TUTORIAL_GAME)",
175    )
176    banned_champions: List[BannedChampion] = Field(
177        ..., alias="bannedChampions", description="Banned champion information"
178    )
179    game_id: int = Field(..., alias="gameId", description="The ID of the game")
180    observers: Observer = Field(..., description="The observer information")
181    game_queue_config_id: int = Field(
182        ...,
183        alias="gameQueueConfigId",
184        description="The queue type (queue types are documented on the Game Constants page)",
185    )
186    participants: List[Participant] = Field(
187        ..., description="The participant information"
188    )
189    platform_id: str = Field(
190        ...,
191        alias="platformId",
192        description="The ID of the platform on which the game is being played",
193    )
194
195
196class CurrentGameInfo(BaseModel):
197    """@public"""
198
199    game_id: int = Field(..., alias="gameId", description="The ID of the game")
200    game_type: str = Field(..., alias="gameType", description="The game type")
201    game_start_time: int = Field(
202        ...,
203        alias="gameStartTime",
204        description="The game start time represented in epoch milliseconds",
205    )
206    map_id: int = Field(..., alias="mapId", description="The ID of the map")
207    game_length: int = Field(
208        ...,
209        alias="gameLength",
210        description="The amount of time in seconds that has passed since the game started",
211    )
212    platform_id: str = Field(
213        ...,
214        alias="platformId",
215        description="The ID of the platform on which the game is being played",
216    )
217    game_mode: str = Field(..., alias="gameMode", description="The game mode")
218    banned_champions: List[BannedChampion] = Field(
219        ..., alias="bannedChampions", description="Banned champion information"
220    )
221    game_queue_config_id: Optional[int] = Field(
222        None,
223        alias="gameQueueConfigId",
224        description="The queue type (queue types are documented on the Game Constants page)",
225    )
226    observers: Observer = Field(..., description="The observer information")
227    participants: List[CurrentGameParticipant] = Field(
228        ..., description="The participant information"
229    )
230
231
232class FeaturedGames(BaseModel):
233    """@public"""
234
235    game_list: List[FeaturedGameInfo] = Field(
236        ..., alias="gameList", description="The list of featured games"
237    )
238    client_refresh_interval: Optional[int] = Field(
239        None,
240        alias="clientRefreshInterval",
241        description="The suggested interval to wait before requesting FeaturedGames again",
242    )
class BannedChampion(pydantic.main.BaseModel):
14class BannedChampion(BaseModel):
15    """@public"""
16
17    pick_turn: int = Field(
18        ...,
19        alias="pickTurn",
20        description="The turn during which the champion was banned",
21    )
22    champion_id: int = Field(
23        ..., alias="championId", description="The ID of the banned champion"
24    )
25    team_id: int = Field(
26        ..., alias="teamId", description="The ID of the team that banned the champion"
27    )

pick_turn: int
champion_id: int
team_id: int
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class Observer(pydantic.main.BaseModel):
30class Observer(BaseModel):
31    """@public"""
32
33    encryption_key: str = Field(
34        ...,
35        alias="encryptionKey",
36        description="Key used to decrypt the spectator grid game data for playback",
37    )

encryption_key: str
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class Perks(pydantic.main.BaseModel):
40class Perks(BaseModel):
41    """@public"""
42
43    perk_ids: List[int] = Field(
44        ..., alias="perkIds", description="IDs of the perks/runes assigned."
45    )
46    perk_style: int = Field(..., alias="perkStyle", description="Primary runes path")
47    perk_sub_style: int = Field(
48        ..., alias="perkSubStyle", description="Secondary runes path"
49    )

perk_ids: List[int]
perk_style: int
perk_sub_style: int
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class GameCustomizationObject(pydantic.main.BaseModel):
52class GameCustomizationObject(BaseModel):
53    """@public"""
54
55    category: str = Field(..., description="Category identifier for Game Customization")
56    content: str = Field(..., description="Game Customization content")

category: str
content: str
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class GameMode(enum.Enum):
59class GameMode(Enum):
60    """@public"""
61
62    classic = "CLASSIC"
63    odin = "ODIN"
64    aram = "ARAM"
65    tutorial = "TUTORIAL"
66    oneforall = "ONEFORALL"
67    ascension = "ASCENSION"
68    firstblood = "FIRSTBLOOD"
69    kingporo = "KINGPORO"

classic = <GameMode.classic: 'CLASSIC'>
odin = <GameMode.odin: 'ODIN'>
aram = <GameMode.aram: 'ARAM'>
tutorial = <GameMode.tutorial: 'TUTORIAL'>
oneforall = <GameMode.oneforall: 'ONEFORALL'>
ascension = <GameMode.ascension: 'ASCENSION'>
firstblood = <GameMode.firstblood: 'FIRSTBLOOD'>
kingporo = <GameMode.kingporo: 'KINGPORO'>
class GameType(enum.Enum):
72class GameType(Enum):
73    """@public"""
74
75    custom_game = "CUSTOM_GAME"
76    matched_game = "MATCHED_GAME"
77    tutorial_game = "TUTORIAL_GAME"

custom_game = <GameType.custom_game: 'CUSTOM_GAME'>
matched_game = <GameType.matched_game: 'MATCHED_GAME'>
tutorial_game = <GameType.tutorial_game: 'TUTORIAL_GAME'>
class Participant(pydantic.main.BaseModel):
 80class Participant(BaseModel):
 81    """@public"""
 82
 83    bot: bool = Field(
 84        ..., description="Flag indicating whether or not this participant is a bot"
 85    )
 86    spell2_id: int = Field(
 87        ...,
 88        alias="spell2Id",
 89        description="The ID of the second summoner spell used by this participant",
 90    )
 91    profile_icon_id: int = Field(
 92        ...,
 93        alias="profileIconId",
 94        description="The ID of the profile icon used by this participant",
 95    )
 96    puuid: Optional[str] = Field(
 97        None, description="Encrypted puuid of this participant"
 98    )
 99    champion_id: int = Field(
100        ...,
101        alias="championId",
102        description="The ID of the champion played by this participant",
103    )
104    team_id: int = Field(
105        ...,
106        alias="teamId",
107        description="The team ID of this participant, indicating the participant's team",
108    )
109    spell1_id: int = Field(
110        ...,
111        alias="spell1Id",
112        description="The ID of the first summoner spell used by this participant",
113    )
114    riot_id: Optional[str] = Field(None, alias="riotId")

bot: bool
spell2_id: int
profile_icon_id: int
puuid: Optional[str]
champion_id: int
team_id: int
spell1_id: int
riot_id: Optional[str]
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class CurrentGameParticipant(pydantic.main.BaseModel):
117class CurrentGameParticipant(BaseModel):
118    """@public"""
119
120    champion_id: int = Field(
121        ...,
122        alias="championId",
123        description="The ID of the champion played by this participant",
124    )
125    perks: Optional[Perks] = Field(None, description="Perks/Runes Reforged Information")
126    profile_icon_id: int = Field(
127        ...,
128        alias="profileIconId",
129        description="The ID of the profile icon used by this participant",
130    )
131    bot: bool = Field(
132        ..., description="Flag indicating whether or not this participant is a bot"
133    )
134    team_id: int = Field(
135        ...,
136        alias="teamId",
137        description="The team ID of this participant, indicating the participant's team",
138    )
139    puuid: Optional[str] = Field(
140        None, description="The encrypted puuid of this participant"
141    )
142    spell1_id: int = Field(
143        ...,
144        alias="spell1Id",
145        description="The ID of the first summoner spell used by this participant",
146    )
147    spell2_id: int = Field(
148        ...,
149        alias="spell2Id",
150        description="The ID of the second summoner spell used by this participant",
151    )
152    game_customization_objects: List[GameCustomizationObject] = Field(
153        ..., alias="gameCustomizationObjects", description="List of Game Customizations"
154    )
155    riot_id: Optional[str] = Field(None, alias="riotId")

champion_id: int
perks: Optional[Perks]
profile_icon_id: int
bot: bool
team_id: int
puuid: Optional[str]
spell1_id: int
spell2_id: int
game_customization_objects: List[GameCustomizationObject]
riot_id: Optional[str]
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class FeaturedGameInfo(pydantic.main.BaseModel):
158class FeaturedGameInfo(BaseModel):
159    """@public"""
160
161    game_mode: GameMode = Field(
162        ...,
163        alias="gameMode",
164        description="The game mode\n             (Legal values:  CLASSIC,  ODIN,  ARAM,  TUTORIAL,  ONEFORALL,  ASCENSION,  FIRSTBLOOD,  KINGPORO)",
165    )
166    game_length: int = Field(
167        ...,
168        alias="gameLength",
169        description="The amount of time in seconds that has passed since the game started",
170    )
171    map_id: int = Field(..., alias="mapId", description="The ID of the map")
172    game_type: GameType = Field(
173        ...,
174        alias="gameType",
175        description="The game type\n             (Legal values:  CUSTOM_GAME,  MATCHED_GAME,  TUTORIAL_GAME)",
176    )
177    banned_champions: List[BannedChampion] = Field(
178        ..., alias="bannedChampions", description="Banned champion information"
179    )
180    game_id: int = Field(..., alias="gameId", description="The ID of the game")
181    observers: Observer = Field(..., description="The observer information")
182    game_queue_config_id: int = Field(
183        ...,
184        alias="gameQueueConfigId",
185        description="The queue type (queue types are documented on the Game Constants page)",
186    )
187    participants: List[Participant] = Field(
188        ..., description="The participant information"
189    )
190    platform_id: str = Field(
191        ...,
192        alias="platformId",
193        description="The ID of the platform on which the game is being played",
194    )

game_mode: GameMode
game_length: int
map_id: int
game_type: GameType
banned_champions: List[BannedChampion]
game_id: int
observers: Observer
game_queue_config_id: int
participants: List[Participant]
platform_id: str
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class CurrentGameInfo(pydantic.main.BaseModel):
197class CurrentGameInfo(BaseModel):
198    """@public"""
199
200    game_id: int = Field(..., alias="gameId", description="The ID of the game")
201    game_type: str = Field(..., alias="gameType", description="The game type")
202    game_start_time: int = Field(
203        ...,
204        alias="gameStartTime",
205        description="The game start time represented in epoch milliseconds",
206    )
207    map_id: int = Field(..., alias="mapId", description="The ID of the map")
208    game_length: int = Field(
209        ...,
210        alias="gameLength",
211        description="The amount of time in seconds that has passed since the game started",
212    )
213    platform_id: str = Field(
214        ...,
215        alias="platformId",
216        description="The ID of the platform on which the game is being played",
217    )
218    game_mode: str = Field(..., alias="gameMode", description="The game mode")
219    banned_champions: List[BannedChampion] = Field(
220        ..., alias="bannedChampions", description="Banned champion information"
221    )
222    game_queue_config_id: Optional[int] = Field(
223        None,
224        alias="gameQueueConfigId",
225        description="The queue type (queue types are documented on the Game Constants page)",
226    )
227    observers: Observer = Field(..., description="The observer information")
228    participants: List[CurrentGameParticipant] = Field(
229        ..., description="The participant information"
230    )

game_id: int
game_type: str
game_start_time: int
map_id: int
game_length: int
platform_id: str
game_mode: str
banned_champions: List[BannedChampion]
game_queue_config_id: Optional[int]
observers: Observer
participants: List[CurrentGameParticipant]
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class FeaturedGames(pydantic.main.BaseModel):
233class FeaturedGames(BaseModel):
234    """@public"""
235
236    game_list: List[FeaturedGameInfo] = Field(
237        ..., alias="gameList", description="The list of featured games"
238    )
239    client_refresh_interval: Optional[int] = Field(
240        None,
241        alias="clientRefreshInterval",
242        description="The suggested interval to wait before requesting FeaturedGames again",
243    )

game_list: List[FeaturedGameInfo]
client_refresh_interval: Optional[int]
model_config: ClassVar[pydantic.config.ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].