| 1 | # -*- cperl; cperl-indent-level: 4 -*- | ||
| 2 | package WWW::NOS::Open::MediaResource 0.100; | ||
| 3 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 5 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 5 | ▶ | use 5.014000; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 5 | ▶ | use Moose qw/extends has/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 5 | ▶ | use namespace::autoclean '-also' => qr/^__/sxm; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 5 | extends 'WWW::NOS::Open::Resource'; | |
| 13 | |||
| 14 | 5 | has '_embedcode' => ( | |
| 15 | 'is' => 'ro', | ||
| 16 | 'isa' => 'Str', | ||
| 17 | 'reader' => 'get_embedcode', | ||
| 18 | 'init_arg' => 'embedcode', | ||
| 19 | ); | ||
| 20 | |||
| 21 | 5 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | |||
| 23 | ## no critic qw(RequireExplicitInclusion) | ||
| 24 | 5 | __PACKAGE__->meta->make_immutable; | |
| 25 | ## use critic | ||
| 26 | |||
| 27 | 5 | 1; | |
| 28 | |||
| 29 | __END__ | ||
| 30 | |||
| 31 | =encoding utf8 | ||
| 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.100. | ||
| 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 | ||