diff --git a/ims_envista/const.py b/ims_envista/const.py index 6376f9e..02d316c 100644 --- a/ims_envista/const.py +++ b/ims_envista/const.py @@ -9,9 +9,9 @@ GET_ALL_REGIONS_DATA_URL = ENVISTA_REGIONS_URL GET_SPECIFIC_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}" GET_SPECIFIC_REGION_DATA_URL = ENVISTA_REGIONS_URL + "/{}" -GET_LATEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data/{}/latest" -GET_EARLIEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data/{}/earliest" -GET_DAILY_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data/{}/daily" +GET_LATEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/latest" +GET_EARLIEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/earliest" +GET_DAILY_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/daily" GET_STATION_DATA_BY_DATE_URL = GET_DAILY_STATION_DATA_URL + "/{}/{}/{}" GET_MONTHLY_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/monthly" diff --git a/ims_envista/ims_envista.py b/ims_envista/ims_envista.py index 108e8c2..165bdee 100644 --- a/ims_envista/ims_envista.py +++ b/ims_envista/ims_envista.py @@ -59,7 +59,7 @@ def _shutdown(self) -> None: asyncio.run(self._session.close()) @staticmethod - def _get_channel_id_url_part(channel_id: int) -> str: + def _get_channel_id_url_part(channel_id: int | None) -> str: """Get specific Channel Id url param.""" if channel_id: return "/" + str(channel_id) @@ -74,7 +74,7 @@ async def get_latest_station_data( Args: ---- station_id (int): IMS Station Id - channel_id (int): [Optional] Specific Channel Id + channel_id (int | None): [Optional] Specific Channel Id Returns: -------