diff options
| author | 2018-10-03 13:22:37 +0100 | |
|---|---|---|
| committer | 2018-10-03 13:22:37 +0100 | |
| commit | 69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch) | |
| tree | 11aa30f2a357f3be23ad97315dae3df051455cbe /modules/spotify.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/spotify.py')
| -rw-r--r-- | modules/spotify.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/spotify.py b/modules/spotify.py index 4c2d3c57..b26a66de 100644 --- a/modules/spotify.py +++ b/modules/spotify.py @@ -1,17 +1,18 @@ import json -from src import ModuleManager, Utils +from src import ModuleManager, utils URL_SPOTIFY = "https://api.spotify.com/v1/search" class Module(ModuleManager.BaseModule): - @Utils.hook("received.command.spotify", min_args=1) + @utils.hook("received.command.spotify", min_args=1) def spotify(self, event): """ :help: Search for a track on spotify :usage: <term> """ - page = Utils.get_url(URL_SPOTIFY, get_params={"type": "track", - "limit": 1, "q": event["args"]}, json=True) + page = utils.http.get_url(URL_SPOTIFY, get_params= + {"type": "track", "limit": 1, "q": event["args"]}, + json=True) if page: if len(page["tracks"]["items"]): item = page["tracks"]["items"][0] |
