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 Location objects.

Return type:

list[Location]

Raises:
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:
  • session (Session) – An authenticated Session.

  • location_id (str) – The location UUID to retrieve.

Returns:

The Location with the specified ID.

Return type:

Location

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:
  • session (Session) – An authenticated Session.

  • location (str) – The location string to validate (case-insensitive).

Returns:

The correctly-cased location string.

Return type:

str

Raises:

GameSheetError – If the location is not valid.