Skip to content

Commit

Permalink
WoWI: Switched to newer API
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Feb 1, 2020
1 parent d0676b6 commit 7a361d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CB/Core.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ def bulk_check(self, addons):
for addon in payload:
self.cfCache[str(addon['id'])] = addon
if len(ids_wowi) > 0:
payload = requests.get(f'https://api.mmoui.com/v3/game/WOW/filedetails/{",".join(ids_wowi)}.json',
payload = requests.get(f'https://api.mmoui.com/v4/game/WOW/filedetails/{",".join(ids_wowi)}.json',
headers=HEADERS).json()
for addon in payload:
self.wowiCache[str(addon['UID'])] = addon
self.wowiCache[str(addon['id'])] = addon

def detect_addons(self):
if not self.cfDirs:
Expand Down
8 changes: 4 additions & 4 deletions CB/WoWInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ def __init__(self, url, checkcache, scraper):
if project in checkcache:
self.payload = checkcache[project]
else:
self.payload = requests.get(f'https://api.mmoui.com/v3/game/WOW/filedetails/{project}.json',
self.payload = requests.get(f'https://api.mmoui.com/v4/game/WOW/filedetails/{project}.json',
headers=HEADERS).json()
if 'ERROR' in self.payload:
raise RuntimeError(url)
else:
self.payload = self.payload[0]
self.name = self.payload['UIName'].strip().strip('\u200b')
self.downloadUrl = self.payload['UIDownload']
self.currentVersion = self.payload['UIVersion']
self.name = self.payload['title'].strip().strip('\u200b')
self.downloadUrl = self.payload['downloadUri']
self.currentVersion = self.payload['version']
self.archive = None
self.directories = []
self.scraper = scraper
Expand Down

0 comments on commit 7a361d8

Please sign in to comment.