getRecent method

Future<List<Project>> getRecent({
  1. String? expand,
  2. List<StringList>? properties,
})

Returns a list of up to 20 projects recently viewed by the user that are still visible to the user.

This operation can be accessed anonymously.

Permissions required: Projects are returned only where the user has one of:

Implementation

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