/// <summary>
        /// Constructor for tests
        /// </summary>
        public CoinExRepositoryTests()
        {
            IFileRepository _fileRepo = new FileRepository.FileRepository();

            if (_fileRepo.FileExists(configPath))
            {
                _exchangeApi = _fileRepo.GetDataFromFile <ApiInformation>(configPath);
            }
            if (_exchangeApi != null || !string.IsNullOrEmpty(apiKey))
            {
                _repo = new CoinExRepository(_exchangeApi.apiKey, _exchangeApi.apiSecret);
            }
            else
            {
                _repo = new CoinExRepository();
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor - with authentication
 /// </summary>
 /// <param name="apiKey">Api key</param>
 /// <param name="apiSecret">Api secret</param>
 public CoinExApiClient(string apiKey, string apiSecret)
 {
     _repository = new CoinExRepository(apiKey, apiSecret);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor - with authentication
 /// </summary>
 /// <param name="configPath">Path to config file</param>
 public CoinExApiClient(string configPath)
 {
     _repository = new CoinExRepository(configPath);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor - no authentication
 /// </summary>
 public CoinExApiClient()
 {
     _repository = new CoinExRepository();
 }