@statuscake/statuscake-js
TypeScript icon, indicating that this package has built-in type declarations

1.1.0-beta.1 • Public • Published

statuscake-js test

NOTE: This library is in alpha and not production ready. Whilst it can be used we will not offer support until it is generally available.

The JavaScript implementation of the StatusCake API client. Documentation for this library can be found here.

Prerequisites

You will need the following things properly installed on your computer.

Installation

With NPM, run the following command

npm install --save "@statuscake/statuscake-js"

to add the package to your package.json file.

Usage

Import the package from any JavaScript/TypeScript file, instantiate an API client and execute a request:

import 'isomorphic-fetch';
import {
  Configuration,
  UptimeApi,
} from '@statuscake/statuscake-js';

const config = new Configuration({
  headers: {
    'Authorization': `Bearer ${apiToken}`,
  },
});

const service = new UptimeApi(config);
service.listUptimeTests()
  .then((tests) => console.log(JSON.stringify(tests)))
  .catch(console.log);

License

This project is licensed under the MIT License.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @statuscake/statuscake-js

    Weekly Downloads

    71

    Version

    1.1.0-beta.1

    License

    MIT

    Unpacked Size

    680 kB

    Total Files

    168

    Last publish

    Collaborators

    • tomasbasham