@js4cytoscape/ndex-client 0.4.3-alpha.3 → 0.4.3-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@js4cytoscape/ndex-client",
3
- "version": "0.4.3-alpha.3",
3
+ "version": "0.4.3-alpha.4",
4
4
  "description": "NDEx client library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,6 +28,9 @@
28
28
  "node": ">=12.16.1"
29
29
  },
30
30
  "dependencies": {
31
- "axios": "^1.3.4"
31
+ "axios": "^1.4.0"
32
+ },
33
+ "devDependencies": {
34
+ "@microsoft/tsdoc": "^0.14.2"
32
35
  }
33
36
  }
package/src/NDEx.js CHANGED
@@ -6,6 +6,9 @@ const CX1_HEADER = {
6
6
  }]
7
7
  };
8
8
 
9
+ /**
10
+ * NDEx client class.
11
+ */
9
12
  class NDEx {
10
13
  constructor(hostprefix) {
11
14
  if (hostprefix === undefined || hostprefix === null || hostprefix === '') {
@@ -380,6 +383,16 @@ class NDEx {
380
383
  return this._httpGetProtectedObj('network/' + uuid + '/summary', parameters);
381
384
  }
382
385
 
386
+ getNetworkV3Summary(uuid, accessKey,fmt) {
387
+ let parameters = {format: fmt != null? fmt : "FULL"}
388
+
389
+ if (accessKey != null) {
390
+ parameters ['accesskey'] = accessKey;
391
+ }
392
+
393
+ return this._httpGetV3ProtectedObj('networks/' + uuid + '/summary', parameters);
394
+ }
395
+
383
396
  createNetworkFromRawCX(rawCX, parameters) {
384
397
  return new Promise((resolve, reject) =>{
385
398
  this._httpPostProtectedObj('network', parameters, rawCX).then(
@@ -463,7 +476,7 @@ class NDEx {
463
476
  return this._httpPostProtectedObj('search/network', params, data);
464
477
  }
465
478
 
466
- neighborhoodQuery(uuid, searchTerms, saveResult, parameters) {
479
+ neighborhoodQuery(uuid, searchTerms, saveResult, parameters, outputCX2 = false) {
467
480
  let params = {};
468
481
 
469
482
  if (saveResult !== undefined && saveResult === true) {params.save = true;}
@@ -484,7 +497,13 @@ class NDEx {
484
497
  if (parameters.directOnly !== undefined) {
485
498
  data.directOnly = parameters.directOnly;
486
499
  }
500
+ if ( parameters.nodeIds !=null) {
501
+ data.nodeIds = parameters.nodeIds;
502
+ }
487
503
  }
504
+ if( outputCX2)
505
+ return this._httpPostV3ProtectedObj('search/network/' + uuid + '/query', params, data);
506
+
488
507
  return this._httpPostProtectedObj('search/network/' + uuid + '/query', params, data);
489
508
 
490
509
  }
@@ -533,10 +552,10 @@ class NDEx {
533
552
  getNetworkSummariesV3ByUUIDs(uuidList, accessKey,fmt) {
534
553
  let parameter = {format: fmt == undefined ? "FULL" : fmt}
535
554
 
536
- if(accessKey === undefined)
555
+ if(accessKey != null)
537
556
  parameter['accesskey']= accessKey;
538
557
 
539
- return this._httpPostV3ProtectedObj('/networks/summary', parameter, uuidList);
558
+ return this._httpPostV3ProtectedObj('batch/networks/summary', parameter, uuidList);
540
559
  }
541
560
 
542
561