2021-12-13 20:39:41 +03:00
|
|
|
|
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
|
|
|
|
|
{
|
2021-12-13 20:39:41 +03:00
|
|
|
|
public static async Task<IProduct> GetProductAsync(string request)
|
2021-11-29 21:24:44 +03:00
|
|
|
|
{
|
2021-12-13 20:39:41 +03:00
|
|
|
|
var content = await HttpClientUtil.GetContentByRequest(request);
|
|
|
|
|
var document = await ParseUtil.ContentToDocAsync(content);
|
2021-11-29 21:24:44 +03:00
|
|
|
|
|
2021-12-13 20:39:41 +03:00
|
|
|
|
return ParseUtil.GetProduct(document);
|
2021-12-06 19:50:00 +03:00
|
|
|
|
}
|
2021-11-29 21:24:44 +03:00
|
|
|
|
}
|
2021-12-03 12:57:22 +03:00
|
|
|
|
}
|