SBDMessageSearchQuery Class Reference

Inherits from NSObject
Conforms to SBDMappable
Declared in SBDMessageSearchQuery.h

Overview

A class representing query to retrieve list of SBDBaseMessages that matches a given query with given filters. SBDMessageSearchQuery can be generated by using SBDMessageSearchQueryBuilder

+ create

Create this query instance with default values.

+ (nonnull instancetype)create

Return Value

The instance of query.

Declared In

SBDMessageSearchQuery.h

+ createWithBuilder:

It is used builder pattern.

+ (nonnull instancetype)createWithBuilder:(nonnull void ( ^ ) ( SBDMessageSearchQueryBuilder *_Nonnull builder ))updateBlock

Parameters

updateBlock

Update Block to initialize with.

Return Value

The instance of query.

Declared In

SBDMessageSearchQuery.h

– loadNextPageWithCompletionHandler:

If this method is repeatedly called, it will retrieve the following pages of the searched messages.

- (void)loadNextPageWithCompletionHandler:(nonnull void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute. The messages is the array of SBDBaseMessage instances.

Declared In

SBDMessageSearchQuery.h

– isLoading

Shows if the query is loading.

- (BOOL)isLoading

Return Value

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

Declared In

SBDMessageSearchQuery.h

– hasNext

Shows if there is a next page.

- (BOOL)hasNext

Return Value

Returns YES if the query has next, otherwise returns NO.

Declared In

SBDMessageSearchQuery.h

+ buildFromSerializedData:

Returns message search query from given binary data.

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

Parameters

data

The binary data from serialize. Must not be nil.

Return Value

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

Declared In

SBDMessageSearchQuery.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

SBDMessageSearchQuery.h