async def get_char_passives(self, conf_url, char, cookie_jar): os.chdir(self.path + '/ressources/characters/') if not os.path.exists(os.getcwd() + '/' + char): os.mkdir(char) os.chdir(self.path + '/ressources/characters/' + char) response = utils.start_request(conf_url + char, cookie_jar) utils.save_dump('pasives.json', response, conf_url + char)
async def get_stash_tab(self, conf_url, tab, cookie_jar): conf_url = utils.replace_placeholder(conf_url, self.account_name, self.league) os.chdir(self.path + '/ressources/stashTabs') response = utils.start_request(conf_url + str(tab), cookie_jar) utils.save_dump('stashtab' + str(tab) + '.json', response, conf_url + str(tab))
async def get_stash(self, conf_url, cookie_jar): os.chdir(self.path + '/ressources') conf_url = utils.replace_placeholder(conf_url, self.account_name, self.league) response = utils.start_request(conf_url, cookie_jar) self.num_tabs = response['numTabs'] utils.save_dump('stash.json', response, conf_url)
async def get_chars_items(self, conf_url, cookie_jar): for char in self.chars: os.chdir(self.path + '/ressources/characters/') if not os.path.exists(os.getcwd() + '/' + char['name']): os.mkdir(char['name']) os.chdir(self.path + '/ressources/characters/' + char['name']) response = utils.start_request(conf_url + char['name'], cookie_jar) utils.save_dump('items.json', response, conf_url + char['name'])
async def get_mtx_stash(self, conf_url, cookie_jar): os.chdir(self.path + '/ressources') response = utils.start_request(conf_url, cookie_jar) utils.save_dump('mtxstash.json', response, conf_url)
async def get_characters(self, conf_url, cookie_jar): os.chdir(self.path + '/ressources') response = utils.start_request(conf_url, cookie_jar) for char in response: self.chars.append(char) utils.save_dump('characters.json', response, conf_url)