public async Task <IceCatProduct> GetAsync(long productId) { var req = RequestEngine.CreateClient(_AccessConfig); var productXmlUrl = BuildXmlFileUrl($"{productId}.xml"); var productXml = await RequestEngine.GetAsStringAsync(req, productXmlUrl); return(CustomXmlParser.Parse <IceCatProduct>(productXml, "Product")); }
public async Task <string> GetAsync(string xmlUrlPath, string nodeName = null) { var req = RequestEngine.CreateClient(_AccessConfig); var xmlBody = await RequestEngine.GetAsStringAsync(req, xmlUrlPath); if (string.IsNullOrEmpty(nodeName)) { return(xmlBody); } return(await CustomXmlParser.ParseAsync(nodeName, xmlBody)); }