View Channel List

1. Get Public Channels

You can view all public channels even if you are a not member.

The list is paginated, so to get to the next page, you can pass the last TPChannel from the previous list to get to the next page.

await TalkPlusAPI.getPublicChannels(lastChannel, (tpChannels, hasNext){
  if(hasNext) {
    TPChannel last = tpChannels.last;
    ...
  }
    ...
}, errorCallback: (errorCode, errorMessage){

});

2. Get Joined Channels

View currently joined channels.

The list is paginated, so to get to the next page, you can pass the last TPChannel from the previous list to get to the next page.

await TalkPlusAPI.getChannels(lastChannel, (tpChannels, hasNext){
  if(hasNext) {
    TPChannel last = tpChannels.last;
    ...
  }
    ...
}, errorCallback: (errorCode, errorMessage){

});

3. View Hidden Channels

View currently joined channels that have been marked as hidden.

The list is paginated, so to get to the next page, you can pass the last TPChannel from the previous list to get to the next page.

await TalkPlusAPI.getHiddenChannels(lastChannel, (tpChannels, hasNext){
  if(hasNext) {
    TPChannel last = tpChannels.last;
    ...
  }
    ...
}, errorCallback: (errorCode, errorMessage){

});

4. Get Total Unread Message Count

Get the total number of unread messages from all joined channels.

int unreadCount = await TalkPlusAPI.getTotalUnreadCount(
    errorCallback: (errorCode, errorMessage){
    }
);

5. Mark All Channels As Read

Mark as read all unread messages from joined channels.

await TalkPlusAPI.markAsReadAllChannel(
    errorCallback: (errorCode, errorMessage){
    }
);

6. Search Joined Channels

Search joined channels using various filters.

  • You can filter channels by name, category, subcategory, private tag and joined members.

  • TPChannelQueryParams class is available starting from TalkPlus Flutter SDK v0.5.9.

final queryParams = TPChannelQueryParams();
queryParams.lastChannel = lastChannel;
queryParams.channelName = channelName;
queryParams.category = category;
queryParams.subcategory = subcategory;
queryParams.memberIds = memberIds;
queryParams.privateTag = privateTag;
queryParams.frozenType = TPChannelFrozenType.TPUnspecifiedFrozenChannel;

await TalkPlusAPI.searchTPChannels(queryParams, (tpChannels, hasNext){
  if(hasNext) {
    TPChannel last = tpChannels.last;
    ...
  }
    ...
}, errorCallback: (errorCode, errorMessage){

});

7. Search Public Channels

Search public channels using various filters.

  • You can filter channels by name, category, subcategory, private tag and joined members.

  • TPChannelQueryParams class is available starting from TalkPlus Flutter SDK v0.5.9.

final queryParams = TPChannelQueryParams();
queryParams.lastChannel = lastChannel;
queryParams.channelName = channelName;
queryParams.category = category;
queryParams.subcategory = subcategory;
queryParams.memberIds = memberIds;
queryParams.privateTag = privateTag;
queryParams.frozenType = TPChannelFrozenType.TPUnspecifiedFrozenChannel;

await TalkPlusAPI.searchTPPublicChannels(queryParams, (tpChannels, hasNext){
  if(hasNext) {
    TPChannel last = tpChannels.last;
    ...
  }
    ...
}, errorCallback: (errorCode, errorMessage){

});

Last updated