ladda-js / ladda

JavaScript data fetching layer with caching
https://petercrona.gitbooks.io/ladda/content/
MIT License
112 stars 16 forks source link

Add COMMAND operation #33

Closed LFDM closed 7 years ago

LFDM commented 7 years ago

Adds a new operation called COMMAND which is very similar to UPDATE, which one crucial difference: While UPDATE requires an updated entity as first argument is is agnostic about the resolved value which is returned, COMMAND is agnostic about its arguments and only cares about what is returned.

This should help when dealing with a less REST oriented API - you can just pass a command to it and the server's response will update the cache then.

Documentation is not updated yet.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.006%) to 99.543% when pulling 412041125190d29d1c9b307f1485851edfd40f4f on command-operation into 987185bb2601db3c569ebbaa0a7881b288a5dbfe on master.

petercrona commented 7 years ago

Looks good to me! No technical debt really, can easily be ignored by people who don't need it and useful for those who do.