# spamwatch-js-fetch

> A version of the Spamwat.ch API that uses the Fetch API

Latest version **0.2.1** (published 2021-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install spamwatch-js-fetch
pnpm add spamwatch-js-fetch
yarn add spamwatch-js-fetch
bun add spamwatch-js-fetch
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2021-06-30 |
| First published | 2020-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 24.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | https://github.com/Crashdoom |
| Maintainers | crashdoom |
| Keywords | spamwatch, cloudflare-workers |

## Links

- npm: https://www.npmjs.com/package/spamwatch-js-fetch
- Repository: https://github.com/Crashdoom/spamwatch-js-fetch
- Issues: https://github.com/Crashdoom/spamwatch-js-fetch/issues
- npm.io page: https://npm.io/package/spamwatch-js-fetch

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2021-06-30
- 0.2.0 — 2020-10-16

## README

# SpamWatch API JavaScript Wrapper (fetch alternate)  

Alternative version of the official [SpamWatch JS API](https://github.com/SpamWatch/spamwatch-js) that uses the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) instead of axios for better compatibility with non-NodeJS clients.

This library has TypeScript types included, so you do not need to install types separately.

## API Documentation
For documentation on the API, visit the SpamWatch documentation at https://docs.spamwat.ch/.

## Example Usage
#### async / await
```
(async () => {
	const client = new Client('APITOKEN');
	console.log(await client.getBan(12345));
})();
```

#### Promise
```
const client = new Client('APITOKEN');
client.getBan(12345).then(ban => console.log).catch(console.err);
```

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