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",
                "pt_PT",
                "it_IT",
                "multi",
            ];
            kr: ["ko_KR", "en_GB", "en_US", "multi"];
            tw: ["zh_TW", "en_GB", "en_US", "multi"];
            us: ["en_US", "es_MX", "pt_BR", "multi"];
        }[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'