diff --git a/CHANGES.txt b/CHANGES.txt index efec693..a1deee6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,4 +3,5 @@ v1.42, June 19, 2014 -- Removed dependency on simplejson v1.43, June 27, 2014 -- Fixed JSON handling issue v1.44, July 3, 2014 -- Added show_tracks.py exampole v1.45, July 7, 2014 -- Support for related artists endpoint. Don't used cache auth codes when scope changes +v1.50, August 14, 2014 -- Refactored util out of examples and into the main package diff --git a/examples/add_a_saved_track.py b/examples/add_a_saved_track.py index 72686fc..645aac8 100644 --- a/examples/add_a_saved_track.py +++ b/examples/add_a_saved_track.py @@ -6,7 +6,7 @@ import sys import spotipy import spotipy.oauth2 as oauth2 -import util +import spotipy.util as util scope = 'user-library-modify' diff --git a/examples/add_tracks_to_playlist.py b/examples/add_tracks_to_playlist.py index 69039ce..eebf0bc 100644 --- a/examples/add_tracks_to_playlist.py +++ b/examples/add_tracks_to_playlist.py @@ -6,7 +6,7 @@ import sys import spotipy import spotipy.oauth2 as oauth2 -import util +import spotipy.util as util if len(sys.argv) > 3: username = sys.argv[1] diff --git a/examples/create_playlist.py b/examples/create_playlist.py index 931094b..f72e095 100644 --- a/examples/create_playlist.py +++ b/examples/create_playlist.py @@ -7,8 +7,8 @@ import subprocess import spotipy -import util import spotipy.oauth2 as oauth2 +import spotipy.util as util if len(sys.argv) > 2: diff --git a/examples/delete_a_saved_track.py b/examples/delete_a_saved_track.py index 97f5c8a..14784b9 100644 --- a/examples/delete_a_saved_track.py +++ b/examples/delete_a_saved_track.py @@ -5,7 +5,7 @@ import sys import spotipy import spotipy.oauth2 as oauth2 -import util +import spotipy.util as util scope = 'user-library-modify' diff --git a/examples/show_my_saved_tracks.py b/examples/show_my_saved_tracks.py index eecf20e..0dbb512 100644 --- a/examples/show_my_saved_tracks.py +++ b/examples/show_my_saved_tracks.py @@ -6,7 +6,7 @@ import sys import spotipy import spotipy.oauth2 as oauth2 -import util +import spotipy.util as util scope = 'user-library-read' diff --git a/examples/user_playlists.py b/examples/user_playlists.py index d9d0b82..cfce9af 100644 --- a/examples/user_playlists.py +++ b/examples/user_playlists.py @@ -7,9 +7,8 @@ import subprocess import spotipy -import util import spotipy.oauth2 as oauth2 - +import spotipy.util as util if len(sys.argv) > 1: diff --git a/examples/user_playlists_contents.py b/examples/user_playlists_contents.py index 12c99f3..dc4beb7 100644 --- a/examples/user_playlists_contents.py +++ b/examples/user_playlists_contents.py @@ -6,9 +6,8 @@ import os import subprocess import spotipy - -import util import spotipy.oauth2 as oauth2 +import spotipy.util as util def show_tracks(results): diff --git a/examples/user_starred_playlist.py b/examples/user_starred_playlist.py index 2aa60cc..cba347c 100644 --- a/examples/user_starred_playlist.py +++ b/examples/user_starred_playlist.py @@ -2,7 +2,7 @@ import sys import spotipy -import util +import spotipy.util as util import spotipy.oauth2 as oauth2 diff --git a/setup.py b/setup.py index 534e634..b3980c8 100644 --- a/setup.py +++ b/setup.py @@ -3,11 +3,11 @@ from setuptools import setup setup( name='SpotipyWebApi', - version='1.49', + version='1.50', description='simple client for the Spotify Web API', author="@plamere", author_email="paul@echonest.com", url='http://github.com/plamere/spotipy', install_requires=['requests>=1.0'], license='LICENSE.txt', - py_modules=['spotipy', 'spotipy.oauth2'],) + py_modules=['spotipy', 'spotipy.oauth2', 'spotipy.util'],) diff --git a/examples/util.py b/spotipy/util.py similarity index 98% rename from examples/util.py rename to spotipy/util.py index f4726d6..14e068d 100644 --- a/examples/util.py +++ b/spotipy/util.py @@ -4,7 +4,7 @@ import os import subprocess import sys -import spotipy.oauth2 as oauth2 +import oauth2 def prompt_for_user_token(username, scope=None): ''' prompts the user to login if necessary and returns