forked from adtac/go-akismet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomment_submit.go
More file actions
21 lines (19 loc) · 880 Bytes
/
comment_submit.go
File metadata and controls
21 lines (19 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package akismet
// SubmitHam submits a false positive to Akismet using the API. False
// positives are those comments that should *not* be marked as spam, but were
// accidentally. This method is mandatorily required in all implementations.
// If the request went fine, a nil error is returned. Otherwise the returned
// error is non-nil.
func SubmitHam(c *Comment, key string) error {
_, err := postRequest(c, key, "submit-ham")
return err
}
// SubmitSpam submits a false negatives to Akismet using the API. False
// negatives are those comments that should be marked as spam, but were *not*
// accidentally. This method is mandatorily required in all implementations.
// If the request went fine, a nil error is returned. Otherwise the returned
// error is non-nil.
func SubmitSpam(c *Comment, key string) error {
_, err := postRequest(c, key, "submit-spam")
return err
}