mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-05 07:27:47 +00:00
Add Audio-Analysis Endpoint Method
This commit is contained in:
parent
3f87a8b879
commit
5e3cc1f546
@ -712,6 +712,14 @@ class Spotify(object):
|
|||||||
else:
|
else:
|
||||||
return results
|
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):
|
def _get_id(self, type, id):
|
||||||
fields = id.split(':')
|
fields = id.split(':')
|
||||||
if len(fields) >= 3:
|
if len(fields) >= 3:
|
||||||
|
Loading…
Reference in New Issue
Block a user