RhSolutions-AddIn/Source/Assistant/SkuAssist.cs

22 lines
482 B
C#
Raw Normal View History

using System.Threading.Tasks;
2021-11-29 21:24:44 +03:00
2021-12-08 14:45:14 +03:00
namespace RehauSku.Assistant
2021-11-29 21:24:44 +03:00
{
2021-12-03 22:25:20 +03:00
public enum ProductField
{
Name,
Id,
Price
}
2021-11-29 21:24:44 +03:00
static class SkuAssist
{
public static async Task<IProduct> GetProductAsync(string request)
2021-11-29 21:24:44 +03:00
{
var content = await HttpClientUtil.GetContentByRequest(request);
var document = await ParseUtil.ContentToDocAsync(content);
2021-11-29 21:24:44 +03:00
return ParseUtil.GetProduct(document);
2021-12-06 19:50:00 +03:00
}
2021-11-29 21:24:44 +03:00
}
}