Commit Graph

150 Commits

Author SHA1 Message Date
David Todd dabd1ff0e3 Add API auth wrapper to util 2018-04-24 19:54:45 -05:00
LoisaidaSam f42801ae90 Propagate refresh token error #259
https://github.com/plamere/spotipy/issues/259
(before upstream support)
2018-04-24 18:15:15 -05:00
David Todd 9c9ae86a23 obtain_token_localhost() use same arguments as prompt_for_user_token() 2018-04-24 16:20:08 -05:00
Cserna Zsolt f1bd67523d util.py: add local http server to serve redirects
When spotify redirects the browser to localhost, serve the page with a
simple http server implemented by HTTPServer. By this way, we can obtain
the tokens the oauth service want so provide us, and no need to input the
user the redirect URL.

This method only works when the application in spotify developer dashboard
is configured to redirect the requests to localhost.

(Added before being supported upstream: https://github.com/plamere/spotipy/pull/243)
2018-04-24 01:49:19 -05:00
Nick Sonneveld 9eb1c67726 Close request object, not the whole connection. Allows keepalive
This merges [PR-269](https://github.com/plamere/spotipy/pull/269) from
the base spotipy project ahead of it getting merged in upstream.
2018-04-24 01:21:35 -05:00
Paul Lamere 91d89c3256 Merge branch 'master' into playlist_description_support 2017-09-17 12:03:49 -04:00
Paul Lamere d31214642d Merge pull request #206 from lastfm/feature/add-show-dialog-auth-option
Add show_dialog auth url option
2017-09-17 11:57:01 -04:00
Paul Lamere 9054cfecfb Merge pull request #185 from ncordon/patch-1
Changes critical is not for !=
2017-09-17 11:50:08 -04:00
Paul Lamere c06cba6849 Merge pull request #184 from Acrobot/patch-1
Fix quote formatting according to PEP 257
2017-09-17 11:48:58 -04:00
Paul Lamere 618994c0f0 Merge pull request #183 from moyiz/master
Added support for following an artist or user
2017-09-17 11:46:53 -04:00
Paul Lamere d0143f74b0 Merge pull request #182 from happyleavesaoc/connect-api
Add connect api endpoint
2017-09-17 11:43:08 -04:00
Paul Lamere 133f66ccd9 Merge pull request #179 from richardmitic/token-scope-check
Token cache handles null scopes correctly
2017-09-17 11:40:36 -04:00
Paul Lamere cd6475f65c Merge pull request #202 from lorenzofar/master
Added recently played endpoint
2017-09-17 11:34:55 -04:00
Paul Lamere 58029fbb84 Merge pull request #173 from shantanugoel/fix_headless_execution
Fix execution on headless systems where webbrowser module may not be available
2017-09-17 11:33:44 -04:00
Paul Lamere 8297e138ca Merge pull request #191 from ErikBjare/master
Added currently playing endpoint
2017-09-17 11:32:29 -04:00
happyleaves ca3866dee6 fix append device 2017-08-17 20:57:04 -04:00
Thomas Hooper 6c3c384bf0 Add show_dialog auth url option
Optional. Whether or not to force the user to approve the app again if they’ve already done so. If false (default), a user who has already approved the application may be automatically redirected to the URI specified by redirect_uri. If true, the user will not be automatically redirected and will have to approve the app again.

From https://developer.spotify.com/web-api/authorization-guide/
2017-08-02 10:36:10 +01:00
Lorenzo Farinelli e1ca998b3a Added recently played endpoint 2017-07-10 23:57:33 +02:00
Nathan Coleman f5bb6db89f Add support for description field on playlist create/update 2017-06-02 18:51:38 -05:00
Erik Bjäreholt 9d47b98eab added currently playing endpoint 2017-05-13 10:35:48 +02:00
Nacho Cordón 5171911342 Changes critical is not for != 2017-04-14 21:04:24 +02:00
Andrzej Pomirski 7a5243dd64 Fix quote formatting according to PEP 257
PEP 257 says to use three " signs instead of ' signs.
2017-04-11 15:27:51 +02:00
moyiz 233ba44827 Added support for following an artist or user 2017-04-11 14:06:15 +03:00
happyleaves 544614f4b1 connect api 2017-04-07 16:40:50 -04:00
Richard Mitic dab5e08b7a Token cache handles null scopes correctly 2017-04-01 10:03:46 +02:00
Shantanu Goel ab2f52e81a Fix execution on headless systems where webbrowser module may not be present 2017-03-21 18:38:39 +05:30
Jesse Jarzynka 403ab1cfa1 Add cache_path as an argument to prompt_for_user_token() 2017-03-08 00:51:39 -05:00
Paul Lamere 7499d8e511 Adjusted retry sleep backoff 2017-01-22 08:04:51 -05:00
Paul Lamere 6261eae0e2 Fixed warn to work with varargs 2017-01-22 07:52:00 -05:00
Paul Lamere dc996b363f Merge pull request #158 from josduj/master
Fixes error when scope is not set
2017-01-18 17:58:22 -05:00
josduj 4f15a6f07e Fixes error when scope is not set 2017-01-18 10:26:14 +01:00
Michael Birtwell d092683be3 Make is_token_expired public
Make is_token_expired_public on SpotifyClientCredentials and SpotifyOAuth.
This method is useful for checking whether tokens that have been stored in cookies etc have timed out. So it's useful for library users to have access to it.

Refactor common implementation of is_token_expired
2017-01-07 16:21:13 +00:00
Paul Lamere f638b0c59b Merge pull request #149 from mbirtwell/python3_with_six
Use six to simplify python 2/3 compatibilty code where possible
2017-01-07 10:55:43 -05:00
Michael Birtwell 72a2fe489d Use six to simplify python 2/3 compatibilty code where possible 2017-01-07 15:18:46 +00:00
Michael Birtwell 5aadb284ff Add support for setting state in get_authorise_url
This allows for example putting a next page url in the state to be loaded after authorization completes.
2017-01-07 13:13:35 +00:00
Carlos Eduardo e2b03937e7 Update client.py
Added a check if basestring class exists (Python2 case). If doesn't exist, alias `basestring` to `str` (Python3 case).
2017-01-04 17:20:47 -02:00
Carlos Eduardo 463d6c0878 Update function to make it compatible to Python 3.
The class `basestring` does not exist in Python 3. Change to `str`.
2017-01-04 15:53:50 -02:00
Paul Lamere c8ff4b960a Fixed proxy issue 2017-01-02 12:11:27 -05:00
Sebastian Bischoff c14ee51a4c Merge branch 'master' into audio-features_one-song
* master:
  Added support for proxy
2017-01-02 14:58:52 +01:00
Sebastian Bischoff 87a4e8cb48 Add fetching of audio features of one song 2017-01-02 14:57:48 +01:00
Sebastian Bischoff 1ef89cfd2c Merge branch 'master' into proxy 2017-01-02 14:43:40 +01:00
Paul Lamere cb2d385845 Merge pull request #71 from myselfhimself/myselfhimself-scope-subsets
OAuth2: Avoid token renewal when scopes are subset of one another
2016-12-31 18:56:35 -05:00
Paul Lamere f683535165 added current_user_saved_albums_add() 2016-12-31 18:51:37 -05:00
Paul Lamere 6b8ef3f4b0 Merge branch 'support_changing_playlist_details' of https://github.com/nathancoleman/spotipy into nathancoleman-support_changing_playlist_details 2016-12-31 18:07:41 -05:00
Paul Lamere 07b6c052e3 Merge pull request #109 from lwoloszy/master
Get new access token 60 seconds before old one times out
2016-12-31 17:56:42 -05:00
Paul Lamere 01ff9f1025 Merge pull request #88 from eugenio412/patch-1
include refresh_access_token method to the library
2016-12-31 17:21:46 -05:00
Paul Lamere bfef299e43 Merge pull request #62 from mattiamaestrini/search_market
Add 'market' parameter to the search endpoint
2016-12-31 11:41:44 -05:00
Paul Lamere 920c4fbd4a Merge pull request #65 from code-kitchen/retry-after
Use 'Retry-After' header if present.
2016-12-31 11:32:32 -05:00
Paul Lamere 36c830021f added unfollow endpoint + tests 2016-12-31 10:58:01 -05:00
Paul Lamere 7632696106 Merge pull request #94 from LiYChristopher/user_unfollow
Added user_playlist_unfollow() method
2016-12-31 10:33:24 -05:00