Пример #1
0
        /// <summary>
        /// use image binarys to experience productAI search service
        /// </summary>
        /// <param name="serviceType"></param>
        /// <param name="serviceID"></param>
        /// <param name="filePath"></param>
        /// <param name="options"></param>
        /// <param name="respContent"></param>
        /// <returns>false request success,true request failed</returns>
        public bool SubmitFileToSearch(string serviceType, string serviceID,
                                       byte[] fileBytes, Dictionary <string, string> options,
                                       out string respContent)
        {
            HttpPost hp = SubmitFileToSearchP(serviceType, serviceID, fileBytes, options);

            hp.Post();
            respContent = hp.ResultText;
            return(hp.IsError);
        }
Пример #2
0
        /// <summary>
        /// add a image to productAI imageset by image url
        /// </summary>
        /// <param name="imageSetId"></param>
        /// <param name="imageUrl"></param>
        /// <param name="options"></param>
        /// <param name="respContent"></param>
        /// <returns>false request success,true request failed</returns>
        public bool AddImageToImageSet(string imageSetId, string imageUrl,
                                       Dictionary <string, string> options,
                                       out string respContent)
        {
            HttpPost hp = AddImageToImageSetP(imageSetId, imageUrl, options);

            hp.Post();
            respContent = hp.ResultText;
            return(hp.IsError);
        }
Пример #3
0
        /// <summary>
        /// batch delete images from imageset by CSV file
        /// </summary>
        /// <param name="imageSetId"></param>
        /// <param name="filePath"></param>
        /// <param name="options"></param>
        /// <param name="respContent"></param>
        /// <returns>false request success,true request failed</returns>
        public bool DeleteImageByFile(string imageSetId, string filePath,
                                      Dictionary <string, string> options,
                                      out string respContent)
        {
            HttpPost hp = ImageSetFileControlP(imageSetId, filePath, "urls_to_delete", options);

            hp.Post();
            respContent = hp.ResultText;
            return(hp.IsError);
        }
Пример #4
0
        /// <summary>
        /// use image url to experience productAI search service
        /// </summary>
        /// <param name="serviceType"></param>
        /// <param name="serviceID"></param>
        /// <param name="PictureUrl"></param>
        /// <param name="options"></param>
        /// <param name="respContent"></param>
        /// <returns>false request success,true request failed</returns>
        public bool SubmitFormToSearch(string serviceType, string serviceID,
                                       string PictureUrl, Dictionary <string, string> options,
                                       out string respContent)
        {
            HttpPost hp = SubmitFormToSearchP(serviceType, serviceID, PictureUrl, options);

            hp.Post();
            respContent = hp.ResultText;
            return(hp.IsError);
        }