Skip to content

Commit 5ceac97

Browse files
authored
Automatically pull brawler list from constants
1 parent 901232d commit 5ceac97

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

brawlstats/utils.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,12 @@ def __init__(self, base_url):
1515
self.BATTLELOG = self.BASE + '/player/battlelog'
1616
self.CLUB_SEARCH = self.BASE + '/club/search'
1717
self.CONSTANTS = 'https://fourjr.herokuapp.com/bs/constants/'
18-
self.BRAWLERS = [
19-
'shelly', 'nita', 'colt', 'bull', 'jessie', # league reward 0-500
20-
'brock', 'dynamike', 'bo', 'tick', # league reward 1000+
21-
'el primo', 'barley', 'poco', 'rosa', # rare
22-
'rico', 'penny', 'darryl', 'carl', # super rare
23-
'frank', 'pam', 'piper', 'bibi', # epic
24-
'mortis', 'tara', 'gene', # mythic
25-
'spike', 'crow', 'leon' # legendary
26-
]
2718

2819
path = os.path.dirname(__file__)
2920
with open(os.path.join(path, '__init__.py')) as f:
3021
self.VERSION = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
22+
with open(os.path.join(path, 'constants.json')) as f:
23+
self.BRAWLERS = [b['tID'] for b in json.load(f)['characters']]
3124

3225

3326
def bstag(tag):

0 commit comments

Comments
 (0)