Commit Graph

56 Commits

Author SHA1 Message Date
Stéphane Bruckert
d211a33618
Update CHANGELOG.md 2020-07-27 06:51:21 +01:00
BozeBro
f95d065a38
Update CHANGELOG.md (#548) 2020-07-27 06:49:45 +01:00
Esamanoaz
36bbf7d15e
Give a reason for player errors in SpotifyException (#543)
* Added reason to SpotifyException

* Updated the changelog

* Fixing code style

Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
2020-07-23 17:08:47 +01:00
Yingshiuan Pan
bb4c98033f
Advertise preferred language to Spotify (#544)
Some artist or track provide different translation for different language
usage. This requires send http request with Accept-Language in header.
Create this option for people who wants to see proper translation.
2020-07-23 17:06:28 +01:00
DJSdev
c425102659
Adding Initial PKCE Auth Flow Support (#542)
* 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>
2020-07-21 17:08:09 +01:00
IdmFoundInHim
88cf75b778
Update Playlist Endpoints and Add Following Endpoints (#531)
* 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
2020-07-11 11:23:18 +01:00
foobuzz
cc5e234a28
Allow for total headless mode by instructing the user to open the URL in a browser. (#528)
* Allow for total headless mode by instructing the user to open the URL in a browser.

* Fix line too long

* Update changelog

* Clarify changelog entry

* Remove reduntant log about pasting the URL.
2020-07-08 17:45:17 +01:00
Nathan LeRoy
2bfa7e0151
Add support to search multiple markets at once (#526)
* 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
2020-07-03 19:31:52 +01:00
Stephane Bruckert
24df9ea4cf Bump to 2.13.0 2020-06-25 22:04:44 +01:00
IdmFoundInHim
38515689bc
Support Implicit Grant Authorization Flow (Fix #499) (#515)
* 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
2020-06-25 21:39:51 +01:00
kenmacf
d7ebc611b2
Enable market parameter for album_tracks (#516)
* enable market parameter for album_tracks

* update album_tracks docstring, add CHANGELOG entry
2020-06-19 22:30:54 +01:00
Stephane Bruckert
c7f2edf343 Deprecate util.prompt_for_user_token() 2020-06-14 18:01:14 +01:00
Yasser Sinjab
99f636d6e7 Add changelog 2020-05-28 02:23:16 +03:00
Stephane Bruckert
2584d8cf56 Bump to 2.12.0 2020-04-26 23:56:16 +01:00
Dj
b09c1585c1
Remove basicConfig as it is not needed, fixes #478 (#482) 2020-04-26 23:52:57 +01:00
rako77
71a19de031
Added a method to update the auth token (#479)
* Added a method to update the auth token

* trying to fix errors
2020-04-26 21:39:12 +01:00
Stephane Bruckert
c58501972c Bump to 2.11.2 2020-04-19 22:46:32 +01:00
Stephane Bruckert
73654a0646 Bump to 2.11.1 2020-04-11 17:43:13 +01:00
Stephane Bruckert
02cd9b0923 Improve URL parsing, fixes #171, fixes #253, fixes #276, solves #467 2020-04-11 17:40:26 +01:00
Stephane Bruckert
a61422ef4b Bump to 2.11.0 2020-04-11 13:32:43 +01:00
Dj
b01adba826
Print -> Logging, fixes #84 (#461) 2020-04-03 23:03:09 +01:00
Loisaida Sam
ccfda079c8
Propagate refresh token error, fixes #259 (#261)
* Propagate refresh token error #259

https://github.com/plamere/spotipy/issues/259

* Lint

* Format

Co-authored-by: Stephane Bruckert <contact@stephanebruckert.com>
2020-04-02 20:03:24 +01:00
AlPoza
5b5b30dd0f
Add session in SpotifyAuthBase (#383)
Co-authored-by: XIS01536 <apozadel@extern.isban.es>
Co-authored-by: Stephane Bruckert <contact@stephanebruckert.com>
2020-04-01 23:02:56 +01:00
Stephane Bruckert
6d7fe6c195 Close session when spotipy is unloaded, fixes #90 2020-04-01 21:57:56 +01:00
Stephane Bruckert
73aac90bbe Auto-close auth browser window 2020-04-01 21:25:48 +01:00
Dj
7a06046e2b
http-retries - documented changes for issue (#347) (#460) 2020-03-29 22:57:43 +01:00
Stephane Bruckert
4b8350b8bc Bump to 2.10.0 2020-03-18 20:39:26 +00:00
Stephane Bruckert
3baa19abd1 Release with CHANGELOG + LICENSE, solves #454 2020-03-18 20:34:22 +00:00
Peter-Schorn
3fb2454740
Update CHANGELOG (#453) 2020-03-13 00:58:32 +00:00
Stephane Bruckert
76522dfd1e Bump to 2.9.0 2020-02-15 19:48:21 +00:00
Alexey Paramonov
1f1e90ed39
Add requests_timeout parameter to auth module (#233) 2020-02-13 00:04:40 +00:00
Stephane Bruckert
2273696850 Add position_ms to start_playback 2020-02-12 23:35:38 +00:00
Stephane Bruckert
db65b98790 Bump to 2.8.0 2020-02-12 22:42:20 +00:00
Stefano
4515446a65 Auto-refresh AuthCode flow token. (#435)
* Auto-refresh AuthCode flow token.

* Reformatted.

* Reformatted.

* Removed invalid syntax.

* Removed abstract class SpotifyAuthManager.

* Fix typo on docstrings.

* Optionally try to fetch main input parameters from environment.

Implements the capability of trying to fetch the following parameters from the environment, when they're not directly passed to the authorization handler.
The affected parameters are: client_id, client_secret, redirect_uri.
An SpotifyOauthError is raised if no value gets found.

* Removed f-string for Python2 compatibility.

* Fix line-too-long.

* Remove useless import.

* Add username to docstring.

* Remove redundant return.

* Fix empty lines print statement for backward compatibility with Python2.

* Update simple4 example.

* Set optional 'as_dict' parameter on OAuth 'get_access_token'.

* Update changelog.

Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
2020-02-10 10:20:02 +00:00
Stephane Bruckert
93412a7b78 Add query doc link, closes #268 2020-02-02 16:04:44 +00:00
Wil Collins
ff7c33e97d Support after/before in current_user_recently_played 2020-01-26 13:50:45 +00:00
CyanBook
349587ca32 Support for playlist_cover_image (#431) 2020-01-26 13:20:20 +00:00
Stephane Bruckert
26db832e24 Temporarily revert #428 2020-01-23 10:06:19 +00:00
Stephane Bruckert
bc7d49ca50 Fix changelog 2020-01-22 21:39:38 +00:00
Peter
87a72a060f Automatic refresh of Authorization Code Flow Tokens in long-running Applications (#428)
* auto-refresh user token

* example for a long-running user-request app

* wrap long lines

* combine duplicate code into _refresh_token_if_expired method

* add changelog entry
2020-01-22 20:01:30 +00:00
Stephane Bruckert
feb31325ef Bump to 2.7.1 2020-01-20 22:00:36 +00:00
Stephane Bruckert
30b7ea198f Bump to 2.7.0 2020-01-20 21:56:54 +00:00
Stéphane Bruckert
1807905572
Support to upload playlist covers (#416) 2020-01-20 19:56:24 +00:00
Stephane Bruckert
3d22cf29ce Deprecate old endpoints 2020-01-16 23:14:52 +00:00
Stephane Bruckert
6da643e8c1 Bump to 2.6.3 2020-01-16 18:00:27 +00:00
Stephane Bruckert
07505d720c Bump to 2.6.2 2020-01-16 04:14:42 +00:00
Stephane Bruckert
83a1cb54ef Fix doc and readme 2020-01-16 03:54:39 +00:00
dependabot[bot]
7229cc4edc Bump requests from 2.3.0 to 2.20.0 (#400)
* Bump requests from 2.3.0 to 2.20.0

Bumps [requests](https://github.com/requests/requests) from 2.3.0 to 2.20.0.
- [Release notes](https://github.com/requests/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/requests/requests/compare/v2.3.0...v2.20.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
2020-01-15 10:36:55 +00:00
Stephane Bruckert
c591126842 Changelog 2020-01-13 20:12:07 +00:00
Stephane Bruckert
7d507ad224 Bump to 2.6.1 2020-01-13 17:05:06 +00:00