UNPKG

1.23 kBMarkdownView Raw
1# pingdom-api - Pingdom API for Node.js
2
3`pingdom-api` provides a simple, programmatic access to [Pingdom](https://www.pingdom.com/)'s API and simplifies its usage somewhat. Consider the example below:
4
5```js
6var pingdom = require('pingdom-api');
7
8var credentials = {
9 user: 'updatethis', // based on your user account
10 pass: 'updatethis', // based on your user account
11 appkey: 'updatethis' // generated per app via web interface
12}
13var api = pingdom(credentials);
14
15api.checks(function(err, checks) {
16 if(err) return console.error(err);
17
18 console.log('received checks', checks);
19
20 // get some results
21 api.results(function(err, results) {
22 if(err) return console.error(err);
23
24 console.log('received results', results);
25 }, {
26 target: checks[0].id,
27 qs: { // based on https://www.pingdom.com/services/api-documentation-rest/#ResourceResults
28 limit: 100
29 }
30 });
31});
32```
33
34Currently the API provides access just read-only access to Pingdom's API. In case you need something else, either [poke me with an issue](https://github.com/bebraw/pingdom-api/issues) or create a pull request.
35
36## License
37
38`pingdom-api` is available under MIT. See LICENSE for more details.