File Coverage

blib/lib/WWW/NOS/Open/MediaResource.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 27 27 100.0


line stmt bran cond sub pod time code
1             # -*- cperl; cperl-indent-level: 4 -*-
2             package WWW::NOS::Open::MediaResource 0.101;
3 5     5   2311 use strict;
  5         10  
  5         125  
4 5     5   21 use warnings;
  5         11  
  5         105  
5              
6 5     5   20 use utf8;
  5         11  
  5         23  
7 5     5   147 use 5.014000;
  5         15  
8              
9 5     5   28 use Moose qw/extends has/;
  5         14  
  5         44  
10 5     5   23418 use namespace::autoclean '-also' => qr/^__/sxm;
  5         12  
  5         45  
11              
12             extends 'WWW::NOS::Open::Resource';
13              
14             has '_embedcode' => (
15             'is' => 'ro',
16             'isa' => 'Str',
17             'reader' => 'get_embedcode',
18             'init_arg' => 'embedcode',
19             );
20              
21 5     5   482 no Moose;
  5         14  
  5         21  
22              
23             __PACKAGE__->meta->make_immutable;
24              
25             1;
26              
27             __END__
28              
29             =encoding utf8
30              
31             =for stopwords DateTime URI Ipenburg MERCHANTABILITY
32              
33             =head1 NAME
34              
35             WWW::NOS::Open::MediaResource - client side media resource.
36              
37             =head1 VERSION
38              
39             This document describes WWW::NOS::Open::MediaResource version 0.101.
40              
41             =head1 SYNOPSIS
42              
43             use Moose qw/extends/;
44             extends 'WWW::NOS::Open::MediaResource';
45              
46             =head1 DESCRIPTION
47              
48             This class represents a media resource as returned in the latest ten videos or
49             audio fragments list. It is the base class for the
50             L<WWW::NOS::Open::Video|WWW::NOS::Open::Video> and
51             L<WWW::NOS::Open::AudioFragment|WWW::NOS::Open::AudioFragment> classes, and an
52             extension of the L<WWW::NOS::Open::Resource|WWW::NOS::Open::Resource> class.
53              
54             =head1 SUBROUTINES/METHODS
55              
56             =head2 C<new>
57              
58             Create a new media resource object.
59              
60             =over
61              
62             =item 1. A hash containing the properties and their values.
63              
64             =back
65              
66             =head2 C<get_id>
67              
68             Returns the id of the media resource as integer.
69              
70             =head2 C<get_title>
71              
72             Returns the title of the media resource as string.
73              
74             =head2 C<get_description>
75              
76             Returns the description of the media resource as string.
77              
78             =head2 C<get_published>
79              
80             Returns the publishing date of the media resource as a L<DateTime|DateTime>
81             object.
82              
83             =head2 C<get_last_update>
84              
85             Returns the date of the last update for the media resource as a
86             L<DateTime|DateTime> object.
87              
88             =head2 C<get_thumbnail_xs>
89              
90             Returns the URL of the extra small thumbnail for the media resource as an
91             L<URI|URI> object.
92              
93             =head2 C<get_thumbnail_s>
94              
95             Returns the URL of the small thumbnail for the media resource as an L<URI|URI>
96             object.
97              
98             =head2 C<get_thumbnail_m>
99              
100             Returns the URL of the medium sized thumbnail for the media resource as an
101             L<URI|URI> object.
102              
103             =head2 C<get_link>
104              
105             Returns the URL of the main media resource as an L<URI|URI> object.
106              
107             =head2 C<get_embed_code>
108              
109             Returns the HTML code to embed the media resource in an HTML page.
110              
111             =head2 C<get_keywords>
112              
113             Returns the list of keywords for the media resource as a reference to an array
114             of strings.
115              
116             =head1 CONFIGURATION AND ENVIRONMENT
117              
118             =head1 DEPENDENCIES
119              
120             =over 4
121              
122             =item * L<Moose|Moose>
123              
124             =item * L<WWW::NOS::Open::Resource|WWW::NOS::Open::Resource>
125              
126             =item * L<namespace::autoclean|namespace::autoclean>
127              
128             =back
129              
130             =head1 INCOMPATIBILITIES
131              
132             =head1 DIAGNOSTICS
133              
134             =head1 BUGS AND LIMITATIONS
135              
136             Please report any bugs or feature requests at
137             L<RT for rt.cpan.org|https://rt.cpan.org/Dist/Display.html?Queue=WWW-NOS-Open>.
138              
139             =head1 AUTHOR
140              
141             Roland van Ipenburg, E<lt>ipenburg@xs4all.nlE<gt>
142              
143             =head1 LICENSE AND COPYRIGHT
144              
145             Copyright 2012 by Roland van Ipenburg
146              
147             This library is free software; you can redistribute it and/or modify
148             it under the same terms as Perl itself, either Perl version 5.14.0 or,
149             at your option, any later version of Perl 5 you may have available.
150              
151             =head1 DISCLAIMER OF WARRANTY
152              
153             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
154             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
155             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
156             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
157             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
158             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
159             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
160             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
161             NECESSARY SERVICING, REPAIR, OR CORRECTION.
162              
163             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
164             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
165             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
166             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
167             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
168             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
169             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
170             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
171             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
172             SUCH DAMAGES.
173              
174             =cut