From a70f0c17337b8ae2981c8c3484da9be581d3d1dd Mon Sep 17 00:00:00 2001 From: Ramon Saraiva Date: Mon, 2 Sep 2019 06:56:02 -0300 Subject: [PATCH 1/8] Sync with V6.0.0 --- pubg_python/domain/base.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pubg_python/domain/base.py b/pubg_python/domain/base.py index 2b814d9..707ff1b 100644 --- a/pubg_python/domain/base.py +++ b/pubg_python/domain/base.py @@ -119,6 +119,7 @@ def from_dict(self): self.stats = self.attributes.get('stats') self.tags = self.attributes.get('tags') self.title_id = self.attributes.get('titleId') + self.season_state = self.attributes.get('seasonState') class Roster(Domain): @@ -148,8 +149,6 @@ def unpack_stats(self): self.headshot_kills = self.stats.get('headshotKills') self.heals = self.stats.get('heals') self.kill_place = self.stats.get('killPlace') - self.kill_points = self.stats.get('killPoints') - self.kill_points_delta = self.stats.get('killPointsDelta') self.kill_streaks = self.stats.get('killStreaks') self.kills = self.stats.get('kills') self.longest_kill = self.stats.get('longestKill') @@ -166,8 +165,7 @@ def unpack_stats(self): self.walk_distance = self.stats.get('walkDistance') self.weapons_acquired = self.stats.get('weaponsAcquired') self.win_place = self.stats.get('winPlace') - self.win_points = self.stats.get('winPoints') - self.win_points_delta = self.stats.get('winPointsDelta') + self.rank_points = self.stats.get('rankPoints') class Asset(Domain): @@ -232,7 +230,6 @@ def from_dict(self): self.daily_wins = self._data.get('dailyWins') self.headshot_kills = self._data.get('headshotKills') self.heals = self._data.get('heals') - self.kill_points = self._data.get('killPoints') self.kills = self._data.get('kills') self.longest_kill = self._data.get('longestKill') self.longest_time_survived = self._data.get('longestTimeSurvived') @@ -256,8 +253,8 @@ def from_dict(self): self.weapons_acquired = self._data.get('weaponsAcquired') self.weekly_kills = self._data.get('weeklyKills') self.weekly_wins = self._data.get('weeklyWins') - self.win_points = self._data.get('winPoints') self.wins = self._data.get('wins') + self.best_rank_point = self._data.get('bestRankPoint') class Leaderboard(Domain): From 5c6238f34a78e591d500bd900e022b3949cbade0 Mon Sep 17 00:00:00 2001 From: Ramon Saraiva Date: Mon, 2 Sep 2019 07:03:10 -0300 Subject: [PATCH 2/8] Sync with V7.0.0 --- pubg_python/domain/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pubg_python/domain/base.py b/pubg_python/domain/base.py index 707ff1b..d1d68b0 100644 --- a/pubg_python/domain/base.py +++ b/pubg_python/domain/base.py @@ -19,6 +19,7 @@ class Shard(Enum): XBOX_EU = 'xbox-eu' # Europe XBOX_NA = 'xbox-na' # North America XBOX_OC = 'xbox-oc' # Oceania + XBOX_SA = 'xbox-sa' # South America KAKAO = 'kakao' # Kakao PSN = 'psn' STEAM = 'steam' From 3cf1d392d563eded5332a7e8624777ad15890383 Mon Sep 17 00:00:00 2001 From: Ramon Saraiva Date: Mon, 2 Sep 2019 07:04:13 -0300 Subject: [PATCH 3/8] Sync with V7.2.0 --- pubg_python/domain/base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pubg_python/domain/base.py b/pubg_python/domain/base.py index d1d68b0..86fac2c 100644 --- a/pubg_python/domain/base.py +++ b/pubg_python/domain/base.py @@ -166,7 +166,6 @@ def unpack_stats(self): self.walk_distance = self.stats.get('walkDistance') self.weapons_acquired = self.stats.get('weaponsAcquired') self.win_place = self.stats.get('winPlace') - self.rank_points = self.stats.get('rankPoints') class Asset(Domain): From 9cd240e807b89c6485a86b9835059e88b53ea957 Mon Sep 17 00:00:00 2001 From: Ramon Saraiva Date: Mon, 2 Sep 2019 07:12:28 -0300 Subject: [PATCH 4/8] Sync with V12.0.0 --- pubg_python/domain/base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pubg_python/domain/base.py b/pubg_python/domain/base.py index 86fac2c..09df96c 100644 --- a/pubg_python/domain/base.py +++ b/pubg_python/domain/base.py @@ -153,7 +153,6 @@ def unpack_stats(self): self.kill_streaks = self.stats.get('killStreaks') self.kills = self.stats.get('kills') self.longest_kill = self.stats.get('longestKill') - self.most_damage = self.stats.get('mostDamage') self.name = self.stats.get('name') self.player_id = self.stats.get('playerId') self.revives = self.stats.get('revives') From 15ec5425ef00f7b92ede1b5cd7d2e38eead978da Mon Sep 17 00:00:00 2001 From: Ramon Saraiva Date: Mon, 2 Sep 2019 07:15:36 -0300 Subject: [PATCH 5/8] Sync with V14.0.0 --- pubg_python/domain/base.py | 2 +- pubg_python/domain/telemetry/events.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pubg_python/domain/base.py b/pubg_python/domain/base.py index 09df96c..ec49989 100644 --- a/pubg_python/domain/base.py +++ b/pubg_python/domain/base.py @@ -199,6 +199,7 @@ def from_dict(self): super().from_dict() self.is_current_season = self.attributes.get('isCurrentSeason') self.is_off_season = self.attributes.get('isOffSeason') + self.best_rank_point = self.attributes.get('bestRankPoint') class Playerseason(Domain): @@ -253,7 +254,6 @@ def from_dict(self): self.weekly_kills = self._data.get('weeklyKills') self.weekly_wins = self._data.get('weeklyWins') self.wins = self._data.get('wins') - self.best_rank_point = self._data.get('bestRankPoint') class Leaderboard(Domain): diff --git a/pubg_python/domain/telemetry/events.py b/pubg_python/domain/telemetry/events.py index 5528893..2b2bc15 100644 --- a/pubg_python/domain/telemetry/events.py +++ b/pubg_python/domain/telemetry/events.py @@ -87,6 +87,9 @@ def from_dict(self): self.attack_id = self._data.get('attackId') self.killer = objects.Character(self._data.get('killer', {})) self.victim = objects.Character(self._data.get('victim', {})) + self.victim_weapon = self._data.get('victimWeapon') + self.victim_weapon_additional_info = self._data.get( + 'victimWeaponAdditionalInfo') self.assistant = objects.Character(self._data.get('assistant', {})) self.dbno_id = self._data.get('dBNOId') self.damage_type_category = self._data.get('damageTypeCategory') @@ -343,6 +346,9 @@ def from_dict(self): self.attack_id = self._data.get('attackId') self.attacker = objects.Character(self._data.get('attacker', {})) self.victim = objects.Character(self._data.get('victim', {})) + self.victim_weapon = self._data.get('victimWeapon') + self.victim_weapon_additional_info = self._data.get( + 'victimWeaponAdditionalInfo') self.damage_reason = self._data.get('damageReason') self.damage_type_category = self._data.get('damageTypeCategory') self.damage_causer_name = self._data.get('damageCauserName') From 613cbeacddcb53923be43fc030389204e267f253 Mon Sep 17 00:00:00 2001 From: Ramon Saraiva Date: Mon, 2 Sep 2019 07:20:25 -0300 Subject: [PATCH 6/8] Sync with V14.1.0 --- pubg_python/domain/telemetry/events.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pubg_python/domain/telemetry/events.py b/pubg_python/domain/telemetry/events.py index 2b2bc15..ac4ccee 100644 --- a/pubg_python/domain/telemetry/events.py +++ b/pubg_python/domain/telemetry/events.py @@ -207,6 +207,10 @@ class LogVehicleRide(LogVehicle): def from_dict(self): super().from_dict() self.seat_index = self._data.get('seatIndex') + self.fellow_passengers = [ + objects.Character(data) + for data in self._data.get('fellowPassengers', []) + ] class LogVehicleLeave(LogVehicle): @@ -216,6 +220,10 @@ def from_dict(self): self.ride_distance = self._data.get('rideDistance') self.seat_index = self._data.get('seatIndex') self.max_speed = self._data.get('maxSpeed') + self.fellow_passengers = [ + objects.Character(data) + for data in self._data.get('fellowPassengers', []) + ] class LogVehicleDestroy(Event): From c2e548c6a79a5611a2bf51318c4757ce809a1bed Mon Sep 17 00:00:00 2001 From: Ramon Saraiva Date: Mon, 2 Sep 2019 07:22:31 -0300 Subject: [PATCH 7/8] Bump version 0.9.0 -> 0.10.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9f796f3..b734742 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def read(fname): setup( name='pubg-python', - version='0.9.0', + version='0.10.0', description='A python wrapper for the PUBG developer API', long_description=read('README.md'), long_description_content_type='text/markdown', From 6611e499211009ac3ef658ab1924363849f2eaf1 Mon Sep 17 00:00:00 2001 From: Ramon Saraiva Date: Mon, 2 Sep 2019 07:23:32 -0300 Subject: [PATCH 8/8] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fbcea2..da1edba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.10.0 / 2019-09-02 + +* Sync domain classes/telemetry data with latest API changes (synced with V14.1.0) + ## 0.9.0 / 2019-09-01 * Add leaderboards support