From 69d58eede2e9bf83aa1ed1d8fcf956efde494726 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 3 Oct 2018 13:22:37 +0100 Subject: Move src/Utils.py in to src/utils/, splitting functionality out in to modules of related functionality --- modules/trakt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/trakt.py') diff --git a/modules/trakt.py b/modules/trakt.py index f25a04ae..4d125c54 100644 --- a/modules/trakt.py +++ b/modules/trakt.py @@ -1,13 +1,13 @@ #--require-config trakt-api-key -from src import ModuleManager, Utils +from src import ModuleManager, utils URL_TRAKT = "https://api-v2launch.trakt.tv/users/%s/watching" URL_TRAKTSLUG = "https://trakt.tv/%s/%s" -@Utils.export("set", {"setting": "trakt", "help": "Set username on trakt.tv"}) +@utils.export("set", {"setting": "trakt", "help": "Set username on trakt.tv"}) class Module(ModuleManager.BaseModule): - @Utils.hook("received.command.nowwatching|nw") + @utils.hook("received.command.nowwatching|nw") def now_watching(self, event): """ :help: Get what you or another user is now watching on trakt.tv @@ -18,7 +18,7 @@ class Module(ModuleManager.BaseModule): else: username = event["user"].get_setting("trakt", event["user"].nickname) - page = Utils.get_url(URL_TRAKT % username, headers={ + page = utils.http.get_url(URL_TRAKT % username, headers={ "Content-Type": "application/json", "trakt-api-version": "2", "trakt-api-key": self.bot.config["trakt-api-key"]}, json=True, -- cgit v1.3.1-10-gc9f91