Example #1
0
        //needs testing
        #region Pet Types

        /// <summary>
        ///Gets the different battle pet types (including what they are strong and weak against)
        /// </summary>
        /// <returns>DataPetTypesRoot object</returns>
        public DataPetTypesRoot GetPetTypeData()
        {
            var petData = new DataPetTypesRoot();

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

            petData = json.GetDataFromURL <DataPetTypesRoot>(url);
            return(petData);
        }
Example #2
0
        /// <summary>
        /// The different bat pet types (including what they are strong and weak against)
        /// </summary>
        /// <returns>DataPetTypesRoot object</returns>
        public async Task <DataPetTypesRoot> GetPetTypeDataAsync()
        {
            var petData = new DataPetTypesRoot();

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

            petData = await this.jsonUtility.GetDataFromURLAsync <DataPetTypesRoot>(url);

            return(petData);
        }