Documentation
    Preparing search index...

    Function getBlizzardApi

    • Get the Blizzard API configuration for a given region.

      Type Parameters

      • T extends Origins

        The region of the Blizzard API.

      Parameters

      • origin: T

        The region of the Blizzard API.

      • Optionallocale: {
            cn: ["zh_CN"];
            eu: ["en_GB", "es_ES", "fr_FR", "ru_RU", "de_DE", "it_IT"];
            kr: ["ko_KR", "en_GB", "en_US"];
            tw: ["zh_TW", "en_GB", "en_US"];
            us: ["en_US", "es_MX", "pt_BR"];
        }[T][number]

        The locale of the Blizzard API.

      Returns BlizzardApi<T>

      The Blizzard API configuration for the given region.

      const api = getBlizzardApi('us', 'en_US');
      console.log(api.hostname); // 'https://us.api.blizzard.com'
      console.log(api.locale); // 'en_US'
      console.log(api.origin); // 'us'