antispam-api

antispam API

This is a simple bare-bones API for the antispam project. It's written in Go and spits a simple daemon.

Running

Generate the daemon using make(1). There's a rule that'll fetch the latest data from the repository, crunch it as JSON and compile the daemon. Then you can just run:

$ antispam serve

It'll go live on port 8121. You can supply an alternative port passing a second argument like :3333. Serve it via a reverse proxy on your server and you're done.

A public instance is available at antiweb.eletrotupi.com.

Endpoints

The API will either returns 200 (OK) if the domain is on the list or 404 (Not Found) if not.

GET /domains - Spits the list of domains

GET /domains/:domain - Verify if the domain is on the list

GET /usernames - Return the list of usernames

GET /usernames/:username - Verify if the username is on the list

License

MIT License. Check COPYING


$ git clone https://git.eletrotupi.com/git/antispam-api