https://github.com/statuscakedev/statuscake-js
StatusCake JavaScript SDK (Alpha)
https://github.com/statuscakedev/statuscake-js
api-client statuscake
Last synced: about 2 months ago
JSON representation
StatusCake JavaScript SDK (Alpha)
- Host: GitHub
- URL: https://github.com/statuscakedev/statuscake-js
- Owner: StatusCakeDev
- License: mit
- Created: 2022-01-26T23:40:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-23T22:56:27.000Z (over 2 years ago)
- Last Synced: 2024-04-24T08:31:06.438Z (about 2 years ago)
- Topics: api-client, statuscake
- Language: TypeScript
- Homepage: https://developers.statuscake.com
- Size: 124 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# statuscake-js 
**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](https://www.statuscake.com/api/v1) client. Documentation for this library
can be found [here](https://www.statuscake.com/api/v1).
## Prerequisites
You will need the following things properly installed on your computer:
- [Node.js](https://nodejs.org/en/): any one of the **three latest major**
[releases](https://nodejs.org/en/)
## Installation
With [NPM](https://www.npmjs.com/), run the following command
```bash
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:
```javascript
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](LICENSE).