Help me to find right adapter


#1

Hi, the API I have data from is not restful. The example is here .

How to get data from this? I try findAll, ember wants ID, I tried with query, asks for ID too. I need to parse it somehow.

Thanks


#2

Based on your writing, I’m assuming, you already fetched the data. In this case, your issue isn’t with the adapter, but with the serializer.

If the received data doesn’t follow the convention, your chosen serializer is expecting, you need to customize it. Have a look at https://guides.emberjs.com/v2.6.0/models/customizing-serializers/.

I think you want the JSONSerializer for this endpoint. Ember Data identifies objects by their IDs, here all are 0, which can make them fail. Looking at your data, the time might be a unique identifier for a record. You can either set the primaryKey on the model or override extractId on the serializer.


#3

Yes, you are right, I needed serializer.

Thanks.