Booking Item Search
Use this method to fetch a list of booking items based on a search Query.
Searching with delegates
//In an existing ExampleViewController.swift
let searchQuery = BookingItemQuery(text: "Tours in Toronto", range: nil, boundingBox: nil)
Traveler.searchBookingItems(searchQuery: searchQuery, identifier: nil, delegate: self)
}
extension ExampleViewController: BookingItemSearchDelegate {
func bookingItemSearchDidSucceedWith(_ result: BookingItemSearchResult, identifier: AnyHashable?) {
// Successful search, deal with results here
}
func bookingItemsearchDidFailWith(_ error: Error, identifier: AnyHashable?) {
// Unsuccessul search, deal with error here
}
}Searching with completion blocks
Last updated