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