getFavouriteFilters method

Future<List<Filter>> getFavouriteFilters({
  1. String? expand,
})

Returns the visible favorite filters of the user.

This operation can be accessed anonymously.

Permissions required: A favorite filter is only visible to the user where the filter is:

  • owned by the user.
  • shared with a group that the user is a member of.
  • shared with a private project that the user has Browse projects project permission for.
  • shared with a public project.
  • shared with the public.

For example, if the user favorites a public filter that is subsequently made private that filter is not returned by this operation.

Implementation

Future<List<Filter>> getFavouriteFilters({String? expand}) async {
  return (await _client.send(
    'get',
    'rest/api/3/filter/favourite',
    queryParameters: {
      if (expand != null) 'expand': expand,
    },
  ) as List<Object?>)
      .map((i) => Filter.fromJson(i as Map<String, Object?>? ?? const {}))
      .toList();
}