From 3dcd6cacc7f668e841c41bbd9a79291d81bb8f3e Mon Sep 17 00:00:00 2001 From: Simon Bilsky-Rollins Date: Sat, 26 Oct 2024 15:42:58 -0700 Subject: [PATCH] Add Transaction Info to Basketball Team --- espn_api/basketball/team.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/espn_api/basketball/team.py b/espn_api/basketball/team.py index f38e20fe..8dcf8356 100644 --- a/espn_api/basketball/team.py +++ b/espn_api/basketball/team.py @@ -15,6 +15,10 @@ def __init__(self, data, roster, schedule, year, **kwargs): self.wins = data['record']['overall']['wins'] self.losses = data['record']['overall']['losses'] self.ties = data['record']['overall']['ties'] + self.acquisitions = data.get('transactionCounter', {}).get('acquisitions', 0) + self.acquisition_budget_spent = data.get('transactionCounter', {}).get('acquisitionBudgetSpent', 0) + self.drops = data.get('transactionCounter', {}).get('drops', 0) + self.trades = data.get('transactionCounter', {}).get('trades', 0) self.logo_url = '' self.stats = None self.standing = data['playoffSeed']