PollListGetRequest constructor
PollListGetRequest({
- required String channelUrl,
- required ChannelType channelType,
- String? token,
- int limit = 20,
Implementation
PollListGetRequest({
required String channelUrl,
required ChannelType channelType,
String? token,
int limit = 20,
}) : assert(1 <= limit && limit <= 20) {
url = 'polls';
queryParams = {
'channel_url': channelUrl,
'token': token,
'limit': limit,
'channel_type': channelType.urlString,
};
queryParams.removeWhere((key, value) => value == null);
}