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