wowtoken.app/src/urlBuilder.js
2024-12-01 18:27:15 -08:00

12 lines
445 B
JavaScript

export default function urlBuilder(currentRegionSelection, currentTimeSelection, currentAggregateSelection) {
let url = "https://data.wowtoken.app/v2/";
if (currentAggregateSelection !== '' && currentAggregateSelection !== 'none'){
url += `math/${currentAggregateSelection}/classic/`
}
else {
url += `relative/classic/`
}
url += `${currentRegionSelection}/${currentTimeSelection}.json`;
return url;
}