"""Interface to ows-track microservice.""" from conflict_manager.constants import services from conflict_manager.utils import service_utils def get_track_by_tuid(tuid): """Get track information from ows-track by tuid. Args: tuid (int): Track unique identifier Returns: oto.Response: response object containing track dict or errors """ endpoint = '/track/{}'.format(tuid) return service_utils.get_from_ows_service(services.OWS_TRACK, endpoint) def get_multiple_tracks_by_tuids(tuids): """Get track information from ows-track by tuid. Args: tuids (list): List of track unique identifier Returns: oto.Response: response object containing track dict or errors """ endpoint = '/tracks' tuids_str = ','.join([str(tuid) for tuid in tuids]) return service_utils.get_from_ows_service( services.OWS_TRACK, endpoint, params={'tuids': tuids_str})