Esempio n. 1
0
from wargaming.version import get_version

ALLOWED_GAMES = ('wot', 'wgn', 'wows', 'wotb', 'wotx', 'wowp')

ALLOWED_REGIONS = ('ru', 'asia', 'na', 'eu', 'kr')
REGION_API_ENDPOINTS = {
    'ru': 'https://api.worldoftanks.ru',
    'asia': 'https://api.worldoftanks.asia',
    'na': 'https://api.worldoftanks.com',
    'eu': 'https://api.worldoftanks.eu',
    'kr': 'https://api.worldoftanks.kr',
}
DEFAULT_REGION = 'ru'

ALLOWED_LANGUAGES = ('en', 'ru', 'pl', 'de', 'fr', 'es', 'zh-cn', 'tr', 'cs', 'th', 'vi', 'ko')
DEFAULT_LANGUAGE = 'en'

HTTP_USER_AGENT_HEADER = 'python-wargaming/{0} (https://github.com/svartalf/python-wargaming)'.format(get_version())

# How many times retry api call
RETRY_COUNT = 10
Esempio n. 2
0
from wargaming.games.wot import API as WoT
from wargaming.games.wgn import API as WGN
from wargaming.games.wotb import API as WoTB
from wargaming.exceptions import APIError, RequestError, ValidationError
from wargaming.version import get_version
from . import settings

__version__ = get_version()
Esempio n. 3
0
# WG classes xbox and ps4 as 'regions' hence they are incuded here
ALLOWED_REGIONS = ('ru', 'asia', 'na', 'eu', 'xbox', 'ps4')
REGION_TLD_MAP = {
    'ru': 'ru',
    'asia': 'asia',
    'na': 'com',
    'eu': 'eu',
}

GAME_API_ENDPOINTS = {
    'wgn': 'https://api.worldoftanks.{region}/wgn/',
    'wot': 'https://api.worldoftanks.{region}/wot/',
    'wotb': 'https://api.wotblitz.{region}/wotb/',
    'wotx': 'https://api-{region}-console.worldoftanks.com/wotx/',
    'wowp': 'https://api.worldofwarplanes.{region}/wowp/',
    'wows': 'https://api.worldofwarships.{region}/wows/',
}

DEFAULT_REGION = 'ru'

ALLOWED_LANGUAGES = ('en', 'ru', 'pl', 'de', 'fr', 'es', 'zh-cn', 'tr', 'cs',
                     'th', 'vi', 'ko')
DEFAULT_LANGUAGE = 'en'

HTTP_USER_AGENT_HEADER = 'python-wargaming/{0} (https://github.com/svartalf/python-wargaming)'.format(
    get_version())

# How many times retry api call
RETRY_COUNT = 10