Exemplo n.º 1
0
        //needs testing
        #region Races
        /// <summary>
        /// Gets The character races data, a list of each race and their associated faction, name, unique ID, and skin.
        /// </summary>
        /// <returns>DataRacesRoot object</returns>
        public DataRacesRoot GetRaceData()
        {
            var raceData = new DataRacesRoot();

            var url = string.Format(@"{0}/wow/data/character/races?locale={1}&apikey={2}",
                                    _Host,
                                    _Locale,
                                    _APIKey);

            raceData = json.GetDataFromURL <DataRacesRoot>(url);
            return(raceData);
        }
Exemplo n.º 2
0
        /// <summary>
        /// The character races data API provides a list of each race and their associated faction, name, unique ID, and skin.
        /// </summary>
        /// <returns>DataRacesRoot object</returns>
        public async Task <DataRacesRoot> GetRaceDataAsync()
        {
            var raceData = new DataRacesRoot();

            var url = string.Format(
                @"{0}/wow/data/character/races?locale={1}&apikey={2}",
                _Host,
                _Locale,
                _APIKey);

            raceData = await this.jsonUtility.GetDataFromURLAsync <DataRacesRoot>(url);

            return(raceData);
        }