print from map
This commit is contained in:
parent
9351748abc
commit
f381738189
|
@ -9,7 +9,6 @@ import java.util.Set;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import si.mazi.rescu.RestProxyFactory;
|
import si.mazi.rescu.RestProxyFactory;
|
||||||
import com.google.gson.Gson;
|
|
||||||
/**
|
/**
|
||||||
* Created by sidhujag on 6/3/2018
|
* Created by sidhujag on 6/3/2018
|
||||||
*/
|
*/
|
||||||
|
@ -90,9 +89,7 @@ public class CoinmarketcapRateSource implements IRateSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> ticker = api.getTickers(cryptoId, fiatCurrency);
|
Map<String, String> ticker = api.getTickers(cryptoId, fiatCurrency);
|
||||||
Gson gson = new Gson();
|
System.out.printf( "JSON: %s", ticker["data"]["name"] );
|
||||||
String json = gson.toJson(ticker);
|
|
||||||
System.out.printf( "JSON: %s", json );
|
|
||||||
/*if (cryptoCurrency.equalsIgnoreCase(ticker.getSymbol())) {
|
/*if (cryptoCurrency.equalsIgnoreCase(ticker.getSymbol())) {
|
||||||
if (Currencies.EUR.equalsIgnoreCase(fiatCurrency)) {
|
if (Currencies.EUR.equalsIgnoreCase(fiatCurrency)) {
|
||||||
return ticker.getPrice_eur();
|
return ticker.getPrice_eur();
|
||||||
|
|
Loading…
Reference in New Issue