Update API endpoint

This commit is contained in:
Vitiko 2021-11-25 20:34:40 -04:00
parent 9a57d179ce
commit 3a24a4666b
2 changed files with 4 additions and 3 deletions

View File

@ -71,13 +71,14 @@ class Client:
"offset": kwargs["offset"], "offset": kwargs["offset"],
"extra": "albums", "extra": "albums",
} }
elif epoint == "userLibrary/getAlbumsList": elif epoint == "favorite/getUserFavorites":
unix = time.time() unix = time.time()
r_sig = "userLibrarygetAlbumsList" + str(unix) + kwargs["sec"] r_sig = "userLibrarygetAlbumsList" + str(unix) + kwargs["sec"]
r_sig_hashed = hashlib.md5(r_sig.encode("utf-8")).hexdigest() r_sig_hashed = hashlib.md5(r_sig.encode("utf-8")).hexdigest()
params = { params = {
"app_id": self.id, "app_id": self.id,
"user_auth_token": self.uat, "user_auth_token": self.uat,
"type": "albums",
"request_ts": unix, "request_ts": unix,
"request_sig": r_sig_hashed, "request_sig": r_sig_hashed,
} }
@ -189,7 +190,7 @@ class Client:
def test_secret(self, sec): def test_secret(self, sec):
try: try:
r = self.api_call("userLibrary/getAlbumsList", sec=sec) r = self.api_call("favorite/getUserFavorites", sec=sec)
return True return True
except InvalidAppSecretError: except InvalidAppSecretError:
return False return False

View File

@ -13,7 +13,7 @@ requirements = read_file("requirements.txt").strip().split()
setup( setup(
name=pkg_name, name=pkg_name,
version="0.9.9.2", version="0.9.9.3",
author="Vitiko", author="Vitiko",
author_email="vhnz98@gmail.com", author_email="vhnz98@gmail.com",
description="The complete Lossless and Hi-Res music downloader for Qobuz", description="The complete Lossless and Hi-Res music downloader for Qobuz",