Skip to content

Location

models concerning the location

Location

Bases: BaseModel

location model

Source code in pyclasher/api/models/location.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Location(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

    @property
    def localized_name(self):
        return self._get_data('localizedName')

    @property
    def id(self):
        return self._get_data('id')

    @property
    def name(self):
        return self._get_data('name')

    @property
    def country_code(self):
        return self._get_data('countryCode')

country_code: Missing | str property

location country code

:return: the country code of the location if available :rtype: int | MISSING

id: int property

location ID

:return: the ID of the location :rtype: int

localized_name: str property

localized name of the location

:return: the location's localized name :rtype: str

name: str property

location name

:return: the name of the location :rtype: str

LocationList

Bases: IterBaseModel

location list model

can be iterated over

Source code in pyclasher/api/models/location.py
26
27
class LocationList(IterBaseModel):
    _iter_rtype = Location