Brad Choate > Net-Defensio-0.02 > Net::Defensio

Download:
Net-Defensio-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Net::Defensio - Perl interface for Defensio.com antispam services.

VERSION ^

Version 0.01

DESCRIPTION ^

This module provides a simple interface for using the Defensio.com antispam service.

SYNOPSIS ^

    use Net::Defensio;
    my $defensio = Net::Defensio->new( api_key => '...' );
    my $response = $defensio->audit_comment(
        owner_url => 'http://example.com/',
        ...
    );
    if ($response && $response->success) {
        if ($response->spam) {
            print "Comment is spam: " . $response->spaminess . "\n";
        }
        else {
            print "Comment is ham!\n";
        }
    } else {
        print "Error with request: "
            . $response ? $response->message : $defensio->errstr;
    }

METHODS ^

Net::Defensio->new( %params )

Constructs a new Net::Defension instance. Acceptable parameters:

$defensio->validate_key( %params )

Issues a 'validate-key' API request. The parameters for this request are (all of these parameters are required for this request):

The response object returned will have these members assigned:

Returns a Net::Defensio::Response object. If successful, the response object's 'success' method will be true. Otherwise, you can check for the error message with the response object's 'message' method.

$defensio->announce_article( %params )

Issues an 'announce-article' API request. The parameters for this request are (all of these parameters are required for this request):

The response object returned will have these members assigned:

Notes: This request is important in the accuracy of the Defensio filtering engine. Defensio expects this request to be issued upon initial publication of an article. It should not be issued for private or otherwise unpublished articles. It should also not be re-issued with edits to the article.

$defensio->audit_comment( %params )

Issues an 'audit-comment' API request. The parameters for this request are:

The response object returned will have these members assigned:

$defensio->report_false_negatives( %params )

Issues an 'report-false-negatives' API request. The parameters for this request are:

The response object returned will have these members assigned:

$defensio->report_false_positives( %params )

Issues an 'report-false-positives' API request. The parameters for this request are:

The response object returned will have these members assigned:

$defensio->get_stats( %params )

Issues an 'get-stats' API request. The parameters for this request are:

The response object returned will have these members assigned:

COPYRIGHT & LICENSE ^

Copyright 2007 Brad Choate, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: