<commit_before>let pagination = require('./pagination');

let spec = {
  "title": "Graph",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "title": "Item",
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "name": { "type": "string" },
          "type": { "type": "integer" }
        }
      },
      "required": ["id", "name", "type"]
    },
    "relationships": {
      "type": "array",
      "items": {
        "title": "Relationship",
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "fromItem": { "type": "integer" },
          "toItem": { "type": "integer" },
          "type": { "type": "integer" }
        }
      },
      "required": ["id", "fromItem", "toItem", "type"]
    }
  },
  "required": ["items", "relationships"]
};




let Graph = {
  name: '',
  nodes: [],
  edges: [],

  Graph: function (projectId) {
    let url = 'http://dummy:password@sevensource.jamacloud.com/rest/latest/items?project=33';
    pagination(url, 0, Number.MAX_SAFE_INTEGER).then(function (items) {
      console.log(items.data[0].id);
    }, function() {
      console.log('THIS FAILED ATHLEEN');
    });


  },
  Reorganize: function (rootNode) {

  },
  fromJson: function (graph) {
  },
  toJson: function () {
  }
};

module.exports = Graph;<commit_msg>fixed object key accessing from paginiation promise<commit_after>let pagination = require('./pagination');

let spec = {
  "title": "Graph",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "title": "Item",
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "name": { "type": "string" },
          "type": { "type": "integer" }
        }
      },
      "required": ["id", "name", "type"]
    },
    "relationships": {
      "type": "array",
      "items": {
        "title": "Relationship",
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "fromItem": { "type": "integer" },
          "toItem": { "type": "integer" },
          "type": { "type": "integer" }
        }
      },
      "required": ["id", "fromItem", "toItem", "type"]
    }
  },
  "required": ["items", "relationships"]
};

let Graph = {
  name: '',
  nodes: [],
  edges: [],

  Graph: function () {
    let url = 'http://dummy:password@sevensource.jamacloud.com/rest/latest/items?project=33';
    let promise = pagination(url, 0, Number.MAX_SAFE_INTEGER)
    promise.then(function (items) {
      // console.log(item);
      items.forEach(function(item){
        console.log(item.documentKey);
      });
    }, function() {
      console.log('THIS FAILED KATHLEEN');
    });


  },
  Reorganize: function (rootNode) {

  },
  fromJson: function (graph) {
  },
  toJson: function () {
  }
};

module.exports = Graph;
{'fraction_non_alphanumeric': 0.2128966223132037, 'fraction_numerical': 0.002388263391334016, 'mean_word_length': 2.2833146696528557, 'pattern_counts': {'":': 64, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '705952', 'n_tokens_mistral': 996, 'n_tokens_neox': 971, 'n_words': 191}