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