From b052a3e126b783daa958fb4b9bd411124822b264 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 12 Sep 2024 20:09:09 +0000 Subject: [PATCH 1/2] Refactor school search URLs in NetSchoolAPI --- netschoolapi/netschoolapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netschoolapi/netschoolapi.py b/netschoolapi/netschoolapi.py index 86cf042..69679de 100644 --- a/netschoolapi/netschoolapi.py +++ b/netschoolapi/netschoolapi.py @@ -306,7 +306,7 @@ async def schools( resp = await self._wrapped_client.request( requests_timeout, self._wrapped_client.client.build_request( - method="GET", url="schools/search", + method="GET", url="schools/search?name=Y", ) ) schools = schemas.ShortSchoolSchema().load(resp.json(), many=True) @@ -318,7 +318,7 @@ async def _get_school_id( schools = (await requester( self._wrapped_client.client.build_request( method="GET", - url="schools/search", + url=f"schools/search?name={school_name}", ) )).json() From 52f00a28f394a64337209839596b4f602223af42 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 12 Sep 2024 20:14:35 +0000 Subject: [PATCH 2/2] Refactor school search URLs to non-English characters --- netschoolapi/netschoolapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netschoolapi/netschoolapi.py b/netschoolapi/netschoolapi.py index 69679de..2767de0 100644 --- a/netschoolapi/netschoolapi.py +++ b/netschoolapi/netschoolapi.py @@ -306,7 +306,7 @@ async def schools( resp = await self._wrapped_client.request( requests_timeout, self._wrapped_client.client.build_request( - method="GET", url="schools/search?name=Y", + method="GET", url="schools/search?name=У", ) ) schools = schemas.ShortSchoolSchema().load(resp.json(), many=True)