From e1ca998b3a31947383fae3a4c739ed66bb6f8df3 Mon Sep 17 00:00:00 2001 From: Lorenzo Farinelli Date: Mon, 10 Jul 2017 23:52:40 +0200 Subject: [PATCH] Added recently played endpoint --- spotipy/client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spotipy/client.py b/spotipy/client.py index ad0e082..a762237 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -668,6 +668,14 @@ class Spotify(object): return self._get('me/top/tracks', time_range=time_range, limit=limit, offset=offset) + def current_user_recently_played(self, limit=50): + ''' Get the current user's recently played tracks + + Parameters: + - limit - the number of entities to return + ''' + return self._get('me/player/recently-played', limit=limit) + def current_user_saved_albums_add(self, albums=[]): ''' Add one or more albums to the current user's "Your Music" library.