OpenChannelListRequest constructor

OpenChannelListRequest({
  1. String? channelName,
  2. String? channelUrl,
  3. String? customType,
  4. List<ChannelQueryIncludeOption>? options,
  5. String? token,
  6. int limit = 30,
})

Implementation

OpenChannelListRequest({
  String? channelName,
  String? channelUrl,
  String? customType,
  List<ChannelQueryIncludeOption>? options,
  String? token,
  int limit = 30,
}) : super() {
  url = 'open_channels';
  queryParams = {
    if (channelName != null) 'name_contains': channelName,
    if (channelUrl != null) 'url_contains': channelUrl,
    if (customType != null) 'custom_type': customType,
    if (token != null) 'token': token,
    'limit': limit.toString(),
  };

  queryParams.addAll(options?.toJson() ?? {});
}