From e81bec7860576b6f7365ef3c5ca948afed524364 Mon Sep 17 00:00:00 2001 From: cdoss-lifesize Date: Fri, 19 Jun 2020 17:58:41 -0500 Subject: [PATCH 1/2] Add reports api support --- index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.js b/index.js index 5479cb9..64d731c 100644 --- a/index.js +++ b/index.js @@ -284,6 +284,16 @@ TestRail.prototype.deleteProject = function (project_id, callback) { return this.apiPost('delete_project/' + project_id, callback); }; +// ----- Reports ----- + +TestRail.prototype.getReports = function (project_id, callback) { + return this.apiGet('get_reports/' + project_id, callback); +}; + +TestRail.prototype.runReport = function (report_template_id, callback) { + return this.apiGet('run_report/' + report_template_id, callback); +}; + // ----- Results ----- TestRail.prototype.getResults = function (test_id, filters, callback) { From 07de942befa43210424603c5980319b2935d8fb5 Mon Sep 17 00:00:00 2001 From: cdoss-lifesize Date: Fri, 19 Jun 2020 23:55:29 -0500 Subject: [PATCH 2/2] Link error fixes --- index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 64d731c..4e4fc16 100644 --- a/index.js +++ b/index.js @@ -50,8 +50,7 @@ TestRail.prototype._callAPI = function (method, url, queryVariables, body, callb headers: { 'content-type': 'application/json', 'accept': 'application/json' - }, - rejectUnauthorized: false + } }; if(body != null) { @@ -290,8 +289,8 @@ TestRail.prototype.getReports = function (project_id, callback) { return this.apiGet('get_reports/' + project_id, callback); }; -TestRail.prototype.runReport = function (report_template_id, callback) { - return this.apiGet('run_report/' + report_template_id, callback); +TestRail.prototype.runReport = function (report_id, callback) { + return this.apiGet('run_report/' + report_id, callback); }; // ----- Results -----