SBDGroupChannelListQuery Class Reference

Inherits from NSObject
Declared in SBDGroupChannelListQuery.h

Overview

The SBDGroupChannelListQuery class is a query class for getting the list of group channels. The instance of this class is created by createMyGroupChannelListQuery in SBDGroupChannel class.

  limit

Sets the number of channels per page.

@property (atomic) NSUInteger limit

Declared In

SBDGroupChannelListQuery.h

  includeEmptyChannel

If the value is YES, the channel list includes empty channel.

@property (atomic) BOOL includeEmptyChannel

Declared In

SBDGroupChannelListQuery.h

  includeMemberList

If the value is YES, the channel object of the list includes members list.

@property (atomic) BOOL includeMemberList

Declared In

SBDGroupChannelListQuery.h

  order

Sets the order of the list. The order is defined in SBDGroupChannelListOrder.

@property (atomic) SBDGroupChannelListOrder order

Declared In

SBDGroupChannelListQuery.h

  hasNext

Shows if there is a next page

@property (atomic, readonly) BOOL hasNext

Declared In

SBDGroupChannelListQuery.h

  queryType

Sets query type for includeMemberList.

@property (atomic) SBDGroupChannelListQueryType queryType

Declared In

SBDGroupChannelListQuery.h

  customTypeFilter

Sets the custom type filter. (Deprecated: in 3.0.64. Use customTypesFilter instead.)

@property (strong, nonatomic, nullable) NSString *customTypeFilter

Declared In

SBDGroupChannelListQuery.h

  memberStateFilter

Sets the member state filter.

@property (nonatomic) SBDMemberStateFilter memberStateFilter

Declared In

SBDGroupChannelListQuery.h

  channelUrlsFilter

Sets SBDGroupChannel URLs filter. SBDGroupChannel list containing only and exactly the passed SBDGroupChannel URLs will be returned. This does not cooperate with other filters.

@property (copy, nonatomic, nullable) NSArray<NSString*> *channelUrlsFilter

Declared In

SBDGroupChannelListQuery.h

  channelNameFilter

Sets a filter to return only channels that contains the specified group channel name. (Deprecated: in 3.0.64. Use setChannelNameContainsFilter: instead.)

@property (strong, nonatomic, nullable) NSString *channelNameFilter

Declared In

SBDGroupChannelListQuery.h

  superChannelFilter

Sets to filter super channel. SBDGroupChannelSuperChannelFilterAll by default.

@property (nonatomic) SBDGroupChannelSuperChannelFilter superChannelFilter

Declared In

SBDGroupChannelListQuery.h

  publicChannelFilter

Sets to filter public channel. SBDGroupChannelSuperChannelFilterAll by default.

@property (nonatomic) SBDGroupChannelPublicChannelFilter publicChannelFilter

Declared In

SBDGroupChannelListQuery.h

  customTypeStartsWithFilter

Sets to filter channels by custom type that starts with.

@property (copy, nonatomic, nullable) NSString *customTypeStartsWithFilter

Declared In

SBDGroupChannelListQuery.h

  customTypesFilter

Sets the custom types filter. The custom types to search.

@property (copy, nonatomic, nullable) NSArray<NSString*> *customTypesFilter

Declared In

SBDGroupChannelListQuery.h

  nicknameContainsFilter

Sets the filter with nickname. The group channels which have the member that has nickname are returned by loadNextPageWithCompletionHandler:(LIKE search).

@property (copy, nonatomic, nullable) NSString *nicknameContainsFilter

Declared In

SBDGroupChannelListQuery.h

  userIdsIncludeFilter

Sets the filter with user IDs. The group channels which have the members that contain user IDs are returned by loadNextPageWithCompletionHandler:.

@property (copy, nonatomic, readonly, nullable) NSArray<NSString*> *userIdsIncludeFilter

Declared In

SBDGroupChannelListQuery.h

  userIdsExactFilter

Sets the filter with user IDs. The group channels which have the members that have user IDs are returned by loadNextPageWithCompletionHandler:. The channels have the userIds members only.

@property (copy, nonatomic, nullable) NSArray<NSString*> *userIdsExactFilter

Declared In

SBDGroupChannelListQuery.h

  channelNameContainsFilter

Sets a filter to return only channels that contains the specified group channel name. The channel name to search. The query will return the channels include channelName.

@property (copy, nonatomic, nullable) NSString *channelNameContainsFilter

Declared In

SBDGroupChannelListQuery.h

  unreadChannelFilter

Sets to filter channels by the unread messages. The default value is SBDUnreadChannelFilterAll.

@property (nonatomic) SBDUnreadChannelFilter unreadChannelFilter

Availability

3.0.113

Declared In

SBDGroupChannelListQuery.h

  metaDataOrderKeyFilter

Sets a key for ordering by value in the metadata. This is valid when the order is SBDGroupChannelListOrderChannelMetaDataValueAlphabetical only.

