# uptime-robot

> A simple node.js API for uptime robot

Latest version **1.3.0** (published 2017-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install uptime-robot
pnpm add uptime-robot
yarn add uptime-robot
bun add uptime-robot
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2017-01-28 |
| First published | 2013-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | ForbesLindesay |
| Maintainers | forbeslindesay |

## Links

- npm: https://www.npmjs.com/package/uptime-robot
- Repository: https://github.com/ForbesLindesay/uptime-robot
- Homepage: https://github.com/ForbesLindesay/uptime-robot#readme
- Issues: https://github.com/ForbesLindesay/uptime-robot/issues
- npm.io page: https://npm.io/package/uptime-robot

## Dependencies (2)

- [is-browser](https://npm.io/package/is-browser.md) ^2.0.1
- [then-jsonp](https://npm.io/package/then-jsonp.md) ^1.0.1

## Recent versions

- 1.3.0 (latest) — 2017-01-28
- 1.2.0 — 2017-01-17
- 1.1.0 — 2015-11-17
- 1.0.1 — 2014-12-19
- 1.0.0 — 2014-12-19
- 0.0.1 — 2013-03-24

## README

# Uptime Robot

A simple node.js and browserify API for [uptime robot](http://uptimerobot.com/api)

    $ npm install uptime-robot

Currently, only some methods are implemented, but pull requests for the missing ones are welcome.

This library works in the browser using browserify.  You can see a demo by cloning this repo and running `npm run test-browser`.

All methods also return a [Promise](https://www.promisejs.org/) if no callback is provided.

## Example

```javascript
var Client = require('uptime-robot');
var cl = new Client('api-key');
cl.getMonitors({customUptimeRatio: [1, 7, 30]}, function (err, res) {
  if (err) throw err;
  console.dir(res);
});
```

## API

### cl.getMonitors(options, fn(err, monitors))

options:

 - see https://uptimerobot.com/api

### cl.newMonitor(options, fn(err))

options:

 - friendlyName - required
 - url - required
 - type - required (Default: 1)
 - subType - optional (required for port monitoring)
 - port - optional (required for port monitoring)
 - keywordType - optional (required for keyword monitoring)
 - keywordValue - optional (required for keyword monitoring)
 - httpUsername - optional
 - httpPassword - optional
 - alertContacts - optional (array of alert contact ids)
 - interval - optional (in minutes)

### cl.editMonitor(options, fn(err))

options:

 - monitorID - required
 - friendlyName - optional
 - url - optional
 - subType - optional (used only for port monitoring)
 - port - optional (used only for port monitoring)
 - keywordType - optional (used only for keyword monitoring)
 - keywordValue - optional (used only for keyword monitoring)
 - httpUsername - optional
 - httpPassword - optional
 - alertContacts - optional (array of alert contact ids)
 - interval - optional (in minutes)

### cl.deleteMonitor(id, fn(err))

options:

 - monitorID - required

### cl.resetMonitor(id, fn(err))

options:

 - monitorID - required


### cl.getAlertContacts(options, fn(err, alertContacts))

options:

 - alertContacts - optional (array of alert contact ids)
 - offset - optional (record to start paginating. Default: 0)
 - limit - optional (number of records to return. Default and max: 50)


### cl.getAllAlertContactIds(fn(err, alertContacts))

- alertContacts: array of all alert contact ids

## License

  MIT

---
_Source: https://npm.io/package/uptime-robot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
