Exemplo n.º 1
0
 public PolygonHttpClient(IOptions <PolygonConfiguration> options, IPolygonAuth auth,
                          HttpClient httpClient)
 {
     _configuration = options.Value;
     _auth          = auth;
     _httpClient    = httpClient;
 }
Exemplo n.º 2
0
        public void Setup()
        {
            _faker = new Faker();
            _sc    = new ServiceCollection();

            _configuration = new PolygonConfiguration {
                ApiKey     = _faker.Random.Hash(),
                ApiSecret  = _faker.Random.Hash(),
                ApiBaseUrl = _faker.Internet.Url(),
            };

            _sc.AddPolygonClient(option => {
                option.ApiKey     = _configuration.ApiKey;
                option.ApiSecret  = _configuration.ApiSecret;
                option.ApiBaseUrl = _configuration.ApiBaseUrl;
            });
        }
Exemplo n.º 3
0
 public PolygonHttpClient(IOptions <PolygonConfiguration> options, IPolygonAuth auth)
 {
     _configuration = options.Value;
     _auth          = auth;
     _httpClient    = DefaultHttpClient(_configuration.ApiBaseUrl);
 }