@Test void getPrice() { PriceResultDto result = client.getPrice("DAI"); System.out.println(result); }
public PriceResultDto getPrice(String symbol) { return restTemplate.getForObject(endpoint + "/data/price?fsym={symbol}&tsyms=USD", PriceResultDto.class, symbol); }
CryptoCompareClientImpl implements CryptoCompareClient { public PriceResultDto getPrice(String symbol) { return restTemplate.getForObject(endpoint + "/data/price?fsym={symbol}&tsyms=USD", PriceResultDto.class, symbol); } }
CryptoCompareClientImpl implements CryptoCompareClient { public PriceResultDto getPrice(String symbol) { return restTemplate.getForObject(endpoint + "/data/price?fsym={symbol}&tsyms=USD", PriceResultDto.class, symbol); } CryptoCompareClientImpl(@Value("${cryptocompare.apikey}") String apiKey); }
CryptoCompareClientImpl implements CryptoCompareClient { public PriceResultDto getPrice(String symbol) { return restTemplate.getForObject(endpoint + "/data/price?fsym={symbol}&tsyms=USD", PriceResultDto.class, symbol); } CryptoCompareClientImpl(@Value("${cryptocompare.apikey}") String apiKey); PriceResultDto getPrice(String symbol); }
CryptoCompareClientImpl implements CryptoCompareClient { public PriceResultDto getPrice(String symbol) { return restTemplate.getForObject(endpoint + "/data/price?fsym={symbol}&tsyms=USD", PriceResultDto.class, symbol); } CryptoCompareClientImpl(@Value("${cryptocompare.apikey}") String apiKey); PriceResultDto getPrice(String symbol);  }