<commit_before>// Define DrupalAjaxRequest
var DrupalAjaxRequest = (function () {
  var fetch = function(feed_id, callback) {
    Zepto.ajax(
        {
          url: Kiosk.contentUrl(feed_id),
          dataType: 'jsonp',
          type: 'GET',
          cache: false,
          success: function (result) {
            callback(result);
          }
        }
    );
  }

  return {
    fetch : fetch
  }
})();<commit_msg>Add a method for fetching a node, and collections list (artifacts).<commit_after>// Define DrupalAjaxRequest
var DrupalAjaxRequest = (function () {
  var fetchNode = function(node_id, callback) {
    Zepto.ajax(
      {
        url: Kiosk.contentUrl('node'),
        dataType: 'jsonp',
        data: {nid: node_id},
        type: 'GET',
        cache: false,
        success: function (result) {
          callback(result);
        }
      }
    );
  }

  var fetchCollections = function(callback) {
    Zepto.ajax(
      {
        url: Kiosk.contentUrl('collections'),
        dataType: 'jsonp',
        type: 'GET',
        cache: false,
        success: function (result) {
          callback(result);
        }
      }
    );
  }

  return {
    fetchNode : fetchNode,
    fetchCollections: fetchCollections
  }
})();
{'fraction_non_alphanumeric': 0.12459807073954984, 'fraction_numerical': 0.0, 'mean_word_length': 1.9225352112676057, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4481301', 'n_tokens_mistral': 380, 'n_tokens_neox': 380, 'n_words': 83}