getAllChannelMetadata method

Future<GetAllChannelMetadataResult> getAllChannelMetadata({
  1. int? limit,
  2. String? start,
  3. String? end,
  4. bool? includeCustomFields,
  5. bool? includeCount = true,
  6. bool includeStatus = true,
  7. bool includeType = true,
  8. String? filter,
  9. Set<String>? sort,
  10. Keyset? keyset,
  11. String? using,
})

Returns a paginated list of all channelMetadata associated with the given subscription key, optionally including each channelMetadata record's custom data object.

To include custom property fields in response, set includeCustomFields to true Omit this parameter if you don't want to retrieve additional metadata.

You can limit number of returned user object using limit parameter Default is 100, which is also the maximum value.

You can specify start and end to specify previously-returned cursor bookmark for fetching the next/previous page

To omit totalCount field from paginated list, set includeCount to false Default is true.

To omit status field from metadata, set includeStatus to false Default is true.

To omit type field from metadata, set includeType to false Default is true.

filter is Expression used to filter the results. Only objects whose properties satisfy the given expression are returned.

For sorting, use sort which is List of attributes to sort by. Append :asc or :desc to an attribute to specify sort direction. The default sort direction is ascending.

Implementation

Future<GetAllChannelMetadataResult> getAllChannelMetadata(
    {int? limit,
    String? start,
    String? end,
    bool? includeCustomFields,
    bool? includeCount = true,
    bool includeStatus = true,
    bool includeType = true,
    String? filter,
    Set<String>? sort,
    Keyset? keyset,
    String? using}) async {
  keyset ??= _core.keysets[using];

  var include = <String>{};
  if (includeCustomFields != null && includeCustomFields) {
    include.add('custom');
  }
  if (includeStatus) {
    include.add('status');
  }
  if (includeType) {
    include.add('type');
  }

  var params = GetAllChannelMetadataParams(keyset,
      include: include,
      limit: limit,
      start: start,
      end: end,
      includeCount: includeCount,
      filter: filter,
      sort: sort);

  return defaultFlow<GetAllChannelMetadataParams,
          GetAllChannelMetadataResult>(
      keyset: keyset,
      core: _core,
      params: params,
      serialize: (object, [_]) =>
          GetAllChannelMetadataResult.fromJson(object));
}