Autocomplete

Do any of the xml2 endpoints have autocomplete processing. Specially I would like the user of an iOS app to start typing say an airport code and the query would respond with matches. This response would be further refined as they type more characters.

I know how to do the mechanics of it but the query returns an error currently if I search for “A” in ATL.

Thanks.

IainA

Hi

In case anyone reads this in the future, here’s what I did.

As posted previously there’s no (currently as far as I can see) no native autocomplete for AirportInfo (unlike say UA* for Search endpoint). So I did a call to AllAirports and cached locally (JSON parsing in Swift 4 is beautiful) then all you need is a call to AirportInfo (or NearbyAirport in v3) with an airportCode (or airport_code) that you obtain from the user in say an UISearchController (assuming iOS with Swift 4). Just be mindful that a separate call to AirportInfo will happen for each filtered object in UISearchResultsUpdating so you may want to limit that to the top 3 (say).

Like I said, this approach is already documented previously in this forum but thought I’d write my experience with Swift and iOS.

Best,

IainA