Tapper::Cmd::Notification
This project offers backend functions for all projects that manipulate notification subscriptions.
use Tapper::Cmd::Notification; my $subscription = Tapper::Cmd::Notification->new(); my $details = {event => "testrun_finished", filter => "testrun('id') == 23", comment => "Get back to work, testrun 23 is finished", persist => 0, owner_login => 'anton', }; my $id = $subscription->add($details); $details->{filter} = "testrun('id') == 24"; my $error = $subscription->update($id, $details); $error = $subscription->delete($id);
Tapper::Cmd::Notification - Backend functions for manipluation of notification subscriptions in the database
Make sure the user is given as user id.
@param hash ref - data for notification subscription
@param success - updated hash ref
@throws die
Add a new notification subscription. Expects all details as a hash reference.
@param hash ref - notification subscrition data
@return success - subscrition id @return error - undef
@throws Perl die
Return a DBIC resultset object that contains a list of notification subscriptions.
Update a given notification subscription. The given data has to be a complete hash of what the subscription should look like after the update.
@param int - subscription id @param hash ref - subscription as it should be
@return success - subscription id
Delete a notification subscription with given id. Its named del instead of delete to prevent confusion with the buildin delete function.
@param int - notification id
@return success - 0
AMD OSRC Tapper Team, <tapper at amd64.org>
<tapper at amd64.org>
Copyright 2012 AMD OSRC Tapper Team, all rights reserved.
This program is released under the following license: freebsd
AMD OSRC Tapper Team <tapper@amd64.org>
Tapper Team <tapper-ops@amazon.com>
This software is Copyright (c) 2016 by Advanced Micro Devices, Inc..
This is free software, licensed under:
The (two-clause) FreeBSD License
To install Tapper::Cmd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tapper::Cmd
CPAN shell
perl -MCPAN -e shell install Tapper::Cmd
For more information on module installation, please visit the detailed CPAN module installation guide.