-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Serhat Can
authored
Jun 12, 2016
1 parent
d3b946e
commit a87e2e4
Showing
1 changed file
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,50 @@ | ||
# OpsGenie NodeJs SDK | ||
# OpsGenie Node.js SDK | ||
|
||
Build status: [![Build Status](https://travis-ci.com/srhtcn/opsgenie-nodejs-sdk.svg?token=QTDpPBArevfhSpyxWwwz&branch=master)](https://travis-ci.com/srhtcn/opsgenie-nodejs-sdk) | ||
CI Status: [![Build Status](https://travis-ci.com/srhtcn/opsgenie-nodejs-sdk.svg?token=QTDpPBArevfhSpyxWwwz&branch=master)](https://travis-ci.com/srhtcn/opsgenie-nodejs-sdk) | ||
|
||
This is the unofficial (for now) NodeJs sdk for OpsGenie. | ||
This is the repository for Node.js SDK of OpsGenie. | ||
|
||
## Aim and Scope | ||
|
||
OpsGenie Node.js SDK aims to access OpsGenie Web API through HTTP calls from Node.js applications. | ||
|
||
OpsGenie Node.js SDK covers: | ||
|
||
* Alert API (TODO: only attachFile method is missing) | ||
* User API | ||
* Group API | ||
* Team API | ||
* Escalation API (TODO: will be available soon) | ||
* Schedule API (TODO: will be available soon) | ||
* Schedule Override API (TODO: will be available soon) | ||
* Forwarding Rule API (TODO: will be available soon) | ||
* Heartbeat API (TODO: will be available soon) | ||
* Integration API (TODO: will be available soon) | ||
* Policy API (TODO: will be available soon) | ||
|
||
Future releases are subject to be delivered for packing more APIs soon. | ||
|
||
## Installation | ||
Node.js version >=0.6.x is required. | ||
|
||
`npm install opsgenie-sdk` | ||
|
||
## Getting Started | ||
|
||
```js | ||
var opsgenie = require('opsgenie-sdk'); | ||
|
||
opsgenie.configure({ | ||
'api_key': 'd1871497-38bc-4222-9063-32062fc6f2f4' | ||
}); | ||
``` | ||
|
||
```js | ||
opsgenie.alert.get({id: "request_alert_id"}, function (error, alert) { | ||
if (error) { | ||
// handle error | ||
} else { | ||
console.log("Alert data received", alert); | ||
} | ||
}); | ||
``` |