/// <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();
            }
        }
예제 #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);
 }
예제 #3
0
 /// <summary>
 /// Constructor - with authentication
 /// </summary>
 /// <param name="configPath">Path to config file</param>
 public CoinExApiClient(string configPath)
 {
     _repository = new CoinExRepository(configPath);
 }
예제 #4
0
 /// <summary>
 /// Constructor - no authentication
 /// </summary>
 public CoinExApiClient()
 {
     _repository = new CoinExRepository();
 }