TTBatchSearch

Objective-C

@interface TTBatchSearch

Swift

class TTBatchSearch

TomTom Batch Search API main object. Contains methods to use Tomtom’s batch search engine and provides support for both async calls.

  • DEPRECATED

    • This method is deprecated. Use the ‘initWithKey’ method to init with Key.
    • The planned withdrawal date is 15.06.2021.

    Initializer with info.plist Key.

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;

    Swift

    init()
  • Initializer with key for the TomTom Search API Service.

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithKey:(NSString *_Nonnull)key;

    Swift

    init(key: String)
  • Perform batch search with query

    Declaration

    Objective-C

    - (void)batchSearchWithQuery:(TTBatchQuery *_Nonnull)query;

    Swift

    func batchSearch(with query: TTBatchQuery)

    Parameters

    query

    Object containing the data needed to perform batch search.

  • Perform batch search with query with block

    Declaration

    Objective-C

    - (void)batchSearchWithQuery:(TTBatchQuery *_Nonnull)query
               completionHandler:
                   (void (^_Nonnull)(TTBatchResponse *_Nullable,
                                     TTResponseError *_Nullable))completionHandler;

    Swift

    func batchSearch(with query: TTBatchQuery, completionHandler: @escaping (TTBatchResponse?, TTResponseError?) -> Void)

    Parameters

    query

    Object containing the data needed to perform batch search.

    completionHandler

    CompletionHandler that informs the subscriber when a search response is available.

  • Delegate that informs the subscriber when batch search result is available.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<TTBatchSearchDelegate> _Nullable delegate;

    Swift

    weak var delegate: TTBatchSearchDelegate? { get set }