Code Monkey home page Code Monkey logo

up-timer's Introduction

A JavaScript library for managing monitors via the Uptime Robot API. Written with Node.js version 8 for the current Uptime Robot APIv2.

Features

Current features include creating, retrieving, pausing, resuming, deleting and scheduling monitors.

Installation

npm install up-timer

Alternatively, you can clone or fork repo, npm install dependencies and npm test to run tests. An optional development server with cron capabilities can be run via npm start.

Example usage

Get an API key from Uptime Robot and either pass it to your instantiation function or store it as an environment variable named UPTIMER.

const Uptimer = require('up-timer');
const client = new Uptimer('myAPIkey'); // if UPTIMER env var exists, this function can be called without arguments

client.getMonitors(); // Get all your Uptime Robot monitors. 
client.listMonitors(); // Get all monitors and list by ID, name and status.
client.pauseAll(); // Pause monitors.
client.resumeAll(); // Resume monitors.
client.create('name', 'url', 'method'); // Create a monitor. Name is up to you. Url must be a valid url. Method can be 'http', 'https', 'keyword', 'ping' or 'port'.
client.pause('monitorId') // Pause a single monitor.
client.resume('monitorId') // Resume a single monitor.
client.delete('monitorId') // Delete a single monitor.

up-timer's People

Contributors

nsmeds avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.