hoodiehq-archive / hood.ie-website-old

⛔ deprecated
http://hood.ie
74 stars 14 forks source link

Wrong task Event API in docs #58

Closed gr2m closed 10 years ago

gr2m commented 10 years ago

follow up for #56, related to https://github.com/hoodiehq/hoodie.js/issues/249

Totally my fault I think, there is something wrong with the documented task API.

// as documented today
hoodie.task.on('message:start:123',   function (newMessageTask, options) {});

// as it should be
hoodie.task.on('message:123:start',   function (newMessageTask, options) {});

The order has been changed a while ago. It's always type:id:action for both, hoodie.store & hoodie.task API

/cc @jzaefferer @tenmilestereo

lewiscowper commented 10 years ago

So is the type:id:action format applicable in the remote method too?

Specifically "hoodie.remote.on('add:note:uuid123', function (newObject) {});"

Should this be rewritten with the uuids in the middle too?

I can do this now regardless.

gr2m commented 10 years ago

correct. It should be hoodie.remote.on('note:uuid123:add', function (newObject) {});. Across hoodie API, we now follow this convention. If you see any docs / comments stating otherwise, feel free to fix :) And thanks for all your help, Lewis!

lewiscowper commented 10 years ago

No problem. :)

lewiscowper commented 10 years ago

This has been fixed with #59 being merged. :+1:

svnlto commented 10 years ago

yeah, thanks! @tenmilestereo :)