BettingArbitrageBot/Arbitrage/BookkeeperService.cs
Harry Stuart 2f118c5bcb Add code
2022-12-07 12:48:00 +11:00

35 lines
1.1 KiB
C#

using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Arbitrage
{
public abstract class BookkeeperService
{
protected HttpClient mHttpClient;
protected readonly ILogger<BookkeeperService> mLogger;
public BookkeeperService()
{
var loggerFactory = LoggerFactory.Create(builder =>
{
builder
.AddFilter("Microsoft", LogLevel.Warning)
.AddFilter("System", LogLevel.Warning)
.AddConsole()
.AddEventLog();
});
mLogger = loggerFactory.CreateLogger<BookkeeperService>();
mHttpClient = new HttpClient();
}
public abstract Task<IEnumerable<BookkeeperEvent>> GetSportEventsAsync(Sport sport);
public abstract Task<IEnumerable<BookkeeperMarket>> GetEventMarketsAsync(BookkeeperEvent bookkeeperEvent);
public abstract Task<IEnumerable<BookkeeperOdds>> GetMarketOddsAsync(Event @event, BookkeeperMarket market);
}
}