| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WWW::TypePad::Noun; |
|
2
|
1
|
|
|
1
|
|
350
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
29
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use Any::Moose; |
|
|
1
|
|
|
|
|
0
|
|
|
|
1
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
has 'base' => ( is => 'rw', isa => 'WWW::TypePad' ); |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub _endpoint { |
|
8
|
0
|
|
|
0
|
|
|
my $api = shift; |
|
9
|
0
|
|
|
|
|
|
my($object_id, $noun, $filter, $filter_arg) = @_; |
|
10
|
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
my $path = $api->prefix . "/$object_id"; |
|
12
|
0
|
0
|
|
|
|
|
$path .= "/$noun" if $noun; |
|
13
|
0
|
0
|
|
|
|
|
$path .= "/\@$filter" if $filter; |
|
14
|
0
|
0
|
|
|
|
|
$path .= "/$filter_arg" if $filter_arg; |
|
15
|
0
|
|
|
|
|
|
$path .= ".json"; |
|
16
|
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
return $path; |
|
18
|
|
|
|
|
|
|
} |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _get { |
|
21
|
0
|
|
|
0
|
|
|
my $api = shift; |
|
22
|
0
|
|
|
|
|
|
my($id, $noun, $filter, $filter_arg, @rest) = @_; |
|
23
|
0
|
|
|
|
|
|
my $path = $api->_endpoint($id, $noun, $filter, $filter_arg); |
|
24
|
0
|
|
|
|
|
|
return $api->base->call(GET => $path, @rest); |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub _post { |
|
28
|
0
|
|
|
0
|
|
|
my $api = shift; |
|
29
|
0
|
|
|
|
|
|
my($id, $noun, $filter, $filter_arg, @rest) = @_; |
|
30
|
0
|
|
|
|
|
|
my $path = $api->_endpoint($id, $noun, $filter, $filter_arg); |
|
31
|
0
|
|
|
|
|
|
return $api->base->call(POST => $path, @rest); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |