From f74f27df78c1a41ef2e3d3647d6af68e9e7961a0 Mon Sep 17 00:00:00 2001 From: Wes Young Date: Wed, 31 Jul 2024 12:11:47 -0400 Subject: [PATCH] problem: using legacy api as default; _get function does not retry with params --- alphahunt_sdk/__init__.py | 2 +- alphahunt_sdk/constants.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alphahunt_sdk/__init__.py b/alphahunt_sdk/__init__.py index bb49cee..47f0a12 100644 --- a/alphahunt_sdk/__init__.py +++ b/alphahunt_sdk/__init__.py @@ -287,7 +287,7 @@ def _get(self, url, params=None, retries: int = 20): sleep_time = 5 sleep(sleep_time) for _ in range(retries): - rv = self.session.get(f"{self.remote}") + rv = self.session.get(url, params=params) if rv.status_code >= 300: logger.error(rv.text) diff --git a/alphahunt_sdk/constants.py b/alphahunt_sdk/constants.py index a78e9df..454be3e 100644 --- a/alphahunt_sdk/constants.py +++ b/alphahunt_sdk/constants.py @@ -6,7 +6,7 @@ TOKEN = os.getenv("ALPHAHUNT_TOKEN") REMOTE = os.getenv("ALPHAHUNT_REMOTE", "https://api.alphahunt.io") -API_VERSION = os.getenv("ALPHAHUNT_API_VERSION", "3") +API_VERSION = os.getenv("ALPHAHUNT_API_VERSION", "4") HEADERS = { "User-Agent": f"alphahuntsdk-py/{VERSION}",