modelsListWithHttpInfo method

Future<Response> modelsListWithHttpInfo({
  1. String? project,
  2. String? status,
})

Lists all models for all projects the user is a member of. Can be filtered by project.

Note: This method returns the HTTP Response.

Parameters:

  • String project:

  • String status: DRAFT=In development, READY=Modelling complete, ONLINE=Active use. * DRAFT - Draft * READY - Ready * ONLINE - Online

Implementation

Future<Response> modelsListWithHttpInfo({
  String? project,
  String? status,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/api/models/';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (project != null) {
    queryParams.addAll(_queryParams('', 'project', project));
  }
  if (status != null) {
    queryParams.addAll(_queryParams('', 'status', status));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}