Exemple #1
0
        /// <summary>
        /// Get CS xml data by calling eBay API.
        /// </summary>
        /// <param name="asn">The <c>ApiContext</c> object to make API call.</param>
        public XmlDocument DownloadXml(ApiContext asn)
        {
            this.apiContext = asn;

            //
            GetAttributesCSCall api = new GetAttributesCSCall(asn);

            //api.ErrorLevel = ErrorLevelEnum.BothShortAndLongErrorStrings;
            api.DetailLevelList.Add(DetailLevelCodeType.ReturnAll);
            api.Timeout = 480000;

            string csXml = XmlDeclaration + "\n" + api.GetAttributesCS();

            // Apply style XSL.
            string xslText  = GetDefaultStyleXsl();
            string fixedXml = FixAttributesXml(csXml, xslText);

            XmlDocument xml = new XmlDocument();

            xml.LoadXml(fixedXml);

            mXml = xml;

            return(mXml);
        }
Exemple #2
0
        private string getCurrentAttributeSystemVersion()
        {
            GetAttributesCSCall api = new GetAttributesCSCall(apiContext);

            api.DetailLevelList.Add(DetailLevelCodeType.ReturnSummary);

            return(api.GetAttributesCSVersion());
        }