Skip to content

Commit

Permalink
fix leaderboard ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
SharpBit committed Nov 24, 2018
1 parent d155c54 commit ebc7e90
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion brawlstats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
############


__version__ = 'v2.0.4'
__version__ = 'v2.0.5'
__title__ = 'brawlstats'
__license__ = 'MIT'
__author__ = 'SharpBit'
Expand Down
5 changes: 1 addition & 4 deletions brawlstats/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ async def get_leaderboard(self, player_or_band, count=200):
url = API.LEADERBOARD + '/' + player_or_band + '/' + str(count)
response = await self._aget(url)

if player_or_band == 'players':
return Leaderboard(response['players'])
else:
return Leaderboard(response['bands'])
return Leaderboard(response)


class Profile(BaseBox):
Expand Down
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Name Type
Leaderboard
-----------

Returns a list of top players or bands.
Returns a list of top players or bands. To access this, do ``lb.players[index]`` or ``lb.bands[index]``

Player attributes:

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = '2.0'
# The full version, including alpha/beta/rc tags
release = '2.0.4'
release = '2.0.5'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='brawlstats',
version='2.0.4',
version='2.0.5',
description='An async Python API wrapper for the unofficial Brawl Stars API',
long_description=long_description,
long_description_content_type='text/x-rst',
Expand Down

0 comments on commit ebc7e90

Please sign in to comment.