Esempio n. 1
0
        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}");
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public WhenRetrievingOddsSuccessfully_Auth()
 {
     _client = new BetfairOddsProvider(this, this, this);
     var result = _client.RetrieveAll().Result;
 }