From e696024b4f037289cb8aeb166df0b174567cdac6 Mon Sep 17 00:00:00 2001 From: CNDRD Date: Fri, 11 Feb 2022 21:04:30 +0100 Subject: [PATCH] load/update level attr when checked --- siegeapi/player.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/siegeapi/player.py b/siegeapi/player.py index c1d46f1..7ebbd64 100644 --- a/siegeapi/player.py +++ b/siegeapi/player.py @@ -193,7 +193,8 @@ async def load_trends(self, block_duration: TrendBlockDuration = TrendBlockDurat async def load_only_level(self) -> int: data = await self.auth.get(self.url_builder.create_level_only_url()) - return data["stats"]["PClearanceLevel"]["value"] + self.level = data["stats"]["PClearanceLevel"]["value"] + return self.level async def load_playtime(self) -> dict[str: int]: data = await self.auth.get(self.url_builder.create_playtime_url(PLAYTIME_URL_STATS))