Documentation
iOS ReferenceAndroid Reference
  • Overview
  • Release Notes
    • 2019 Release Notes
  • Quick Start
    • Configuration settings
  • Getting Started
    • Environments
    • Domain Whitelist
  • Traveler
    • Overview
    • Mobile SDKs
      • Overview
      • Minimum Requirements
      • iOS
        • Installation
        • Getting Started
      • Android
        • Installation
        • Getting Started
      • Usage
        • Booking Item Search
          • Booking Item Search UI
        • Flight Search
        • Catalog
        • Catalog Item Details
        • Availabilities
        • Getting Passes
        • Booking Form
          • Questions
          • Answers
          • Validation
        • Creating an Order
        • Processing an Order
      • Errors
    • Traveler API
    • Payments
  • Partner
    • Overview
    • Partner API
  • Glossary
    • API Convention
      • Error Codes
      • API Rate Limiting
    • Terminology
  • Support
    • Contact
Powered by GitBook
On this page

Was this helpful?

  1. Traveler
  2. Mobile SDKs
  3. Usage

Flight Search

Use this method to provide real time flight search capabilities to your app.

let query = FlightQuery(number: "AC01", date: Date())
Traveler.flightSearch(query: query) { (flights, error) in 
    // ...
}

Alternatively you can use the delegate pattern

Traveler.flightSearch(query: query, delegate: self)
extension MyViewController: FlightSearchDelegate {
    func flightSearchDidSucceedWith(_ result: [Flight]) {
    
    }
    
    func flightSearchDidFailWith(_ error: Error) {
    
    }
}

FlightQuery query = new FlightQuery("AC01", new Date());
Traveler.flightSearch(query, new FlightSearchCallback() {
    @Override
    public void onFlightSearchSuccess(List<Flight> flights) {
    
    }
    
    @Override
    public void onFlightSearchError(Error error) {
    
    }
});

PreviousBooking Item Search UINextCatalog

Last updated 6 years ago

Was this helpful?