<commit_before>﻿using System;

namespace SharprWowApi
{

    public class ApiClient : GetData
    {
        /// <summary>
        /// Set region, locale, your API key and optional Realm
        /// </summary>
        /// <param name="region">The region, EU, KR, TW, CN or US. Use "_Region property".</param>
        /// <param name="locale">_Locale, en_gb, en_us etc. Use "_Locale" Property"</param>
        /// <param name="apiKey">Your API key (get one at dev.battle.net)</param>
        public ApiClient(Region region, Locale locale, string apiKey)
        {
            if (!string.IsNullOrEmpty(apiKey))
            {
                _Region = region;
                _Locale = locale;
                _APIKey = apiKey;

                switch (_Region)
                {
                    case Region.EU:
                        _Host = "https://eu.api.battle.net";
                        break;
                    case Region.KR:
                        _Host = "https://kr.api.battle.net";
                        break;
                    case Region.TW:
                        _Host = "https://tw.api.battle.net";
                        break;
                    case Region.CN:
                        _Host = "https://www.battlenet.com.cn";
                        break;
                    case Region.US:
                        _Host = "https://us.api.battle.net";
                        break;
                }
            }
            else
            {
                throw new Exception("Api key missing");
            }
        }

        /// <summary>
        /// Set region, locale, your API key and optional Realm
        /// </summary>
        /// <param name="region">The region, EU, KR, TW, CN or US. Use "_Region property".</param>
        /// <param name="locale">_Locale, en_gb, en_us etc. Use "_Locale" Property"</param>
        /// <param name="apiKey">Your API key (get one at dev.battle.net)</param>
        public ApiClient(Region region, Locale locale, string realm, string apiKey)
        {

            if (!string.IsNullOrEmpty(apiKey))
            {
                _Region = region;
                _Locale = locale;
                _APIKey = apiKey;
                _Realm = realm;

                switch (_Region)
                {
                    case Region.EU:
                        _Host = "https://eu.api.battle.net";
                        break;
                    case Region.KR:
                        _Host = "https://kr.api.battle.net";
                        break;
                    case Region.TW:
                        _Host = "https://tw.api.battle.net";
                        break;
                    case Region.CN:
                        _Host = "https://www.battlenet.com.cn";
                        break;
                    case Region.US:
                        _Host = "https://us.api.battle.net";
                        break;
                }
            }
            else
            {<commit_msg>moved realm parameter to last<commit_after>﻿using System;

namespace SharprWowApi
{

    public class ApiClient : GetData
    {
        /// <summary>
        /// Set region, locale, your API key and optional Realm
        /// </summary>
        /// <param name="region">The region, EU, KR, TW, CN or US. Use "_Region property".</param>
        /// <param name="locale">_Locale, en_gb, en_us etc. Use "_Locale" Property"</param>
        /// <param name="apiKey">Your API key (get one at dev.battle.net)</param>
        public ApiClient(Region region, Locale locale, string apiKey)
        {
            if (!string.IsNullOrEmpty(apiKey))
            {
                _Region = region;
                _Locale = locale;
                _APIKey = apiKey;

                switch (_Region)
                {
                    case Region.EU:
                        _Host = "https://eu.api.battle.net";
                        break;
                    case Region.KR:
                        _Host = "https://kr.api.battle.net";
                        break;
                    case Region.TW:
                        _Host = "https://tw.api.battle.net";
                        break;
                    case Region.CN:
                        _Host = "https://www.battlenet.com.cn";
                        break;
                    case Region.US:
                        _Host = "https://us.api.battle.net";
                        break;
                }
            }
            else
            {
                throw new Exception("Api key missing");
            }
        }

        /// <summary>
        /// Set region, locale, your API key and optional Realm
        /// </summary>
        /// <param name="region">The region, EU, KR, TW, CN or US. Use "_Region property".</param>
        /// <param name="locale">_Locale, en_gb, en_us etc. Use "_Locale" Property"</param>
        /// <param name="apiKey">Your API key (get one at dev.battle.net)</param>
        public ApiClient(Region region, Locale locale, string apiKey, string realm)
        {

            if (!string.IsNullOrEmpty(apiKey))
            {
                _Region = region;
                _Locale = locale;
                _APIKey = apiKey;
                _Realm = realm;

                switch (_Region)
                {
                    case Region.EU:
                        _Host = "https://eu.api.battle.net";
                        break;
                    case Region.KR:
                        _Host = "https://kr.api.battle.net";
                        break;
                    case Region.TW:
                        _Host = "https://tw.api.battle.net";
                        break;
                    case Region.CN:
                        _Host = "https://www.battlenet.com.cn";
                        break;
                    case Region.US:
                        _Host = "https://us.api.battle.net";
                        break;
                }
            }
            else
            {
{'fraction_non_alphanumeric': 0.10952538997676735, 'fraction_numerical': 0.0, 'mean_word_length': 0.9689643907219863, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 20, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '86544', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1471, 'n_words': 366}