Ejemplo n.º 1
0
        /// <summary>
        /// Get pet species from ID.
        /// </summary>
        /// <param name="speciesId"></param>
        /// <returns>BattlePetSpeciesRoot object</returns>
        public BattlePetSpeciesRoot GetBattlePetSpecies(int speciesId)
        {
            var battlePetSpecies = new BattlePetSpeciesRoot();

            var url = string.Format(@"{0}/wow/battlepet/species/{1}?locale={2}&apikey={3}",
                                    _Host,
                                    speciesId,
                                    _Locale,
                                    _APIKey);

            battlePetSpecies = json.GetDataFromURL <BattlePetSpeciesRoot>(url);
            return(battlePetSpecies);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get pet species from ID.
        /// </summary>
        /// <param name="speciesId"></param>
        /// <returns>BattlePetSpeciesRoot object</returns>
        public async Task <BattlePetSpeciesRoot> GetBattlePetSpeciesAsync(int speciesId)
        {
            var battlePetSpecies = new BattlePetSpeciesRoot();

            var url = string.Format(
                @"{0}/wow/battlepet/species/{1}?locale={2}&apikey={3}",
                _Host,
                speciesId,
                _Locale,
                _APIKey);

            battlePetSpecies = await this.jsonUtility.GetDataFromURLAsync <BattlePetSpeciesRoot>(url);

            return(battlePetSpecies);
        }