0.2.1 • Published 3 years ago

spamwatch-js-fetch v0.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

SpamWatch API JavaScript Wrapper (fetch alternate)

Alternative version of the official SpamWatch JS API that uses the 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);