From f3fd0e2be17b92d727609115ed16923d46563c78 Mon Sep 17 00:00:00 2001 From: Buksii1449 <46625589+Buksii1449@users.noreply.github.com> Date: Fri, 16 Oct 2020 20:20:55 +0200 Subject: [PATCH] Added a single if statement, so .version_for_region requests can use the same region vars as the other requests Added two lines so you can use "eun1" and "oc1" for datadragon .versions_for_region requests too (it uses "eune" instead of "eun1", same with "oc1"/"oce") --- src/riotwatcher/_apis/league_of_legends/DataDragonApi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/riotwatcher/_apis/league_of_legends/DataDragonApi.py b/src/riotwatcher/_apis/league_of_legends/DataDragonApi.py index 85849ae..15f8114 100644 --- a/src/riotwatcher/_apis/league_of_legends/DataDragonApi.py +++ b/src/riotwatcher/_apis/league_of_legends/DataDragonApi.py @@ -41,6 +41,8 @@ def summoner_spells(self, version: str, locale: str = None): def versions_for_region(self, region: str): region = re.sub(r"\d", "", region) + if(region == "eun" or region == "oc"): + region += "e" url, query = DataDragonUrls.versions(region=region) return self._base_api.raw_request_static(url, query)