Module valolyticspy.services.helper.map_from_mapId
Expand source code
import sys
sys.path.append("")
from valolyticspy.services.dto_loader import ValorantDTO
from valolyticspy.dtos.valorant_api.map import Map
def get_map_from_mapId(mapId:str) -> Map:
"""
Retrieves a map object based on the given mapId.
Args:
mapId (str): The mapId to search for.
Returns:
Map: The map object corresponding to the given mapId, or None if not found.
"""
for map in ValorantDTO.MAPS.values():
if(map.mapUrl == mapId):
return map
Functions
def get_map_from_mapId(mapId: str) ‑> Map-
Retrieves a map object based on the given mapId.
Args
mapId:str- The mapId to search for.
Returns
Map- The map object corresponding to the given mapId, or None if not found.
Expand source code
def get_map_from_mapId(mapId:str) -> Map: """ Retrieves a map object based on the given mapId. Args: mapId (str): The mapId to search for. Returns: Map: The map object corresponding to the given mapId, or None if not found. """ for map in ValorantDTO.MAPS.values(): if(map.mapUrl == mapId): return map