opsgenie-sdk
Advanced tools
Comparing version 0.3.5 to 0.4.0
@@ -13,3 +13,3 @@ module.exports = function (grunt) { | ||
all: { | ||
src: ["lib/*.js", "test/*.js", "samples/**/*.js", "lib/resources/*.js"], | ||
src: ["lib/*.js", "test/*.js", "samples/**/*.js", "lib/resources/*.js", "lib/alertV2/*.js"], | ||
options: { | ||
@@ -16,0 +16,0 @@ jshintrc: ".jshintrc" |
@@ -20,2 +20,3 @@ "use strict"; | ||
configuration: configuration.default_options, | ||
alertV2: require('./alertV2/AlertV2')(), | ||
alert: require('./resources/Alert')(), | ||
@@ -22,0 +23,0 @@ user: require('./resources/User')(), |
@@ -23,2 +23,4 @@ "use strict"; | ||
* example data: {id: 'id1'} or {alias: 'alias1'} etc. | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -30,2 +32,4 @@ close: function (data, config, cb) { | ||
* Count alerts request is used to counts alerts in OpsGenie | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -37,2 +41,4 @@ count: function (data, config, cb) { | ||
* data should be either {id: 'id1'} or {alias: 'alias1'} | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -44,2 +50,4 @@ listAlertNotes: function (data, config, cb) { | ||
* data should be either {id: 'id1'} or {alias: 'alias1'} | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -51,2 +59,4 @@ listAlertLogs: function (data, config, cb) { | ||
* data should be either {id: 'id1'} or {alias: 'alias1'} | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -58,2 +68,4 @@ listAlertRecipients: function (data, config, cb) { | ||
* data should be either {id: 'id1'} or {alias: 'alias1'} | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -66,2 +78,4 @@ acknowledge: function (data, config, cb) { | ||
* Also, endDate param should be provided - "endDate": ""2016-01-28 08:00"" | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -73,2 +87,4 @@ snooze: function (data, config, cb) { | ||
* data should be either {id: 'id1'} or {alias: 'alias1'} | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -80,2 +96,4 @@ renotify: function (data, config, cb) { | ||
* data should be either {id: 'id1'} or {alias: 'alias1'} | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -88,2 +106,4 @@ takeOwnership: function (data, config, cb) { | ||
* Also, owner param should be provided "owner":"john.smith@ifountain.com" | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -97,2 +117,4 @@ assign: function (data, config, cb) { | ||
* Also, the new team that will be added should be added to parameters as "team": "operations" | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -106,2 +128,4 @@ addTeam: function (data, config, cb) { | ||
* Also, the new recipient that will be added as "recipient":"john.smith@ifountain.com" | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -115,2 +139,4 @@ addRecipient: function (data, config, cb) { | ||
* Also, note param is mandatory as "note": "custom note" | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -125,2 +151,3 @@ addNote: function (data, config, cb) { | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -134,2 +161,4 @@ addTags: function (data, config, cb) { | ||
* Also, tags param is mandatory as "tags": "emergency, delay" | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -147,2 +176,3 @@ removeTags: function (data, config, cb) { | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -156,2 +186,4 @@ addDetails: function (data, config, cb) { | ||
* Also, details param is mandatory as "keys" : { "prop1", "prop2" } | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -168,2 +200,4 @@ removeDetails: function (data, config, cb) { | ||
* Also, action param is mandatory as "action": "acknowledge" | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -173,10 +207,2 @@ executeAction: function (data, config, cb) { | ||
} | ||
/** | ||
* Attach file request is used to attach files to alerts in OpsGenie. It should be sent as multipart HTTP request | ||
* One of id or alias parameters should be specified with attach file request. Alias option can only be used for open alerts | ||
* TODO: will be implemented | ||
*/ | ||
/*attachFile: function (data, config, cb) { | ||
api.post(this.baseURL + 'attachFile', data, config, cb); | ||
}*/ | ||
}; | ||
@@ -183,0 +209,0 @@ ops = operations.attach(ops, defaultOperations); |
{ | ||
"name": "opsgenie-sdk", | ||
"version": "0.3.5", | ||
"version": "0.4.0", | ||
"description": "OpsGenie Node.js SDK", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
# OpsGenie Node.js SDK | ||
[![npm version](https://badge.fury.io/js/opsgenie-sdk.svg)](https://badge.fury.io/js/opsgenie-sdk) | ||
[![Dependency Status](https://david-dm.org/opsgenie/opsgenie-nodejs-sdk.svg)](https://david-dm.org/opsgenie/opsgenie-nodejs-sdk) | ||
@@ -13,3 +14,4 @@ This is the repository for Node.js SDK of OpsGenie. | ||
* Alert API (TODO: only attachFile method is missing) | ||
* Alert API v2 | ||
* Alert API | ||
* User API | ||
@@ -44,3 +46,8 @@ * Group API | ||
```js | ||
opsgenie.alert.get({id: "alert_id"}, function (error, alert) { | ||
var get_alert_identifier = { | ||
identifier : "alert_id", | ||
identifierType : "id" | ||
}; | ||
opsgenie.alertV2.get(get_alert_identifier, function (error, alert) { | ||
if (error) { | ||
@@ -57,2 +64,2 @@ // handle error | ||
Also, checkout "[Node.js SDK page](https://www.opsgenie.com/docs/api-and-client-libraries/opsgenie-nodejs-api)" for detailed documentation | ||
Also, checkout "[Node.js SDK page](https://www.opsgenie.com/docs/api-and-client-libraries/opsgenie-nodejs-api)" for detailed documentation |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143763
28
1086
63
2
1