Ejemplo n.º 1
0
        public string Analyze(string posterUrl, List <VisualFeature> visualFeatures = null, List <Detail> details = null, Language language = Language.undefined)
        {
            // https://[location].api.cognitive.microsoft.com/vision/v1.0/analyze[?visualFeatures][&details][&language]

            _restClient.EndpointMethod = $"/{BASE_METHOD}/{API_VERSION}/analyze";

            _restClient.AddParameters("visualFeatures", visualFeatures?.Select(item => item.ToString()));
            _restClient.AddParameters("details", details?.Select(item => item.ToString()));

            if (language != Language.undefined)
            {
                _restClient.AddParameter("language", language.ToString());
            }

            return(_restClient.Post($"{{\"url\":\"{posterUrl}\"}}"));
        }