* updated functionality of playlist_add_items() to accept only uris and urls (ids should not be allowed since 'track' or 'episode' cannot be inferred purely from the id)
* added a check to raise runtime error if any items in playlist_add_items() are not URIs or URLs
* modified change log
* CL format fix
---------
Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
* 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
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`.
* 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>
* Add python_requires to help pip
* Update supported versions in tox.ini
* Upgrade Python syntax with pyupgrade --py37-plus
* Bump GitHub Actions
* Add Python 3.11 and 3.12 to CI
* Remove six dependency
* Remove redundant dependencies
* Remove redudant Python 3.5 code
* Drop support for EOL Python 3.7
* Upgrade Python syntax with pyupgrade --py38-plus
* Update CHANGELOG
* More f-strings
---------
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update search_markets method to apply the total parameter to all types, fixes#534
* Add integration tests for searching multiple types in multiple markets
* Update search_markets method to apply the total parameter to all types, add tests
---------
Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
* Added test_categories_country to use optional country selection for categories method.
* Added test_categories_locale for testing locale method of categories.
* Added test_categories_limit_low and test_categories_limit_high to test the limit method of categories for edge cases.
* Rearranged for flow
* Added test_category_playlists_limit_low and test_category_playlists_limit_high for testing the limit method.
* 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 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`
Added tests for the above endpoints.
* updated CHANGELOG
* Fixed flake8 issue
Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
* fixed uri issue in playlist_add_items
All uris were being converted to track uris
making it impossible to add episodes to playlists.
* Added tests for episode adds
also fixed creep uri so those tests no longer fail
* Fixed creep_url to match creep_uri
* revert pip version, added FIX to changelog
Co-authored-by: Paul Lamere <paull@spotify.com>
* Added base funtionality for PKCE Authorization - i538
* fixed a mistake with the auth code
* fixed more misunderstandings. fixed grant_access_token to now call authorization if needed
* added comments and references to code verifier and code challenge
* removed debug print statement
* updated unit tests for new PKCE flow
* cleaned up username issues - added doc strings to class
* fixed import issue, added user endpoint tests
* forgot to commit this file
* linted
* clarified comment
* no longer generates code verifier or challenge in constructor, only when needed
* fixed flake8 complaints, added forgotten unit tests
* fixed linting with unit tests
* anotha one
* added python3.5 support
* linting
* added to CHANGELOG
* removed as_dict option from get_access_token()
Co-authored-by: tomCLANCC <26153156+tomCLANCC@users.noreply.github.com>
* Update playlist endpoints to modern format
Deprecate user_playlist_* in favor of the following replacements:
* user_playlist_change_details -> playlist_change_details
* user_playlist_unfollow -> current_user_unfollow_playlist
* user_playlist_add_tracks -> playlist_add_tracks
* user_playlist_replace_tracks -> playlist_replace_tracks
* user_playlist_reorder_tracks -> playlist_reorder_tracks
* user_playlist_remove_all_occurrences_of_tracks -> playlist_remove_all_occurrences_of_tracks
* user_playlist_remove_specific_occurrences_of_tracks -> playlist_remove_specific_occurrences_of_tracks
* user_playlist_follow_playlist -> current_user_follow_playlist
* user_playlist_is_following -> playlist_is_following
* Add current_user_following_artists and current_user_following_users
* Update tests and examples
Resolve TODO in test_user_endpoints.py > SpotifyFollowApiTests.test_user_follows_and_unfollows_user
Use modern playlist endpoints (no username required) in tests and examples.
* Update changelog
* Deprecate playlist_tracks in favor of playlist_items
* Link deprecated functions to new functions and change tracks to items
* Fix references to playlist_tracks
* Change test_playlist_add_items as requested
* resolve return object formatting issues referened in #526
* resolve comments from @ritiek
* create separate method to search multiple markets
* Use old description again
* market -> markets + fix test
* pep8
* Use break
Co-authored-by: Stephane Bruckert <contact@stephanebruckert.com>
* Add support to search multiple markets. Pass in a list or ALL to search all markets.
* pep8 formatting and verification with flake8
* work on comments from stephanebruckert
* pep8 formatting
* run autopep8 formatting
* fix typo
* allow tuple of markets to be passed. Add unit tests for this case
* Add SpotifyImplicitGrant with get_access_token and get_cached_token (and minimum related functions)
* Add some overlooked necessary methods/values in SpotifyImplicitGrant
* Remove unsuppported functionality and make SpotifyImplicitGrant public
* Allow/Expose integration of SpotifyImplicitGrant in client
* Add Implicit Grant tests and decrease abilities of prompt_for_user_token
Remove Implicit Grant and state support from prompt_for_user_token
* Add documentation and changelog entry
* Touch up PEP8 compliance
* Ignore long line with link for flake8
* Correct changelog
* Restore compatibility with Python 2.7
* Correct help(SpotifyImplicitGrant.get_access_token)
* Remove as_dict from SpotifyImplicitGrant.get_access_token
* Combine status check functionality with implicit grant support
In oauth2.py:
* Add state checking to SpotifyImplicitGrant
* Add dedicated SpotifyStateError as subclass of SpotifyOauthError
* Moved `_get_user_input` from SpotifyOAuth to superclass SpotifyAuthBase
* Renamed `parse_oauth_response_url` to `parse_auth_response_url`
* Moved error handling into `parse_auth_response_url`
Made minor changes in tests and client.py accordingly
* Update changelog
* Trim down tests for SpotifyImplicitGrant
* Fix trailing whitespace
* test_improvements - Add __init__.py files to tests dirs so you can run all tests
* test_improvements - added helpers file, restructured tests to work without previous data and to be grouped with api type
* http_retries - Implement Retry for all requests
* Readme - Update README with contributing info
* PR Feedback - Added CONTRIBUTING.md, fixed README, fixed test