コード例 #1
0
        internal static async Task <NEEORecipe[]> GetRecipesPowerState(NEEOBrain brain)
        {
            if (brain == null)
            {
                throw new NEEOException("MISSING_BRAIN_PARAMETER");
            }
            string url = UrlBuilder.BuildBrainUrl(brain, NEEOUrls.BASE_URL_GETACTIVERECIPES);

            _logger.LogDebug($"Recipe | GET RecipesPowerState {url}");
            NEEORecipe[] recipes = await _restClient.HttpGet <NEEORecipe[]>(url);

            if (recipes != null)
            {
                Factory.BuildRecipesModel(recipes, _restClient);
            }
            return(recipes);
        }