how to predict flight delays with an API