line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::PMP::Profile::Story; |
2
|
1
|
|
|
1
|
|
1125
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
3
|
|
|
|
|
|
|
extends 'Net::PMP::Profile'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.102'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has 'teaser' => ( is => 'rw', isa => 'Str', ); |
8
|
|
|
|
|
|
|
has 'contentencoded' => ( is => 'rw', isa => 'Str', ); |
9
|
|
|
|
|
|
|
has 'contenttemplated' => ( is => 'rw', isa => 'Str', ); |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
1
|
|
sub get_profile_url {'https://api.pmp.io/profiles/story'} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
1; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
__END__ |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 NAME |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Net::PMP::Profile::Story - Story Profile for PMP CollectionDoc |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 SYNOPSIS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
use Net::PMP; |
26
|
|
|
|
|
|
|
use Net::PMP::Profile::Story; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my $story = Net::PMP::Profile::Story->new( |
29
|
|
|
|
|
|
|
title => 'I am A Title', |
30
|
|
|
|
|
|
|
published => '2013-12-03T12:34:56.789Z', |
31
|
|
|
|
|
|
|
valid => { |
32
|
|
|
|
|
|
|
from => "2013-04-11T13:21:31.598Z", |
33
|
|
|
|
|
|
|
to => "3013-04-11T13:21:31.598Z", |
34
|
|
|
|
|
|
|
}, |
35
|
|
|
|
|
|
|
byline => 'By: John Writer and Nancy Author', |
36
|
|
|
|
|
|
|
description => 'This is a summary of the document.', |
37
|
|
|
|
|
|
|
tags => [qw( foo bar baz )], |
38
|
|
|
|
|
|
|
teaser => 'important story to read here!', |
39
|
|
|
|
|
|
|
contentencoded => $html, |
40
|
|
|
|
|
|
|
contenttemplated => $templated_html, |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# instantiate a client |
44
|
|
|
|
|
|
|
my $client = Net::PMP->client( |
45
|
|
|
|
|
|
|
host => $host, |
46
|
|
|
|
|
|
|
id => $client_id, |
47
|
|
|
|
|
|
|
secret => $client_secret, |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# save doc |
51
|
|
|
|
|
|
|
$client->save($story); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 DESCRIPTION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Net::PMP::Profile::Story implements the CollectionDoc fields for the PMP Story Profile |
58
|
|
|
|
|
|
|
L<https://github.com/publicmediaplatform/pmpdocs/wiki/Story-Profile>. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 METHODS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This class extends L<Net::PMP::Profile>. Only new or overridden methods are documented here. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 teaser |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Optional brief summary. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 contentencoded |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Optional full HTML-encoded string. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 contenttemplated |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Optional content with placeholders for rich media assets. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 get_profile_url |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Returns a string for the PMP profile's URL. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Peter Karman, C<< <karman at cpan.org> >> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 BUGS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Please report any bugs or feature requests to C<bug-net-pmp at rt.cpan.org>, or through |
87
|
|
|
|
|
|
|
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-PMP-Profile>. I will be notified, and then you'll |
88
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 SUPPORT |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
perldoc Net::PMP |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
You can also look for information at: |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=over 4 |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item IRC |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Join #pmp on L<http://freenode.net>. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item RT: CPAN's request tracker (report bugs here) |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-PMP-Profile> |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item AnnoCPAN: Annotated CPAN documentation |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Net-PMP-Profile> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item CPAN Ratings |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Net-PMP-Profile> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item Search CPAN |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Net-PMP-Profile/> |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=back |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
American Public Media and the Public Media Platform sponsored the development of this module. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Copyright 2013 American Public Media Group |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
See the LICENSE file that accompanies this module. |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=cut |