props/Props-Modules/Props.Shop/Ebay/EbayShop.cs

75 lines
1.8 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Props.Shop.Framework;
namespace Props.Shop.Ebay
{
public class EbayShop : IShop
{
private bool disposedValue;
public string ShopName => "Ebay";
public string ShopDescription => "A multi-national online store host to consumer-to-consumer and business-to-consumer sales.";
public string ShopModuleAuthor => "Reslate";
public SupportedFeatures SupportedFeatures => new SupportedFeatures(
true,
true,
true,
true,
true
);
Configuration configuration;
private HttpClient httpClient;
public void Initialize(string workspaceDir)
{
httpClient = new HttpClient();
configuration = new Configuration(); // TODO: Implement config persistence.
}
public Task InitializeAsync(string workspaceDir)
{
throw new NotImplementedException();
}
protected virtual void Dispose(bool disposing)
{
if (!disposedValue)
{
if (disposing)
{
httpClient.Dispose();
}
disposedValue = true;
}
}
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
public byte[] GetDataForPersistence()
{
return JsonSerializer.SerializeToUtf8Bytes(configuration);
}
public IEnumerable<ProductListing> Search(string query, Filters filters)
{
// TODO: Implement the search system.
throw new NotImplementedException();
}
}
}