wowtoken.app

git clone https://git.emily.sh/wowtoken-app/wowtoken.app.git
Log | Files | Refs | README | LICENSE

urlBuilder.js (443B)


      1 export default function urlBuilder(currentRegionSelection, currentTimeSelection, currentAggregateSelection) {
      2     let url = "https://data.wowtoken.app/v2/";
      3     if (currentAggregateSelection !== '' && currentAggregateSelection !== 'none'){
      4         url += `math/${currentAggregateSelection}/retail/`
      5     }
      6     else {
      7         url += `relative/retail/`
      8     }
      9 
     10     url += `${currentRegionSelection}/${currentTimeSelection}.json`;
     11     return url;
     12 }