package
module
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: May 24, 2020
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
spamcheck
spamcheck uses Postmark's spam API. The API is free to use. No API key is
required. For more information visit https://spamcheck.postmarkapp.com/.
package main
import (
"fmt"
"log"
"github.com/golevi/spamcheck"
)
const msg string = `hello i give you money`
func main() {
req := &spamcheck.Request{
Email: msg,
Options: spamcheck.Long,
// Options: spamcheck.Short,
}
resp, err := req.Process()
if err != nil {
log.Println(err)
}
fmt.Println(resp)
}
Documentation
¶
Options are either long or short
type Request struct {
Email string `json:"email"`
Options Options `json:"options"`
}
Request is the email and options
type Response struct {
Score string `json:"score"`
Report string `json:"report"`
Rules []rules `json:"rules"`
}
Response is what is received from the api
Source Files
¶
Click to show internal directories.
Click to hide internal directories.