emscripten Humble Cloud interface
Edward Rudd
2014-08-30 f81a1dccdf13cfccd6a4cadaaedec93d32f49972

update "urkle" cloud driver sample to use new naming

1 files modified
8 ■■■■ changed files
humble_cloud/urkle_cloud.js 8 ●●●● patch | view | raw | blame | history
humble_cloud/urkle_cloud.js
@@ -39,7 +39,7 @@
    var provider = {
        vendor: 'Urkle!',
        listFiles: function(options, onsuccess, onerror) {
        allFiles: function(options, onsuccess, onerror) {
            // could encapsulate onload + onerror to provide extra functionality here
            xhrGET(settings.remoteAPIEndpoint + '/storage/files?appToken=' + encodeURIComponent(options.applicationtoken), function(data) {
                var json = JSON.parse(data),
@@ -54,16 +54,16 @@
                onsuccess(ret)
            }, onerror);
        },
        downloadFile: function(options, url, onsuccess, onerror) {
        read: function(options, url, onsuccess, onerror) {
            xhrGET(url, onsuccess, onerror);
        },
        uploadFile: function(options, fileinfo, data, onsuccess, onerror) {
        write: function(options, fileinfo, data, onsuccess, onerror) {
            var q = 'appToken=' + encodeURIComponent(options.applicationtoken)
                   +'&path=' + encodeURIComponent(fileinfo.path)
                   +'&timestamp=' + encodeURIComponent(fileinfo.timestamp.getTime());
            xhrPUT(settings.remoteAPIEndpoint + '/storage/files?' + q, data, onsuccess, onerror);
        },
        removeFile: function() {
        rm: function() {
        }
    };