NAME
WWW::StatusBadge::Service - Service agnostic Status Badge generator
VERSION
version 0.0.2
SYNOPSIS
use WWW::StatusBadge::Service;
my $service = WWW::StatusBadge::Service->new(
'txt' => 'Build Status',
'url' => 'https://travis-ci.org/ARivottiC/Sidekick-Accessor.pm',
'img' => 'https://travis-ci.org/ARivottiC/Sidekick-Accessor.pm.svg',
);
my $markdown = $service->markdown;
DESCRIPTION
Generates Status Badges in several formats.
ATTRIBUTES
txt
Returns the status text.
url
Returns the URL.
img
Returns the image URL.
METHODS
new
my $service = WWW::StatusBadge::Service->new(
'txt' => 'Build Status',
'url' => 'https://travis-ci.org/ARivottiC/Sidekick-Accessor.pm',
'img' => 'https://travis-ci.org/ARivottiC/Sidekick-Accessor.pm.svg',
);
- txt => $text
-
The status text. Required.
- url => $url
-
The project/distribution URL. Required.
- img => $img_url
-
The status image URL. Required.
PLUGINS
package WWW::StatusBadge::Render::Plugin::Markdown;
sub render {
my $self = shift;
return sprintf('[![%s](%s)](%s)', $self->txt, $self->url, $self->img,)
}
1;
SEE ALSO
AUTHOR
André Rivotti Casimiro <rivotti@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by André Rivotti Casimiro.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)