Improved response view
diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index d6493cb..87073d6 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -10,6 +10,9 @@
KorAP.API = KorAP.API || {};
+ /**
+ * Retrieve information about a match
+ */
KorAP.API.getMatchInfo = function (match, param, cb) {
// match is a KorAP.Match object
@@ -38,6 +41,16 @@
KorAP.API.getJSON(url, cb);
};
+ /**
+ * Retrieve information about collections
+ */
+ KorAP.API.getCollections = function (cb) {
+ KorAP.API.getJSON(KorAP.URL + '/collection', cb);
+ };
+
+ /**
+ * General method to retrieve JSON information
+ */
KorAP.API.getJSON = function (url, onload) {
var req = new XMLHttpRequest();