<commit_before>/**
 * Dydra.com Software Development Kit (SDK) for JavaScript.
 *
 * This is free and unencumbered software released into the public domain.
 *
 * @see http://docs.dydra.com/sdk/javascript
 */

var SPARQL = (function($) {
  var Client = function(endpointURL) {
    this.query = function() {
      // TODO
    };
    this.update = function() {
      // TODO
    };
  };

  return {
    Client: Client
  };
})(jQuery);

if (typeof exports !== 'undefined') {
  module.exports = SPARQL;
}
else {
  window.SPARQL = SPARQL;
}
<commit_msg>Implemented the SPARQL.Client#query() method.<commit_after>/**
 * Dydra.com Software Development Kit (SDK) for JavaScript.
 *
 * This is free and unencumbered software released into the public domain.
 *
 * @see http://docs.dydra.com/sdk/javascript
 */

var SPARQL = (function($) {
  var Client = function(endpointURL) {
    this.query = function(queryText, settings) {
      $.ajax(endpointURL, {
        type: 'POST',
        contentType: 'application/sparql-query',
        data: queryText,
        dataType: 'json',
        accepts: {json: 'application/sparql-results+json'},
        beforeSend: function(xhr) {
          xhr.setRequestHeader('Accept', 'application/sparql-results+json');
        },
        username: settings.username,
        password: <PASSWORD>,
        success: settings.success,
        error: settings.failure
      });
    };

    this.update = function() {
      // TODO
    };
  };

  return {
    Client: Client
  };
})(jQuery);

if (typeof exports !== 'undefined') {
  module.exports = SPARQL;
}
else {
  window.SPARQL = SPARQL;
}

{'fraction_non_alphanumeric': 0.14392059553349876, 'fraction_numerical': 0.0, 'mean_word_length': 2.6742596810933943, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6291746', 'n_tokens_mistral': 513, 'n_tokens_neox': 502, 'n_words': 119}