From de6a46d72a9b0bf9b3636fefea94ca3e0ab05d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVethya=E2=80=9D?= <“vethyaprogamer@gmail.com”> Date: Thu, 29 Apr 2021 17:06:39 +0700 Subject: [PATCH] Added Get Multiple Albums to Albums --- spotifyapi/Album.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spotifyapi/Album.py b/spotifyapi/Album.py index 499539e..2d87156 100644 --- a/spotifyapi/Album.py +++ b/spotifyapi/Album.py @@ -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')