The Adapter is responsable to translate store actions against your persistence layer.
As you do not follow the RESTAdapter convention, you will need to create a custom adapter to communicate with your specific API. The easiest way could be to extend RESTAdapter whose implementation is closed to your API.
App.ApplicationAdapter= DS.RESTAdapter.extend({
namespace: 'api',
pathForType: function(type) {
var decamelized = Ember.String.decamelize(type);
return Ember.String.pluralize(decamelized);
},
findQuery: function(store, type, query) {
var params = [];
Object.keys(query).forEach(function (key) {
var param = key+'='+encodeURIComponent(query[key]);
params.push(param);
});
params = params.join('&');
var url = this.buildURL(type.typeKey);
url = [url, params].join('/?');
return this.ajax(url, 'GET');
}
});
I ovewrote findQuery, because you do not query by model primary key with find('bookChapter', 1). then you make the request as:
App.ChapterRoute = Ember.Route.extend({
model: function(params) {
return this.store.find('bookChapter', {book: params.book_id});
}
});
If your API differs communication or serialization convention, you would need to extend either the RESTSerializer or RESTAdapter (check the DOCs to know which methods should be overwritten).