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.

[[TalkPlus sharedInstance] getPublicChannels:lastChannel 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];

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.

[[TalkPlus sharedInstance] getChannels:lastChannel 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];

3. Get 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.

[[TalkPlus sharedInstance] getHiddenChannels:lastChannel 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];

4. Get Total Unread Message Count

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

[[TalkPlus sharedInstance] getTotalUnreadCount:^(int totalCount) {
    // SUCCESS
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];

5. Mark All Channels As Read

Mark as read all unread messages from joined channels.

[[TalkPlus sharedInstance] markAsReadAllChannel:^{
    // SUCCESS
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];

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 iOS SDK v0.5.6.

TPChannelQueryParams *params = [[TPChannelQueryParams alloc] init];
params.lastChannel = lastChannel;
params.channelName = channelName;
params.category = category;
params.subcategory = subcategory;
params.memberIds = memberIds;
params.frozenType = TPUnspecifiedFrozenChannel;
params.privateTag = privateTag;
    
[[TalkPlus sharedInstance] searchChannels:params 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];

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 iOS SDK v0.5.6.

TPChannelQueryParams *params = [[TPChannelQueryParams alloc] init];
params.lastChannel = lastChannel;
params.channelName = channelName;
params.category = category;
params.subcategory = subcategory;
params.memberIds = memberIds;
params.frozenType = TPUnspecifiedFrozenChannel;
params.privateTag = privateTag;
    
[[TalkPlus sharedInstance] searchPublicChannels:params 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];

Last updated