Merge pull request #120 from hughrawlinson/patch-1

Add Audio-Analysis Endpoint Method
This commit is contained in:
Paul Lamere 2016-12-31 10:21:06 -05:00 committed by GitHub
commit ed06678353

View File

@ -746,6 +746,14 @@ class Spotify(object):
else:
return results
def audio_analysis(self, id):
''' Get audio analysis for a track based upon its Spotify ID
Parameters:
- id - a track URIs, URLs or IDs
'''
id = self._get_id('track', id)
return self._get('audio-analysis/'+id)
def _get_id(self, type, id):
fields = id.split(':')
if len(fields) >= 3: