Commit 58690863 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Add comment on crib-enable.js

parent 94eb66ce
...@@ -109,6 +109,12 @@ ...@@ -109,6 +109,12 @@
} }
}) })
/**
* allDocs return the list of document in the cache
*
* @params {Object} Not taken into account
* @return {} Return the data url of the document
*/
.declareMethod('allDocs', function(params) { .declareMethod('allDocs', function(params) {
if (params && params.cached_only) { if (params && params.cached_only) {
return new RSVP.Queue() return new RSVP.Queue()
...@@ -126,6 +132,13 @@ ...@@ -126,6 +132,13 @@
}); });
}) })
/**
* get Return a data url. Cannot return a blob as the data
* is transmitted through an iFrame
*
* @url {string} url of the document to retrieve
* @return {data_url} Return the data url of the document
*/
.declareMethod('get', function(url) { .declareMethod('get', function(url) {
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
...@@ -144,6 +157,14 @@ ...@@ -144,6 +157,14 @@
}); });
}) })
/**
* put Return a data url. Cannot provide a blob as the data
* is transmitted through an iFrame
*
* @url {string} url of the document to update
* @parameter {data_url} data url of the document to put, it will be transformed in a blob
* @return {data_url} Return the data url of the document
*/
.declareMethod('put', function(url, parameter) { .declareMethod('put', function(url, parameter) {
return new RSVP.Queue() return new RSVP.Queue()
.push(function() { .push(function() {
...@@ -159,6 +180,12 @@ ...@@ -159,6 +180,12 @@
}).fail(setStatus); }).fail(setStatus);
}) })
/**
* Remove an url from the cache
*
* @url {string} url of the document to remove
* @return {}
*/
.declareMethod('remove', function(url) { .declareMethod('remove', function(url) {
return new RSVP.Queue() return new RSVP.Queue()
.push(function() { .push(function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment