I think you'd have to override the serialize and buildURL methods. You could also override the find call directly and bypass all of the unnecessary Ember-Data calls.
But in my opinion, the RESTAdapter
is incredibly complicated nowadays. Given that your API is so different, I think you would be better off writing your own adapter from scratch. My custom REST adapter is about 100 lines long, and 20 of those are just $.ajax
options. For instance, your find
call could be as easy as:
find: function(store, type, id) {
return new Ember.RSVP.Promise(function(resolve) {
var data = {
http_verb: 'GET',
endpoint: 'special_namespace/' + type.typeKey.pluralize(),
data: {}
};
$.post('/scripts/server/api_call.php', data, function(response) {
resolve(response);
});
});
}