Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-11-22 12:25:01 +00:00
parent c2fb06ae73
commit ed691ec515
38 changed files with 806 additions and 806 deletions

View File

@@ -26,15 +26,15 @@ func (t *SpamService) Classify(request *ClassifyRequest) (*ClassifyResponse, err
type ClassifyRequest struct {
// The raw body of the email including headers etc per RFC 822. Alternatively, use the other parameters to correctly format the message
EmailBody string `json:"emailBody"`
EmailBody string `json:"email_body"`
// The email address it has been sent from
From string `json:"from"`
// the HTML version of the email body
HtmlBody string `json:"htmlBody"`
HtmlBody string `json:"html_body"`
// The subject of the email
Subject string `json:"subject"`
// the plain text version of the email body
TextBody string `json:"textBody"`
TextBody string `json:"text_body"`
// The email address it is being sent to
To string `json:"to"`
}
@@ -43,7 +43,7 @@ type ClassifyResponse struct {
// The rules that have contributed to this score
Details []string `json:"details"`
// Is it spam? Returns true if its score is > 5
IsSpam bool `json:"isSpam"`
IsSpam bool `json:"is_spam"`
// The score evaluated for this email. A higher number means it is more likely to be spam
Score float64 `json:"score"`
}