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.
For documentation on the API, visit the SpamWatch documentation at https://docs.spamwat.ch/.
(async () => {
const client = new Client('APITOKEN');
console.log(await client.getBan(12345));
})();
const client = new Client('APITOKEN');
client.getBan(12345).then(ban => console.log).catch(console.err);