Skip to content

soekarnohatta/go-spamwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpamWatch API Wrapper For Golang

Install from go get

$ go get -v github.com/soekarnohatta/go-spamwatch

Basic Usage

package main

import (
	"fmt"
	"github.com/soekarnohatta/go-spamwatch/spamwatch"
	"os"
	"strconv"
)

func main() {
	// Initialize token
	token := "PUT YOUR TOKEN HERE"

	// Initialize New Client
	client, _ := spamwatch.NewClient("", token)

	// Start requesting to the API
	bannedUser, _ := client.GetBan(123456789)
	if bannedUser != nil {
		fmt.Println("UserID:" + strconv.Itoa(bannedUser.Id))
		fmt.Println("Reason:" + bannedUser.Reason)
		fmt.Println("Message:" + bannedUser.Message)
	}
}

Releases

No releases published

Packages

No packages published

Languages