mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
feat: add the 5 new asian regions
This commit is contained in:
parent
dd1b993eba
commit
c627a2d26d
4 changed files with 23 additions and 3 deletions
|
|
@ -73,7 +73,12 @@ export default {
|
||||||
'NA',
|
'NA',
|
||||||
'OCE',
|
'OCE',
|
||||||
'TR',
|
'TR',
|
||||||
'RU'
|
'RU',
|
||||||
|
'PH',
|
||||||
|
'SG',
|
||||||
|
'TH',
|
||||||
|
'TW',
|
||||||
|
'VN',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,12 @@ export default new Vuex.Store({
|
||||||
'na': 'na1',
|
'na': 'na1',
|
||||||
'oce': 'oc1',
|
'oce': 'oc1',
|
||||||
'tr': 'tr1',
|
'tr': 'tr1',
|
||||||
'ru': 'ru'
|
'ru': 'ru',
|
||||||
|
'ph': 'ph2',
|
||||||
|
'sg': 'sg2',
|
||||||
|
'th': 'th2',
|
||||||
|
'tw': 'tw2',
|
||||||
|
'vn': 'vn2',
|
||||||
},
|
},
|
||||||
roles: ['TOP', 'JUNGLE', 'MIDDLE', 'BOTTOM', 'UTILITY']
|
roles: ['TOP', 'JUNGLE', 'MIDDLE', 'BOTTOM', 'UTILITY']
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class MatchService {
|
||||||
console.log('--> CALL TO RIOT MATCHLIST')
|
console.log('--> CALL TO RIOT MATCHLIST')
|
||||||
const newMatchList = await Jax.Matchlist.puuid(puuid, region, index)
|
const newMatchList = await Jax.Matchlist.puuid(puuid, region, index)
|
||||||
// Error while fetching Riot API
|
// Error while fetching Riot API
|
||||||
if (!newMatchList) {
|
if (!newMatchList || !newMatchList.length) {
|
||||||
return matchList
|
return matchList
|
||||||
}
|
}
|
||||||
matchList = [...matchList, ...newMatchList]
|
matchList = [...matchList, ...newMatchList]
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,11 @@ export enum LeagueRegion {
|
||||||
RUSSIA = 'ru',
|
RUSSIA = 'ru',
|
||||||
TURKEY = 'tr1',
|
TURKEY = 'tr1',
|
||||||
JAPAN = 'jp1',
|
JAPAN = 'jp1',
|
||||||
|
PHILIPPINES = 'ph2',
|
||||||
|
SINGAPORE = 'sg2',
|
||||||
|
THAILAND = 'th2',
|
||||||
|
TAIWAN = 'tw2',
|
||||||
|
VIETNAM = 'vn2',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -40,6 +45,11 @@ export function getRiotRegion(region: string): RiotRegion {
|
||||||
case LeagueRegion.LATIN_AMERICA_SOUTH:
|
case LeagueRegion.LATIN_AMERICA_SOUTH:
|
||||||
return RiotRegion.AMERICAS
|
return RiotRegion.AMERICAS
|
||||||
case LeagueRegion.OCEANIA:
|
case LeagueRegion.OCEANIA:
|
||||||
|
case LeagueRegion.PHILIPPINES:
|
||||||
|
case LeagueRegion.SINGAPORE:
|
||||||
|
case LeagueRegion.THAILAND:
|
||||||
|
case LeagueRegion.TAIWAN:
|
||||||
|
case LeagueRegion.VIETNAM:
|
||||||
return RiotRegion.SEA
|
return RiotRegion.SEA
|
||||||
case LeagueRegion.KOREA:
|
case LeagueRegion.KOREA:
|
||||||
case LeagueRegion.JAPAN:
|
case LeagueRegion.JAPAN:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue