diff options
| author | 2018-10-03 13:22:37 +0100 | |
|---|---|---|
| committer | 2018-10-03 13:22:37 +0100 | |
| commit | 69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch) | |
| tree | 11aa30f2a357f3be23ad97315dae3df051455cbe /modules/trakt.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/trakt.py')
| -rw-r--r-- | modules/trakt.py | 8 |
1 files changed, 4 insertions, 4 deletions
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, |
