Skip to content

RoomsAPI

hmwrapper.rooms.RoomsAPI

Interface to Hallmaster room endpoints.

get_color_map()

Build a {color_hex: room_name} mapping from the scheduler page.

HallMaster identifies rooms by CSS color in scheduler/booking views. This scrapes the scheduler HTML to extract the color-to-room mapping.

Returns:

Type Description
dict[str, str]

Dict mapping normalized uppercase hex colors (e.g. "#FF6600")

dict[str, str]

to room names (e.g. "Main Hall").

get_descriptions()

Get room descriptions.

get_room_lookup()

Build a {room_id: room_name} lookup dict.

Fetches rooms if not already cached.

list_rooms()

Get rooms available for booking.

list_rooms_grid()

Get rooms from the admin grid endpoint.

resolve_room(color)

Resolve a booking color to a room name.

Parameters:

Name Type Description Default
color str

Hex color string from a booking/event (e.g. "#ff6600").

required

Returns:

Type Description
str

Room name, or "Unknown Room" if no match.