Skip to content

Commit b2dba95

Browse files
Merge pull request #9 from Vethya/master
Added Get Multiple Albums to Albums
2 parents d93b36c + de6a46d commit b2dba95

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spotifyapi/Album.py

+10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ def get(self, albumID: str):
3232
headers={'Authorization': 'Bearer ' + self.token}
3333
).json()
3434

35+
def get_multiple(self, albumIDs: list):
36+
return requests.request(
37+
'GET',
38+
'https://api.spotify.com/v1/albums',
39+
headers={'Authorization': 'Bearer ' + self.token},
40+
params={
41+
'ids': albumIDs
42+
}
43+
).json()
44+
3545
def get_tracks(self, albumID: str, limit: int = 1):
3646
if not 0 < limit < 50:
3747
raise LimitOutOfRangeError('limit must be under 50')

0 commit comments

Comments
 (0)