mikaa123 / catnap

Simple Resource-oriented architecture for node
MIT License
75 stars 5 forks source link

parameters for serializing a resource should change to be more coherent #4

Closed mikaa123 closed 10 years ago

mikaa123 commented 10 years ago

When adding a representation to a resource, we do:

myResource
    .representation('representation-name', function (e) {
         // heavy work goes there.
    }

In order to be more coherent, we should call the following to get its representation:

myResource('representation-name', entity);

instead of the actual myResource(entity, 'representation-name');