public override string getParameterString()
        {
            string retString = base.getParameterString();

            if (ExtractMode != null)
            {
                retString += "&extractMode=" + PageImageModeHelper.ToString(ExtractMode.Value);
            }

            if (ImageURL != null)
            {
                retString += "&url=" + HttpUtility.UrlEncode(ImageURL);
            }

            if (PostMode != null)
            {
                retString += "&imagePostMode=" + ImagePostModeHelper.ToString(PostMode.Value);

                if (PostMode.Value == ImagePostMode.NotRaw)
                {
                    retString += "&image=" + HttpUtility.UrlEncode(ImageData);
                    UsePost    = false;
                }
                else
                {
                    UsePost = true;
                }
            }
            else
            {
                UsePost = false;
            }

            return(retString);
        }
        public override string getParameterString()
        {
            string retString = base.getParameterString();

            retString += "&extract=" + getExtractionString();

            if (_imageMode != null)
            {
                retString += "&extractMode=" + PageImageModeHelper.ToString(_imageMode.Value);
            }

            if (_jsonpCallback != null)
            {
                retString += "&jsonp=" + _jsonpCallback;
            }

            if (_disambiguateEntities != null)
            {
                retString += "&disambiguate=" + encodeBool(_disambiguateEntities);
            }

            if (_includeLinkedData != null)
            {
                retString += "&linkedData=" + encodeBool(_includeLinkedData);
            }

            if (_coreference != null)
            {
                retString += "&coreference=" + encodeBool(_coreference);
            }

            if (_quotations != null)
            {
                retString += "&quotations=" + encodeBool(_quotations);
            }

            if (_sentiment != null)
            {
                retString += "&sentiment=" + encodeBool(_sentiment);
            }

            if (_showSourceText != null)
            {
                retString += "&showSourceText=" + encodeBool(_showSourceText);
            }

            if (_maxRetrieve != null)
            {
                retString += "&maxRetrieve=" + _maxRetrieve;
            }

            if (_baseUrl != null)
            {
                retString += "&baseUrl=" + _baseUrl;
            }

            return(retString);
        }
Ejemplo n.º 3
0
        public override string getParameterString()
        {
            string retString = base.getParameterString();

            if (_imageMode != null)
            {
                retString += "&extractMode=" + PageImageModeHelper.ToString(_imageMode.Value);
            }

            if (_jsonpCallback != null)
            {
                retString += "&jsonp=" + _jsonpCallback;
            }

            return(retString);
        }