'Set a playlist to be current and returns the current state.'

def play_playlist(self, playlist_id_or_name):

    response = self._request('GET', '/playlists')
    playlists = response.get('playlists', [])
    found_playlists = [playlist for playlist in playlists if (playlist_id_or_name in [playlist['name'], playlist['id']])]
    if found_playlists:
        playlist = found_playlists[0]
        path = (('/playlists/' + playlist['id']) + '/play')
        return self._request('PUT', path)
