* use newer string formatters (https://pyformat.info)
* fix typo
* went through the files again, additions from #1165 are also included
* replace .format() with f strings
* Fixed scripts in examples directory that didn't work, deleted any redundant examples.
* Added examples for methods related to audiobooks, shows and episodes
* Updated changelog
---------
Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
Removed the `client_credentials_manager` and `oauth_manager` parameters because they are redundant.
Replaced the `set_auth` and `auth_manager` properties with standard attributes.
Removed the following deprecated methods from `Spotify`:
* `playlist_tracks`
* `user_playlist`
* `user_playlist_tracks`
* `user_playlist_change_details`
* `user_playlist_unfollow`
* `user_playlist_add_tracks`
* `user_playlist_replace_tracks`
* `user_playlist_reorder_tracks`
* `user_playlist_remove_all_occurrences_of_tracks`
* `user_playlist_remove_specific_occurrences_of_tracks`
* `user_playlist_follow_playlist`
* `user_playlist_is_following`
Removed the deprecated `as_dict` parameter from the `get_access_token` method of `SpotifyOAuth` and `SpotifyPKCE`.
Removed the deprecated `get_cached_token` and `_save_token_info` methods of `SpotifyOAuth` and `SpotifyPKCE`.
Removed `SpotifyImplicitGrant`.
Removed `prompt_for_user_token`.
* Added an exception clause that catches `FileNotFoundError` and logs a debug message in `SpotifyOAuth.get_cached_token`, `SpotifyPKCE.get_cached_token` and `SpotifyImplicitGrant.get_cached_token`.
* Changed docs for `auth` parameter of `Spotify.init` to `access token` instead of `authorization token`. In issue #599, a user confused the access token with the authorization code.
* Updated CHANGELOG.md
* Removed `FileNotFoundError` because it does not exist in python 2.7 (*sigh*) and replaced it with a call to `os.path.exists`.
* Replaced ` os.path.exists` with `error.errno == errno.ENOENT` to supress errors when the cache file does not exist.
* Changed docs for `search` to mention that you can provide multiple multiple types to search for. The query parameters of requests are now logged. Added log messages for when the access token and refresh tokens are retrieved and when they are refreshed. Other small grammar fixes.
* Removed duplicate word "multiple" from CHANGELOG
* * Fixed the bugs in `SpotifyOAuth.refresh_access_token` and `SpotifyPKCE.refresh_access_token` which raised the incorrect exception upon receiving an error response from the server. This addresses #645.
* Fixed a bug in `RequestHandler.do_GET` in which the non-existent `state` attribute of `SpotifyOauthError` is accessed. This bug occurs when the user clicks "cancel" in the permissions dialog that opens in the browser.
* Cleaned up the documentation for `SpotifyClientCredentials.__init__`, `SpotifyOAuth.__init__`, and `SpotifyPKCE.__init__`.
* Removed unneeded import
* Added cache handler to `SpotifyClientCredentials` and fixed a bug in refresh tokens methods that raised the wrong exception (#655)
* Added an exception clause that catches `FileNotFoundError` and logs a debug message in `SpotifyOAuth.get_cached_token`, `SpotifyPKCE.get_cached_token` and `SpotifyImplicitGrant.get_cached_token`.
* Changed docs for `auth` parameter of `Spotify.init` to `access token` instead of `authorization token`. In issue #599, a user confused the access token with the authorization code.
* Updated CHANGELOG.md
* Removed `FileNotFoundError` because it does not exist in python 2.7 (*sigh*) and replaced it with a call to `os.path.exists`.
* Replaced ` os.path.exists` with `error.errno == errno.ENOENT` to supress errors when the cache file does not exist.
* Changed docs for `search` to mention that you can provide multiple multiple types to search for. The query parameters of requests are now logged. Added log messages for when the access token and refresh tokens are retrieved and when they are refreshed. Other small grammar fixes.
* Removed duplicate word "multiple" from CHANGELOG
* * Fixed the bugs in `SpotifyOAuth.refresh_access_token` and `SpotifyPKCE.refresh_access_token` which raised the incorrect exception upon receiving an error response from the server. This addresses #645.
* Fixed a bug in `RequestHandler.do_GET` in which the non-existent `state` attribute of `SpotifyOauthError` is accessed. This bug occurs when the user clicks "cancel" in the permissions dialog that opens in the browser.
* Cleaned up the documentation for `SpotifyClientCredentials.__init__`, `SpotifyOAuth.__init__`, and `SpotifyPKCE.__init__`.
* Removed unneeded import
Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
* Made `CacheHandler` an abstract base class
Added:
* `Scope` - An enum which contains all of the authorization scopes (see [here](https://github.com/plamere/spotipy/issues/652#issuecomment-797461311)).
* Added the following endpoints
* `Spotify.current_user_saved_episodes`
* `Spotify.current_user_saved_episodes_add`
* `Spotify.current_user_saved_episodes_delete`
* `Spotify.current_user_saved_episodes_contains`
* `Spotify.available_markets
* Fixed formatting issues. Removed python 2.7 from github workflows.
* Added python 3.9 to github workflows. The type hints for set now uses the generic typing.Set instead of builtins.set.
* Changed f-string to percent-formatted string.
* Fixed the duplicate "###Changed" section in the change log.
Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
* Created a testing suite for the spotipy client.Spotify class
* Delete pyvenv.cfg
* Corrected error in description
* Added some advanced usage examples, some of which involve utilizing basic data analysis methods using other libraries such as Pandas
* Minor formatting fixes
---------
Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
* create custom urllib3.Retry class for printing warnings on rate/request limits
* move import urllib3 from client.py to util.py
* Using Retry.increment instead of Retry.is_retry. Shows the Retry-After value in the warning as well
* Making sure that max column <= 99
* add types.TracebackType
* Change warning in request/rate limit warning
* adding all parameters, just to make sure
* fixing length of line
* making sure that response is not None
* Update client.py
Added warnings in docstrings for functions that have been replaced and call other new functions.
* Update CHANGELOG.md
---------
Co-authored-by: Stéphane Bruckert <contact@stephanebruckert.com>
* Update navigational directions in Step 1(A)
* Combine directions in Step 1(B) and Step 2(C) and remove Step 2(C)
* Update navigational directions and verbage in Step 1(C)
* Change reference from Step 1(C) to Step 1(B) in Step 2(D)
* Update capitalization in Prerequisites Step 3
* Add directions for installing Spotipy in Prerequisites Step 1(A)
* List updates to TUTORIAL.md file in CHANGELOG.md
* Update docstrings for funcs in lines 340-585
* Add unit tests for artist ID and URL
* Add test_artists_mixed_ids
* Updated CHANGELOG.md and TUTORIAL.md as requested
* Update client.py and test.py
* Fix linting issue
* Remove duplicate line; Change order of prerequisites
* Update local repo
* Add test_artists_mixed_ids
* Add Radiohead ID and URL; Add qotsa URL
* Add test_artist_url
* Comment out three failing tests
* Fix linting errors
* Uncommenting out failed tests
* Add test_artist_id
* List changes in CHANGELOG.md
* Add line breaks at the end of files.
* Remove multiple spaces
Also I've removed a sentence that just doesn't make sense in my eyes, but was added before this PR.
---------
Co-authored-by: Niko <github@dieserniko.link>
* Added and revised function docstrings for util.py
* added credentials to gitignore
* Addressed request changes by reverting/modifying function docstrings to match the format used in client.py