NAME

Whatbot::Database::Table::Karma - Database functionality for karma.

SYNOPSIS

# In whatbot
$self->model('Karma')->increment( 'whatbot, 'awesome_user' );

# Outside whatbot
use Whatbot::Database::Table::Karma;
my $model = Whatbot::Database::Table::Karma->new();
$model->increment( 'whatbot', 'awesome_user' );

DESCRIPTION

Whatbot::Database::Table::Karma provides database functionality for karma.

METHODS

decrement( $topic, $user )

Decrement the karma on a topic.

increment( $topic, $user )

Increment the karma on a topic.

get( $topic )

Retrieve the karma on a topic.

get_extended( $topic )

Retrieve extended info on a topic's karma. Returns a hashref containing 'Increments', which is the total volume of increments, 'Decrements', containing the total volume of decrements, and 'Last', which is an arrayref containing the last changing user and the amount of karma given.

LICENSE/COPYRIGHT

Be excellent to each other and party on, dudes.