Skip to content

Commit

Permalink
alias for x3vs3_victories, fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SharpBit committed Apr 12, 2020
1 parent d042f2b commit 11428a8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [4.0.1] - 4/12/20
### Added
- An alias for `Player.x3vs3_victories` called `team_victories`

## [4.0.0] - 3/11/20
### Added
- `reason` attribute for `NotFoundError`
Expand Down
2 changes: 1 addition & 1 deletion brawlstats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
############


__version__ = 'v4.0.0'
__version__ = 'v4.0.1'
__title__ = 'brawlstats'
__license__ = 'MIT'
__author__ = 'SharpBit'
Expand Down
4 changes: 4 additions & 0 deletions brawlstats/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class Player(BaseBox):
Returns a full player object with all of its attributes.
"""

def __init__(self):
# Make a less awkward alias
self.team_victories = self.x3vs3_victories

def __repr__(self):
return "<Player object name='{0.name}' tag='{0.tag}'>".format(self)

Expand Down
3 changes: 2 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Name Type
``exp_level`` int
``exp_points`` int
``is_qualified_from_championship_challenge`` bool
``x3_vs_3_victories`` int
``x3vs3_victories`` int
``team_victories`` int
``solo_victories`` int
``duo_victories`` int
``best_robo_rumble_time`` int
Expand Down

0 comments on commit 11428a8

Please sign in to comment.