mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-04 23:17:48 +00:00
Merge pull request #120 from hughrawlinson/patch-1
Add Audio-Analysis Endpoint Method
This commit is contained in:
commit
ed06678353
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user