TCHChannels Class Reference

Inherits from NSObject
Declared in TCHChannels.h

Overview

Representation of a chat channel list.

– subscribedChannels

Retrieve a list of channels currently subscribed to on the client.

- (NSArray<TCHChannel*> *)subscribedChannels

Return Value

An array of all of the client’s currently subscribed channels.

Discussion

Retrieve a list of channels currently subscribed to on the client.

Declared In

TCHChannels.h

– userChannelDescriptorsWithCompletion:

Retrieve a list of channel descriptors the user has a participation state on, for example invited, joined, creator.

- (void)userChannelDescriptorsWithCompletion:(TCHChannelDescriptorPaginatorCompletion)completion

Parameters

completion

Completion block that will specify the result of the operation and a reference to the first page of user channel descriptors. If no completion block is specified, no operation will be executed.

Discussion

Retrieve a list of channel descriptors the user has a participation state on, for example invited, joined, creator.

Declared In

TCHChannels.h

– publicChannelDescriptorsWithCompletion:

Retrieve a list of channel descriptors for publicly visible channels.

- (void)publicChannelDescriptorsWithCompletion:(TCHChannelDescriptorPaginatorCompletion)completion

Parameters

completion

Completion block that will specify the result of the operation and a reference to the first page of public channel descriptors. If no completion block is specified, no operation will be executed.

Discussion

Retrieve a list of channel descriptors for publicly visible channels.

Declared In

TCHChannels.h

– createChannelWithOptions:completion:

Create a new channel with the specified options.

- (void)createChannelWithOptions:(NSDictionary *)options completion:(TCHChannelCompletion)completion

Parameters

options

Channel options for new channel whose keys are TCHChannelOption* constants. (optional - may be empty or nil)

completion

Completion block that will specify the result of the operation and a reference to the new channel.

Discussion

Create a new channel with the specified options.

TCHChannelOptionFriendlyName - String friendly name (optional)

TCHChannelOptionUniqueName - String unique name (optional)

TCHChannelOptionType - Expected values are @(TCHChannelTypePublic) or @(TCHChannelTypePrivate) (optional)

TCHChannelOptionAttributes - Expected value is an NSDictionary<NSString,id> , see also TCHChannel setAttributes:completion: (optional)

Declared In

TCHChannels.h

– channelWithSidOrUniqueName:completion:

Obtains a channel with the specified id or unique name.

- (void)channelWithSidOrUniqueName:(NSString *)sidOrUniqueName completion:(TCHChannelCompletion)completion

Parameters

sidOrUniqueName

Identifier or unique name for the channel.

completion

Completion block that will specify the result of the operation and a reference to the requested channel if it exists.

Discussion

Obtains a channel with the specified id or unique name.

Declared In

TCHChannels.h