Exemplo n.º 1
0
        //Needs testing
        #region Spells
        /// <summary>
        /// Gets spell from spellID
        /// </summary>
        /// <param name="spellId">The ID of the spell</param>
        /// <returns>SpellRoot object</returns>
        public SpellRoot GetSpell(int spellId)
        {
            var spell = new SpellRoot();

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

            spell = json.GetDataFromURL <SpellRoot>(url);
            return(spell);
        }
Exemplo n.º 2
0
        public async Task <SpellRoot> GetSpellAsync(int spellId)
        {
            var spell = new SpellRoot();

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

            spell = await this.jsonUtility.GetDataFromURLAsync <SpellRoot>(url);

            return(spell);
        }