Akismet

A client to the Akismet service http://akismet.com/. This class requires that you already have your own WordPress API Key.

Sample Usage

Using Akismet is very easy. The only tricky part is that you need to supply a generic delegate (Converter<TINput, Comment>) to convert whatever class represents a comment in your application to a Subkismet Comment instance.

YourCommentType  someComment = GetCommentFromUI(); //Making this method up.
Converter<YourCommentType, Comment> commentConverter = delegate(YourCommentType original) 
    { 
      return new Comment(original.IpAddress, original.AuthorUserAgent); 
    }
Akismet<YourCommentType > akismet = new Akismet<YourCommentType >("my-api-key", "http://myblogroot.example.com/", commentConverter);
akismet.SubmitSpam(original);

Last edited Jun 12, 2007 at 4:35 AM by Haacked, version 5

Comments

No comments yet.