getTasksWithHttpInfo method

Future<Response> getTasksWithHttpInfo({
  1. String? zapTraceSpan,
  2. String? name,
  3. String? after,
  4. String? user,
  5. String? org,
  6. String? orgID,
  7. String? status,
  8. int? limit,
  9. String? type,
})

List all tasks

Note: This method returns the HTTP Response.

Parameters:

  • String zapTraceSpan: OpenTracing span context

  • String name: Returns task with a specific name.

  • String after: Return tasks after a specified ID.

  • String user: Filter tasks to a specific user ID.

  • String org: Filter tasks to a specific organization name.

  • String orgID: Filter tasks to a specific organization ID.

  • String status: Filter tasks by a status--"inactive" or "active".

  • int limit: The number of tasks to return

  • String type: Type of task, unset by default.

Implementation

Future<Response> getTasksWithHttpInfo({
  String? zapTraceSpan,
  String? name,
  String? after,
  String? user,
  String? org,
  String? orgID,
  String? status,
  int? limit,
  String? type,
}) async {
  final path = r'/tasks';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (name != null) {
    queryParams
        .addAll(_convertParametersForCollectionFormat('', 'name', name));
  }
  if (after != null) {
    queryParams
        .addAll(_convertParametersForCollectionFormat('', 'after', after));
  }
  if (user != null) {
    queryParams
        .addAll(_convertParametersForCollectionFormat('', 'user', user));
  }
  if (org != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', 'org', org));
  }
  if (orgID != null) {
    queryParams
        .addAll(_convertParametersForCollectionFormat('', 'orgID', orgID));
  }
  if (status != null) {
    queryParams
        .addAll(_convertParametersForCollectionFormat('', 'status', status));
  }
  if (limit != null) {
    queryParams
        .addAll(_convertParametersForCollectionFormat('', 'limit', limit));
  }
  if (type != null) {
    queryParams
        .addAll(_convertParametersForCollectionFormat('', 'type', type));
  }

  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,
  );
}