spamwatch-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

SpamWatch API TypeScript Client

This is a TypeScript client for the SpamWatch API written using Deno and converted to a node-friendly version using deno2node. This is a heavily modified version of spamwatch-js-fetch which has full API support and supports both the Node and Deno ecosystems. Big thanks to Crashdoom for the original code.

Usage (Deno)

import { Client } from 'https://deno.land/x/spamwatch@1.0.0/src/index.ts'

const spamwatch = new Client(YOUR_TOKEN, 'https://api.spamwat.ch')
const version = await spamwatch.getVersion()
console.log(version)

Usage (Node)

npm install spamwatch-ts
const { Client } = require('spamwatch-ts')

(async () => {
	const spamwatch = new Client(YOUR_TOKEN, 'https://api.spamwat.ch')
	const version = await spamwatch.getVersion()
	console.log(version)
})()

Package Sidebar

Install

npm i spamwatch-ts

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

18 kB

Total Files

21

Last publish

Collaborators

  • watzon