update "urkle" cloud driver sample to use new naming
| | |
| | | |
| | | 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), |
| | |
| | | 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) |
| | | +'×tamp=' + encodeURIComponent(fileinfo.timestamp.getTime()); |
| | | xhrPUT(settings.remoteAPIEndpoint + '/storage/files?' + q, data, onsuccess, onerror); |
| | | }, |
| | | removeFile: function() { |
| | | rm: function() { |
| | | |
| | | } |
| | | }; |