samedi 18 juin 2016

Ember data retrieve multiple instances of the same model in one route

I currently have an ember app that's trying to retrieve data from a 3rd party API using Ember Data. The urls are in the format, /user_id/date/food, which would retrieve the user's consumed food on the given day. I want to retrieve the list of foods the user consumed given a date range (2015-06-07, 2015-08-10).

I tried to use Ember.query and filter out the unnecessary data, but the API doesn't have an endpoint which would return all of the consumed foods.

Currently I'm supporting the single day query using queryRecord and passing the day in.




Aucun commentaire:

Enregistrer un commentaire