From 77401f420ba0008c944722b221b12b6f3d098218 Mon Sep 17 00:00:00 2001 From: Ire <62220201+frissyn@users.noreply.github.com> Date: Wed, 22 Feb 2023 18:53:14 -0500 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=93=9D:=20quick=20lil=20update=20and?= =?UTF-8?q?=20commit=20bump~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ab61a1..0acd87d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ `valorant.py` is an unofficial API wrapper for Riot Games' Valorant API endpoints. It's modern, easy to use, feature-rich, and intuitive! +**[\*\*]** *Just a little note, the developement of this project will slow down a bit as I enter into college and other life stuff, but rest assured I don't plan on abandoning this. Thanks for understanding!* + ## Features + **Simple:** High-level abstraction of API interactions; easy to use and easy to customize. @@ -70,4 +72,4 @@ Have a bug or issue? Need help with the API? Open an [issue](https://github.com/ ## Contributing -Head over to the [**Contributing Guide**](https://github.com/frissyn/valorant.py/blob/master/.github/CONTRIBUTING.md) page. \ No newline at end of file +Head over to the [**Contributing Guide**](https://github.com/frissyn/valorant.py/blob/master/.github/CONTRIBUTING.md) page. From a04210094ee1fb63971ae4c7760caa1ddc30e969 Mon Sep 17 00:00:00 2001 From: Ire <62220201+frissyn@users.noreply.github.com> Date: Wed, 7 Jun 2023 12:32:57 -0400 Subject: [PATCH 2/4] =?UTF-8?q?=E2=9A=97=EF=B8=8F:=20fix=20issues=20with?= =?UTF-8?q?=20testing=20account=20information?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/client/test_account.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/client/test_account.py b/tests/client/test_account.py index 8a002cc..3eb6df5 100644 --- a/tests/client/test_account.py +++ b/tests/client/test_account.py @@ -11,11 +11,12 @@ def test_account(self): "_7wNdRyj4cljexSBoGCESzJglohUbAM4H5kw" ) - self.assertEqual(getattr(acc, "gameName", None), "frissyn") self.assertIsInstance(acc, valorant.AccountDTO) + self.assertEqual(getattr(acc, "gameName", None), "frissyn") def test_account_by_name(self): - acc = self.client.get_user_by_name("frissyn#6969") + # Using my static alternate account. + acc = self.client.get_user_by_name("friss#sick") - self.assertEqual(getattr(acc, "gameName", None), "frissyn") self.assertIsInstance(acc, valorant.AccountDTO) + self.assertEqual(getattr(acc, "gameName", None), "friss") From d6398f816f19c4eee0804f27069ccc0218d9f023 Mon Sep 17 00:00:00 2001 From: Mert Kamil2 Date: Wed, 8 Jan 2025 01:21:00 +0300 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=94=A7:=20update=20playerStats=20type?= =?UTF-8?q?=20at=20RoundResultDTO=20to=20PlayerRoundStatsDTO=20in=20RoundR?= =?UTF-8?q?esultDTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- valorant/objects/match.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valorant/objects/match.py b/valorant/objects/match.py index 895772d..1448016 100644 --- a/valorant/objects/match.py +++ b/valorant/objects/match.py @@ -144,7 +144,7 @@ class RoundResultDTO(DTO): defuseRoundTime: int defusePlayerLocations: t.Optional[t.List[PlayerLocationsDTO]] defuseLocation: LocationDTO - playerStats: t.List[PlayerStatsDTO] + playerStats: t.List[PlayerRoundStatsDTO] roundResultCode: str def __init__(self, obj): From 6207bb3bd9f3d52502a39d08b204770ebc25cbbd Mon Sep 17 00:00:00 2001 From: Mert Kamil2 Date: Wed, 8 Jan 2025 14:21:21 +0300 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=A7:=20enhance=20PlayerRoundStatsD?= =?UTF-8?q?TO=20to=20include=20kills=20and=20damage=20lists;=20update=20Pl?= =?UTF-8?q?ayerDTO=20to=20use=20PlayerStatsDTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- valorant/objects/match.py | 8 +++++++- valorant/objects/player.py | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/valorant/objects/match.py b/valorant/objects/match.py index 1448016..ced66bf 100644 --- a/valorant/objects/match.py +++ b/valorant/objects/match.py @@ -125,7 +125,13 @@ class PlayerRoundStatsDTO(DTO): def __init__(self, obj): super().__init__(obj) - + + self.kills = ContentList( + KillDTO(k) for k in obj["kills"] + ) + self.damage = ContentList( + DamageDTO(d) for d in obj["damage"] + ) self.economy = EconomyDTO(obj["economy"]) self.ability = AbilityDTO(obj["ability"]) diff --git a/valorant/objects/player.py b/valorant/objects/player.py index b737f72..2038d87 100644 --- a/valorant/objects/player.py +++ b/valorant/objects/player.py @@ -81,11 +81,12 @@ class PlayerDTO(DTO): competitiveTier: int playerCard: str playerTitle: str + accountLevel: int def __init__(self, obj): super().__init__(obj) - self.stats = PlayerDTO.optional(obj.get("stats")) + self.stats = PlayerStatsDTO.optional(obj.get("stats")) if obj.get("competitiveTier"): self.rank = Lex.RANKS[self.competitiveTier]