getCoinData method
Implementation
Future<dynamic> getCoinData(String snipeId) async {
if (_apiKey == null) {
throw ("API Key not initialized. Call init() first.");
}
final apiService = _ApiService();
if (_baseUrl == null) {
return "Invalid API key";
} else {
try {
final response = await apiService.get(
url: _baseUrl ?? " ",
endpoint: "token-management/get-user-tokens",
headers: {"x-api-key": _apiKey!, "x-user-id": snipeId},
);
// print("GET Response: $response");
return response;
} catch (error) {
rethrow;
}
}
}