Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommentCheck ¶
CommentCheck submits the given comment to Akismet, and returns nil if the comment isn't spam; errSpam if it is; errInvalidRequest if the comment or configuration is incorrect; and errUnknown otherwise.
func CommentSubmitHam ¶
CommentSubmitHam submits the given comment to Akismet as Ham Returns nil if the submission was successful, or errUnknown otherwise.
func CommentSubmitSpam ¶
CommentSubmitSpam submits the given comment to Akismet as Spam Returns nil if the submission was successful, or errUnknown otherwise.
func UserAgentString ¶
UserAgentString constructs a user agent string suitable for use with akismet, based on their recommendations here. See 'Setting your user agent' for more information: http://akismet.com/development/api/#getting-started
Types ¶
type Comment ¶
type Comment struct { UserIP string UserAgent string Referrer string Permalink string Type string Author string AuthorEmail string AuthorURL string Content string }
Comment represents a single user comment to be checked and submitted with Akismet. The UserIP and UserAgent fields are the only two required fields, although for best results you should fill in as much of this info as possible. The fields are explained in more detail here: http://akismet.com/development/api/#comment-check
type Config ¶
Config is a struct containing akismet configuration unique to each application.
func (*Config) CommentCheckURL ¶
CommentCheckURL returns the akismet api's comment check URL
func (*Config) SubmitHamURL ¶
SubmitHamURL returns the akismet api's ham submission URL
func (*Config) SubmitSpamURL ¶
SubmitSpamURL returns the akismet api's spam submission URL
func (*Config) VerifyKeyURL ¶
VerifyKeyURL returns the akismet api's key verification URL