telegram_avatar/open_weather_map_api.py
async def update_weather_data(self, city_id: int) -> None:
        """
        Main method which updates weather data and publish it into a queue.
        Args:
            city_id: the code of the city for which you want to receive
                the weather data. Code for the Moscow city by default.
        Returns:
            None.
        """
        try:
            new_temp, new_icon = await self._get_weather_data(city_id=city_id)
            self._weather_data.current_temperature = new_temp
            self._weather_data.current_weather_image = new_icon
        except (WeatherDataDownloadError, ImageDownloadError) as err:
            self._logger.exception(err)
            self._weather_data.current_temperature = None
            self._weather_data.current_weather_image = None
        return

        Main method which updates weather data and publish it into a queue.
        Args:
            city_id: the code of the city for which you want to receive
                the weather data. Code for the Moscow city by default.
        Returns:
            None.
        
Main method which updates weather data and publish it into a queue.
Main method which updates weather data and publish it into a queue .
async def update_weather_data(self, city_id: int) -> None:
        try:
            new_temp, new_icon = await self._get_weather_data(city_id=city_id)
            self._weather_data.current_temperature = new_temp
            self._weather_data.current_weather_image = new_icon
        except (WeatherDataDownloadError, ImageDownloadError) as err:
            self._logger.exception(err)
            self._weather_data.current_temperature = None
            self._weather_data.current_weather_image = None
        return
async def update_weather_data ( self , city_id : int ) -> None : try : new_temp , new_icon = await self . _get_weather_data ( city_id = city_id ) self . _weather_data . current_temperature = new_temp self . _weather_data . current_weather_image = new_icon except ( WeatherDataDownloadError , ImageDownloadError ) as err : self . _logger . exception ( err ) self . _weather_data . current_temperature = None self . _weather_data . current_weather_image = None return
Main method which updates weather data and publish it into a queue.
Main method which updates weather data and publish it into a queue .
"""
        Main method which updates weather data and publish it into a queue.
        Args:
            city_id: the code of the city for which you want to receive
                the weather data. Code for the Moscow city by default.
        Returns:
            None.
        """
None
self
city_id
int
the code of the city for which you want to receive
the weather data. Code for the Moscow city by default.
the code of the city for which you want to receive the weather data . Code for the Moscow city by default .