Compare commits
5 Commits
821eef6f95
...
d66c3a6075
Author | SHA1 | Date |
---|---|---|
Sergio Álvarez | d66c3a6075 | |
Sergio Álvarez | acd9ae504b | |
Sergio Álvarez | 14190bea74 | |
Sergio Álvarez | ab54e91bad | |
Sergio Álvarez | 1bae11f389 |
|
@ -1 +1,2 @@
|
||||||
.credentials
|
.credentials
|
||||||
|
/__pycache__/
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
import os
|
||||||
|
from typing import Tuple
|
||||||
|
|
||||||
|
def get_api_host(region: str) -> str:
|
||||||
|
return f"https://{region}.api.blizzard.com" if region != 'cn' else 'https://gateway.battlenet.com.cn'
|
||||||
|
|
||||||
|
def get_bnet_host(region: str) -> str:
|
||||||
|
region = region if region not in ['tw', 'kr'] else 'apac'
|
||||||
|
return f"https://{region}.battle.net" if region != 'cn' else 'https://www.battlenet.com.cn'
|
||||||
|
|
||||||
|
def get_credentials(path: str) -> Tuple[str, str]:
|
||||||
|
return tuple(open(os.path.join(path, '.credentials')).read().strip().split(':'))
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
# pwd
|
||||||
|
pwd = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
# raw json files
|
||||||
|
raw = os.path.join(pwd, 'raw')
|
||||||
|
# crafted jsons
|
||||||
|
craft = os.path.join(pwd, 'craft')
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue