getAllProjects method

  1. @deprecated
Future<List<Project>> getAllProjects({
  1. String? expand,
  2. int? recent,
  3. List<String>? properties,
})

Returns all projects visible to the user. Deprecated, use Get projects paginated that supports search and pagination.

This operation can be accessed anonymously.

Permissions required: Projects are returned only where the user has Browse Projects or Administer projects project permission for the project.

Implementation

@deprecated
Future<List<Project>> getAllProjects(
    {String? expand, int? recent, List<String>? properties}) async {
  return (await _client.send(
    'get',
    'rest/api/3/project',
    queryParameters: {
      if (expand != null) 'expand': expand,
      if (recent != null) 'recent': '$recent',
      if (properties != null)
        'properties': properties.map((e) => e).join(','),
    },
  ) as List<Object?>)
      .map((i) => Project.fromJson(i as Map<String, Object?>? ?? const {}))
      .toList();
}