예제 #1
0
        //Needs testing
        #region Recipe

        /// <summary>
        /// Gets recipe from recipeID
        /// </summary>
        /// <param name="recipeId"></param>
        /// <returns>RecipeRoot object</returns>
        public RecipeRoot GetRecipe(int recipeId)
        {
            var recipe = new RecipeRoot();

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

            recipe = json.GetDataFromURL <RecipeRoot>(url);
            return(recipe);
        }
예제 #2
0
        public async Task <RecipeRoot> GetRecipeAsync(int recipeId)
        {
            var recipe = new RecipeRoot();

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

            recipe = await this.jsonUtility.GetDataFromURLAsync <RecipeRoot>(url);

            return(recipe);
        }