getTasksIDRunsWithHttpInfo method
List runs for a task
Note: This method returns the HTTP Response
.
Parameters:
-
String taskID (required): The ID of the task to get runs for.
-
String zapTraceSpan: OpenTracing span context
-
String after: Returns runs after a specific ID.
-
int limit: The number of runs to return
-
DateTime afterTime: Filter runs to those scheduled after this time, RFC3339
-
DateTime beforeTime: Filter runs to those scheduled before this time, RFC3339
Implementation
Future<Response> getTasksIDRunsWithHttpInfo(
String taskID, {
String? zapTraceSpan,
String? after,
int? limit,
DateTime? afterTime,
DateTime? beforeTime,
}) async {
final path = r'/tasks/{taskID}/runs'.replaceAll('{taskID}', taskID);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (after != null) {
queryParams
.addAll(_convertParametersForCollectionFormat('', 'after', after));
}
if (limit != null) {
queryParams
.addAll(_convertParametersForCollectionFormat('', 'limit', limit));
}
if (afterTime != null) {
queryParams.addAll(
_convertParametersForCollectionFormat('', 'afterTime', afterTime));
}
if (beforeTime != null) {
queryParams.addAll(
_convertParametersForCollectionFormat('', 'beforeTime', beforeTime));
}
if (zapTraceSpan != null) {
headerParams[r'Zap-Trace-Span'] = parameterToString(zapTraceSpan);
}
const authNames = <String>[
'BasicAuthentication',
'QuerystringAuthentication',
'TokenAuthentication'
];
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes[0],
authNames,
);
}