getCall<T> method

Future<T> getCall<T>(
  1. String url
)
inherited

Implementation

Future<T> getCall<T>(String url) async {
  final uri = Uri.parse(url);
  String? apiKey = _getApiKey(apiKeys.length);
  for (int i = 0; true; i++) {
    try {
      return await _getCall<T>(uri, apiKey: apiKey);
    } on RateLimitException {
      apiKey = _getApiKey(i);
      await Future.delayed(retryInterval);
    } on UnAuthorizedException {
      apiKey = _getApiKey(i);
      await Future.delayed(retryInterval);
    } catch (e) {
      rethrow;
    }
  }
}