Skip to content

SpamWatch/spamwatch-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpamWatch API Go Wrapper

Go Reference GPLv3 license

spamwatch-go is official Go wrapper for SpamWatch API, which is fast, secure and requires no additional packages to be installed.


Features

  • Can use custom SpamWatch API endpoint with the help of ClientOpts.
  • It's in pure go, no need to install any kind of plugin or include any kind of additional files.
  • No third party library bloat; only uses standard library.
  • Type safe; no weird interface{} logic.

Getting started

You can easily download the library with the standard go get command:

go get github.com/SpamWatch/spamwatch-go

Full documentation of this API, can be found here.


Basic Usage

package main

import (
	"fmt"

	"github.com/SpamWatch/spamwatch-go"
)

var client = spamwatch.Client("API_KEY", nil)

func main() {
	ban, err := client.GetBan(777000)
	if err != nil {
		fmt.Println(err.Error())
		return
	}
	fmt.Println(ban)
}

Still need more examples? Take a look at the examples directory.

Ask your doubts at the support group.


License

GNU General Public License v3.0

The spamwatch-go project is under the GPL-3.0 license. You can find the license file here.