listSupportedVsCurrencies method
Get list of supported vs currencies.
Query: /simple/supported_vs_currencies
Implementation
Future<CoinGeckoResult<List<String>>> listSupportedVsCurrencies() async {
final response = await _dio.get(
'/simple/supported_vs_currencies',
);
if (response.statusCode == 200) {
final list = Convert.toListN(response.data);
final List<String> currencyList =
list != null ? list.map((e) => e.toString()).toList() : [];
return CoinGeckoResult(currencyList);
} else {
return CoinGeckoResult(
[],
errorMessage: response.data.toString(),
errorCode: response.statusCode ?? 0,
isError: true,
);
}
}