Skip to content

Commit

Permalink
Merge pull request #9 from Vethya/master
Browse files Browse the repository at this point in the history
Added Get Multiple Albums to Albums
  • Loading branch information
scientific-dev authored Apr 29, 2021
2 parents d93b36c + de6a46d commit b2dba95
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spotifyapi/Album.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ def get(self, albumID: str):
headers={'Authorization': 'Bearer ' + self.token}
).json()

def get_multiple(self, albumIDs: list):
return requests.request(
'GET',
'https://api.spotify.com/v1/albums',
headers={'Authorization': 'Bearer ' + self.token},
params={
'ids': albumIDs
}
).json()

def get_tracks(self, albumID: str, limit: int = 1):
if not 0 < limit < 50:
raise LimitOutOfRangeError('limit must be under 50')
Expand Down

0 comments on commit b2dba95

Please sign in to comment.