I'm building an app with CI that relies a lot on returned data from multiple APIs. For example APIs from FlightAware, WeatherUndergound, amongst others. They'll be SOAP, RESTful, JSON, etc. based. I imagine it's best to not have the code snippets for those APIs in controller or view - what's best practice for integrating APIs, in general, into CI's structure considering they'll be called both on demand and in the background?
P.S. - I'll be displaying the returned data straight to a page and in some cases storing them to the database (temporarily, of course).