Source code for hoda.plumbing.weather
# hoda.plumbing.weather: wrapper for the weather endpoint
# Copyright (c) 2021-2022 soopyc
#
# This file is part of hoda.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from .. import constants
[docs]class Weather:
"""Class to interact with the weather information API."""
[docs] def __init__(self, session=None, *, language: constants.LANGUAGE = 'en'):
"""Initialize the class
:param session: aiohttp session, leave blank to let the library create one for you.
:kwarg language: Language to use
"""
if not session:
self.session = ...
def _test(self):
self.weather()