invoke method
call api with latest features DOCS: https://doodstream.com/api-docs#
Implementation
FutureOr<Map> invoke({
required String uriPath,
Map<String, dynamic>? uriQueryParameters,
Map? parameters,
Map? headersParameters,
String? apiKey,
List<int>? statusCodes,
String? keyResultList,
String method_request = "get",
String specialTypeName = "ok",
}) async {
int try_count = 0;
while (true) {
await Future.delayed(Duration(microseconds: 1));
try {
return await _invokeRaw(
uriPath: uriPath,
uriQueryParameters: uriQueryParameters,
parameters: parameters,
headersParameters: headersParameters,
apiKey: apiKey,
statusCodes: statusCodes,
method_request: method_request,
specialTypeName: specialTypeName,
keyResultList: keyResultList,
);
} catch (e) {
if (try_count >= 3) {
rethrow;
}
try_count++;
if (e is ClientException) {
continue;
} else {
rethrow;
}
}
}
}