Пример #1
0
        /// <summary>
        /// Uploads a video using the provided video URL
        /// </summary>
        /// <param name="videoUrl">The fully qualified url where the video resides</param>
        /// <returns>The newly uploaded video metadata</returns>
        public Video UploadVideo(string videoUrl)
        {
            var parameters = new Dictionary <string, string> {
                { "source_url", videoUrl }
            };

            return(JsonSerializer.Deserialize <Video>(_proxy.PostJson("videos.json", parameters)));
        }
Пример #2
0
        public FaceEmotionDTO[] GetEmotionsFromLink(string imgLink)
        {
            var jsonPost = "{ \"url\": \"" + imgLink + "\" }";

            _serviceProxy.SetParameters(_apiCognitiveEmotionLink, _apiKeyName, _apiKeyEmotions);
            var response = _serviceProxy.PostJson(jsonPost);

            FaceEmotion[] emotions    = JsonConvert.DeserializeObject <FaceEmotion[]>(response);
            var           emotionDTOs = _emotionMapper.GetEmotionDTOListFromEmotionList(emotions).ToArray();

            return(emotionDTOs);
        }