I have a need to request some data from a third party API endpoint in an Ember app (Using Ember 1.7)
I'm not sure the best way to handle the response, should I:
Use
$.ajax
in my model hook, return the raw data and not worry about Ember models?Use
$.ajax
in my model hook, usestore.createRecord
to map the returned data into models and usestore.all
to return this data to my component.Use an adapter and use
store.findAll
to get the data (could be tricky as the returned data won't match my models).
I'm not quite sure of the pros and con's of getting data in this way, any input would be great.