gamesheet_sdk.admin.games.locations module¶
Location operations for games.
- gamesheet_sdk.admin.games.locations.list_locations(session)[source]¶
Return the list of valid locations.
Fetches the current list of locations/venues from the main API. The returned locations include venue name and surface name which together form the location identifier used when creating or updating scheduled games.
- Parameters:
session (Session) – An authenticated
Session.- Returns:
A list of
Locationobjects.- Return type:
- Raises:
AuthenticationError – If the server returns 401 or 403.
GameSheetError – For any other non-2xx response.
- gamesheet_sdk.admin.games.locations.get_location(session, location_id)[source]¶
Get a specific location by ID.
Fetches the list of all locations and returns the one matching the given ID.
- Parameters:
- Returns:
The
Locationwith the specified ID.- Return type:
- Raises:
GameSheetError – If the location ID is not found.
- gamesheet_sdk.admin.games.locations.validate_location(session, location)[source]¶
Validate a location and return the correctly-cased version.
Fetches the list of valid locations and performs a case-insensitive match against the concatenation of location_name + “ “ + surface_name. Returns the correctly-cased full location name.
- Parameters:
- Returns:
The correctly-cased location string.
- Return type:
- Raises:
GameSheetError – If the location is not valid.