public static async Task RunImporter([TimerTrigger("0 0 */3 * * *")] TimerInfo myTimer, ILogger log) { log.LogInformation($"[BEGIN] OddsImporter: {DateTime.Now}"); var settings = AppSettings.Configure(); var database = BuildOddsDatabase(settings); var httpClient = new HttpClientWrapper(); var authenticator = new BetfairAuthenticator(httpClient, settings.BetfairUsername, settings.BetfairPassword); var oddsSource = new BetfairOddsProvider(httpClient, authenticator, new BetfairThrottler()); var oddsImporter = new OddsImporter(database, oddsSource); await oddsImporter.Import(); log.LogInformation($"[COMPLETE] OddsImporter: {DateTime.Now}"); }
public WhenRetrievingOddsFails() { _requestedEndpoints = new List <string>(); _client = new BetfairOddsProvider(this, this, this); var country1 = new Country { CountryCode = "TEST1" }; var country2 = new Country { CountryCode = "TEST2" }; _countries = new List <Country> { country1, country2 }; _result = _client.RetrieveAll().Result; }
public WhenRetrievingOddsSuccessfully_Auth() { _client = new BetfairOddsProvider(this, this, this); var result = _client.RetrieveAll().Result; }