diff options
| author | 2018-10-03 13:22:37 +0100 | |
|---|---|---|
| committer | 2018-10-03 13:22:37 +0100 | |
| commit | 69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch) | |
| tree | 11aa30f2a357f3be23ad97315dae3df051455cbe /modules/weather.py | |
| parent | Add a way to not add a user automatically in IRCServer.get_user (diff) | |
| signature | ||
Move src/Utils.py in to src/utils/, splitting functionality out in to modules of
related functionality
Diffstat (limited to 'modules/weather.py')
| -rw-r--r-- | modules/weather.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/weather.py b/modules/weather.py index a1c14f27..78fe0b7f 100644 --- a/modules/weather.py +++ b/modules/weather.py @@ -1,18 +1,18 @@ #--require-config openweathermap-api-key -from src import ModuleManager, Utils +from src import ModuleManager, utils URL_WEATHER = "http://api.openweathermap.org/data/2.5/weather" class Module(ModuleManager.BaseModule): - @Utils.hook("received.command.weather", min_args=1, usage="<location>") + @utils.hook("received.command.weather", min_args=1, usage="<location>") def weather(self, event): """ :help: Get current weather data for a provided location :usage: <location> """ api_key = self.bot.config["openweathermap-api-key"] - page = Utils.get_url(URL_WEATHER, get_params={ + page = utils.http.get_url(URL_WEATHER, get_params={ "q": event["args"], "units": "metric", "APPID": api_key}, json=True) |
