Skip to content

models

Action dataclass

Champion selection action.

Attributes:

Name Type Description
actorCellId int

Cell ID of the player performing the action.

championId int

Selected champion ID.

completed bool

Whether the action is completed.

type str

Type of action.

Source code in src\leaguewizard\models.py
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@dataclass
class Action:
    """Champion selection action.

    Attributes:
        actorCellId (int): Cell ID of the player performing the action.
        championId (int): Selected champion ID.
        completed (bool): Whether the action is completed.
        type (str): Type of action.
    """

    actorCellId: int
    championId: int
    completed: bool
    type: str

Ally dataclass

Ally team member information.

Attributes:

Name Type Description
assignedPosition str

Assigned lane or role.

cellId int

Player's cell ID.

championId int

Selected champion ID.

selectedSkinId int

Selected skin ID.

summonerId int

Player's summoner ID.

wardSkinId int

Selected ward skin ID.

Source code in src\leaguewizard\models.py
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
@dataclass
class Ally:
    """Ally team member information.

    Attributes:
        assignedPosition (str): Assigned lane or role.
        cellId (int): Player's cell ID.
        championId (int): Selected champion ID.
        selectedSkinId (int): Selected skin ID.
        summonerId (int): Player's summoner ID.
        wardSkinId (int): Selected ward skin ID.
    """

    assignedPosition: str
    cellId: int
    championId: int
    selectedSkinId: int
    summonerId: int
    wardSkinId: int

Block dataclass

A group of items within an item set.

Attributes:

Name Type Description
items list[Item]

List of items in the block.

type str

Block title or category (e.g., "Core Items").

Source code in src\leaguewizard\models.py
50
51
52
53
54
55
56
57
58
59
60
@dataclass
class Block:
    """A group of items within an item set.

    Attributes:
        items (list[Item]): List of items in the block.
        type (str): Block title or category (e.g., "Core Items").
    """

    items: list[Item]
    type: str

EventSchema dataclass

Champion selection event data structure.

Attributes:

Name Type Description
actions list[Action]

List of champion selection actions.

localPlayerCellId int

Local player's cell ID.

myTeam list[Ally]

List of ally team members.

Source code in src\leaguewizard\models.py
110
111
112
113
114
115
116
117
118
119
120
121
122
@dataclass
class EventSchema:
    """Champion selection event data structure.

    Attributes:
        actions (list[Action]): List of champion selection actions.
        localPlayerCellId (int): Local player's cell ID.
        myTeam (list[Ally]): List of ally team members.
    """

    actions: list[Action]
    localPlayerCellId: int
    myTeam: list[Ally]

Item dataclass

Individual item configuration.

Attributes:

Name Type Description
count int

Number of item units to display.

id str

Item identifier.

Source code in src\leaguewizard\models.py
63
64
65
66
67
68
69
70
71
72
73
@dataclass
class Item:
    """Individual item configuration.

    Attributes:
        count (int): Number of item units to display.
        id (str): Item identifier.
    """

    count: int
    id: str

ItemSet dataclass

Represents a single item set configuration.

Attributes:

Name Type Description
associatedChampions list[int]

Champion IDs this set applies to.

blocks list[Block]

List of item blocks in the set.

title str

Name of the item set (e.g., "Ezreal - ADC").

Source code in src\leaguewizard\models.py
35
36
37
38
39
40
41
42
43
44
45
46
47
@dataclass
class ItemSet:
    """Represents a single item set configuration.

    Attributes:
        associatedChampions (list[int]): Champion IDs this set applies to.
        blocks (list[Block]): List of item blocks in the set.
        title (str): Name of the item set (e.g., "Ezreal - ADC").
    """

    associatedChampions: list[int]
    blocks: list[Block]
    title: str

Payload dataclass

Base class for all LCU API payloads.

Source code in src\leaguewizard\models.py
 7
 8
 9
10
11
12
13
14
15
16
17
@dataclass
class Payload:
    """Base class for all LCU API payloads."""

    def asdict(self) -> dict[str, Any]:
        """Convert the payload to a dictionary.

        Returns:
            (dict[str, Any]): A dictionary representation of the payload.
        """
        return asdict(self)

asdict()

Convert the payload to a dictionary.

Returns:

Type Description
dict[str, Any]

A dictionary representation of the payload.

Source code in src\leaguewizard\models.py
11
12
13
14
15
16
17
def asdict(self) -> dict[str, Any]:
    """Convert the payload to a dictionary.

    Returns:
        (dict[str, Any]): A dictionary representation of the payload.
    """
    return asdict(self)

Payload_ItemSets dataclass

Bases: Payload

Payload for the itemsets endpoint (/lol-item-sets/v1/item-sets/{accountId}/sets).

Attributes:

Name Type Description
accountId int

Summoner account ID.

itemSets list[ItemSet] | None

List of item sets. Defaults to None.

timestamp int

Timestamp value. Defaults to 1 (unused).

Source code in src\leaguewizard\models.py
20
21
22
23
24
25
26
27
28
29
30
31
32
@dataclass
class Payload_ItemSets(Payload):
    """Payload for the itemsets endpoint (/lol-item-sets/v1/item-sets/{accountId}/sets).

    Attributes:
        accountId (int): Summoner account ID.
        itemSets (list[ItemSet] | None): List of item sets. Defaults to None.
        timestamp (int): Timestamp value. Defaults to 1 (unused).
    """

    accountId: int
    itemSets: list[ItemSet] | None = None
    timestamp: int = 1

Payload_Perks dataclass

Bases: Payload

Payload for the rune pages endpoint (/lol-perks/v1/pages).

Attributes:

Name Type Description
name str

Rune page name.

primaryStyleId int

Primary rune style ID.

subStyleId int

Secondary rune style ID.

current bool

Whether this is the current page. Defaults to True.

selectedPerkIds list[int] | None

List of selected perk IDs. Defaults to None.

Source code in src\leaguewizard\models.py
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@dataclass
class Payload_Perks(Payload):
    """Payload for the rune pages endpoint (/lol-perks/v1/pages).

    Attributes:
        name (str): Rune page name.
        primaryStyleId (int): Primary rune style ID.
        subStyleId (int): Secondary rune style ID.
        current (bool): Whether this is the current page. Defaults to True.
        selectedPerkIds (list[int] | None): List of selected perk IDs. Defaults to None.
    """

    name: str
    primaryStyleId: int
    subStyleId: int
    current: bool
    selectedPerkIds: list[int] | None = None

Payload_Spells dataclass

Bases: Payload

Payload for the spells endpoint (/lol-champ-select/v1/session/my-selection).

Attributes:

Name Type Description
spell1Id int

Summoner spell ID for the D key.

spell2Id int

Summoner spell ID for the F key.

selectedSkinId int

Selected champion skin ID.

Source code in src\leaguewizard\models.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@dataclass
class Payload_Spells(Payload):
    """Payload for the spells endpoint (/lol-champ-select/v1/session/my-selection).

    Attributes:
        spell1Id (int): Summoner spell ID for the D key.
        spell2Id (int): Summoner spell ID for the F key.
        selectedSkinId (int): Selected champion skin ID.
    """

    spell1Id: int
    spell2Id: int
    selectedSkinId: int