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.

- (nonnull 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

– subscribedChannelsSortedBy:order:

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

- (nonnull NSArray<TCHChannel*> *)subscribedChannelsSortedBy:(TCHChannelSortingCriteria)criteria order:(TCHChannelSortingOrder)order

Parameters

criteria

The TCHChannelSortingCriteria to order the channels by.

order

The TCHChannelSortingOrder direction of the sort, either ascending or descending.

Return Value

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

Discussion

Retrieve a sorted 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:(nonnull 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:(nonnull 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:(nullable NSDictionary<NSString*,id> *)options completion:(nullable 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:(nonnull NSString *)sidOrUniqueName completion:(nonnull 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