LocationsClient
- class LocationsClient(client: Client)[source]
- get_all(name: str | None = None) list[BoundLocation] [source]
Get all locations
- Parameters:
name – str (optional) Can be used to filter locations by their name.
- Returns:
List[
BoundLocation
]
- get_by_id(id: int) BoundLocation [source]
Get a specific location by its ID.
- Parameters:
id – int
- Returns:
- get_by_name(name: str) BoundLocation | None [source]
Get location by name
- Parameters:
name – str Used to get location by name.
- Returns:
- get_list(name: str | None = None, page: int | None = None, per_page: int | None = None) LocationsPageResult [source]
Get a list of locations
- Parameters:
name – str (optional) Can be used to filter locations by their name.
page – int (optional) Specifies the page to fetch
per_page – int (optional) Specifies how many results are returned by page
- Returns:
(List[
BoundLocation
],Meta
)
- class Location(id: int | None = None, name: str | None = None, description: str | None = None, country: str | None = None, city: str | None = None, latitude: float | None = None, longitude: float | None = None, network_zone: str | None = None)[source]
Location Domain
- Parameters:
id – int ID of location
name – str Name of location
description – str Description of location
country – str ISO 3166-1 alpha-2 code of the country the location resides in
city – str City the location is closest to
latitude – float Latitude of the city closest to the location
longitude – float Longitude of the city closest to the location
network_zone – str Name of network zone this location resides in