@property (copy, nonatomic, nullable) NSString *metaDataOrderKeyFilter

Availability

3.0.118

Declared In

SBDGroupChannelListQuery.h

  channelHiddenStateFilter

Sets to filter channels by the hidden state. The default value is SBDChannelHiddenStateFilterUnhiddenOnly.

@property (atomic) SBDChannelHiddenStateFilter channelHiddenStateFilter

Availability

3.0.122

Declared In

SBDGroupChannelListQuery.h

  searchQuery

The query property of the query specified by setSearchFilterQuery:fields:

@property (copy, nonatomic, nullable, readonly) NSString *searchQuery

Availability

3.0.144

Declared In

SBDGroupChannelListQuery.h

  searchFields

The fields properties of the query specified by setSearchFilterQuery:fields:

@property (nonatomic, readonly) SBDGroupChannelListQuerySearchField searchFields

Availability

3.0.144

Declared In

SBDGroupChannelListQuery.h

– init

DO NOT USE this initializer. Use [SBDGroupChannel createMyGroupChannelListQuery] instead.

- (nullable instancetype)init

Declared In

SBDGroupChannelListQuery.h

– isLoading

Shows if the query is loading.

- (BOOL)isLoading

Return Value

Returns YES if the query is loading, otherwise returns NO.

Declared In

SBDGroupChannelListQuery.h

– setUserIdsFilter:exactMatch:

Sets the filter with user IDs. The group channels which have the members that have user IDs are returned by loadNextPageWithCompletionHandler:. (Deprecated: in 3.0.19)

- (void)setUserIdsFilter:(NSArray<NSString*> *_Nonnull)userIds exactMatch:(BOOL)exactMatch

Parameters

userIds

User IDs to search.

exactMatch

If YES, the group channels which have the userIds only are returned. If NO, the group channels which contain the userIds are returned.

Declared In

SBDGroupChannelListQuery.h

– setUserIdsIncludeFilter:queryType:

Sets the filter with user IDs. The group channels which have the members that contain user IDs are returned by loadNextPageWithCompletionHandler:.

- (void)setUserIdsIncludeFilter:(NSArray<NSString*> *_Nonnull)userIds queryType:(SBDGroupChannelListQueryType)queryType

Parameters

userIds

User IDs to search.

queryType

Logical condition applied to filter. If you pass SBDGroupChannelListQueryTypeAnd to queryType and A, B to userIds, the channels whose members containing A and B will be returned. If SBDGroupChannelListQueryTypeOr is set, the members of the queried channels will be A or B.

Declared In

SBDGroupChannelListQuery.h

– setCustomTypeFilter:

Sets the custom type filter. (Deprecated: in v3.0.79.)

- (void)setCustomTypeFilter:(NSString *_Nullable)customType

Parameters

customType

The custom type to search.

Declared In

SBDGroupChannelListQuery.h

– setSearchFilter:fields:

Sets the search query and search fields of the query specified a given query and a given fields.

- (void)setSearchFilter:(nonnull NSString *)query fields:(SBDGroupChannelListQuerySearchField)fields

Parameters

query

The query to request for searchFields.

fields

The fields to request query for searchQuery that MUST be SBDGroupChannelListQuerySearchField.

Availability

3.0.144

@code SBDGroupChannelListQuery query = [SBDGroupChannel createMyGroupChannelListQuery]; NSString filter = @“sendbird”; SBDGroupChannelListQuerySearchField fields = SBDGroupChannelListQuerySearchFieldChannelName | SBDGroupChannelListQuerySearchFieldMemberNickname; [query setSearchFilter:filter fields:fields];

[query loadNextPageWithCompletionHandler:^(NSArraySBDGroupChannel > channels, SBDError *error) { if (error != nil) { handle error } else { do something } }]; @endcode

Declared In

SBDGroupChannelListQuery.h

– loadNextPageWithCompletionHandler:

Gets the list of channels. If this method is repeatedly called, it will retrieve the following pages of the channel list.

- (void)loadNextPageWithCompletionHandler:(nullable void ( ^ ) ( NSArray<SBDGroupChannel*> *_Nullable channels , SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute. The channels is the array of SBDGroupChannel instances.

Declared In

SBDGroupChannelListQuery.h

+ buildFromSerializedData:

Returns my group channel list query from given binary data.

+ (nullable instancetype)buildFromSerializedData:(NSData *_Nonnull)data

Parameters

data

The binary data from serialize. Must not be nil.

Return Value

SBDGroupChannelListQuery The query instance from which to deserialized data. Can be nil if an internal error occurs.

Declared In

SBDGroupChannelListQuery.h

– serialize

Returns a serialized binary data from a query.

- (nullable NSData *)serialize

Return Value

A serialized binary data from query, or nil if an internal error occurs.

Declared In

SBDGroupChannelListQuery.h