cek 8 gadi atpakaļ
vecāks
revīzija
70348f56c3
1 mainītis faili ar 11 papildinājumiem un 0 dzēšanām
  1. 11 0
      app/scripts/arkiwi.js

+ 11 - 0
app/scripts/arkiwi.js

@@ -22,6 +22,17 @@ ARKIWI.Aggregator = function (aggregator, defaultParameters) {
 
 ARKIWI.Aggregator.constructor = ARKIWI.Aggregator;
 
+/* Chiede all'aggregatore i metadati su una cartella o un file. */
+ARKIWI.Aggregator.prototype.path = function (path, callback, notBase64) {
+    var pathType = notBase64 ? 'path' : 'path64';
+    $.getJSON(this.aggregator + '/' + pathType + '/' + path + '/json/?' + this.defaultParameters, function (result) {
+        if (callback != undefined)
+            callback(result);
+    }).fail(function (error) {
+        throw 'Arkiwi.path(): status ' + status + ' error ' + error.responseText;
+    });
+};
+
 /* Esegue un ricerca sull'aggregatore */
 ARKIWI.Aggregator.prototype.search = function (query, callback, jailFolder) {
     var sanitizedQuery = query;