From c7d82e4fb24c970a39376bc76ddda97a15e836c0 Mon Sep 17 00:00:00 2001 From: keegansmith21 Date: Fri, 27 May 2022 09:38:44 +0800 Subject: [PATCH 1/2] Updated oapen API version url to v3 --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 4f7e5f0..3fabe2b 100644 --- a/main.py +++ b/main.py @@ -331,7 +331,7 @@ def download_access_stats_new( requestor_id = username api_key = password base_url = ( - f"https://irus.jisc.ac.uk/api/oapen/reports/oapen_ir/?platform=215&requestor_id={requestor_id}" + f"https://irus.jisc.ac.uk/api/v3/oapen/reports/oapen_ir/?platform=215&requestor_id={requestor_id}" f"&api_key={api_key}&begin_date={release_date}&end_date={release_date}" ) if publisher_uuid: From a113bc448793f6d9a0d3bdd8f1d96b79cb4cf3dd Mon Sep 17 00:00:00 2001 From: keegansmith21 Date: Mon, 30 May 2022 08:49:00 +0800 Subject: [PATCH 2/2] Updated oapen API version url to v3 in unit test --- tests/test_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_main.py b/tests/test_main.py index 07fddc6..3009c6c 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -479,7 +479,7 @@ def test_download_access_stats_new(self, mock_replace_ip): requestor_id = "requestor_id" api_key = "api_key" base_url = ( - f"https://irus.jisc.ac.uk/api/oapen/reports/oapen_ir/?platform=215&requestor_id" + f"https://irus.jisc.ac.uk/api/v3/oapen/reports/oapen_ir/?platform=215&requestor_id" f"={requestor_id}&api_key={api_key}&begin_date={release_date}&end_date={release_date}" ) if publisher_uuid: