line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::TypePad::Favorites; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# Install an accessor into WWW::TypePad to access an instance of this class |
7
|
|
|
|
|
|
|
# bound to the WWW::TypePad instance. |
8
|
0
|
|
|
0
|
0
|
|
sub WWW::TypePad::favorites { __PACKAGE__->new( base => $_[0] ) } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
### BEGIN auto-generated |
11
|
|
|
|
|
|
|
### This is an automatically generated code, do not edit! |
12
|
|
|
|
|
|
|
### Scroll down to look for END to add additional methods |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=pod |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
WWW::TypePad::Favorites - Favorites API methods |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 METHODS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
25
|
1
|
|
|
1
|
|
5
|
use Any::Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
10
|
|
26
|
|
|
|
|
|
|
extends 'WWW::TypePad::Noun'; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
1
|
|
945
|
use Carp (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
202
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=over 4 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item delete |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $res = $tp->favorites->delete($id); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Delete the selected favorite. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Returns Favorite which contains following properties. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=over 8 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item id |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
(string) A URI that serves as a globally unique identifier for the favorite. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item urlId |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
(string) A string containing the canonical identifier that can be used to identify this favorite in URLs. This can be used to recognise where the same favorite is returned in response to different requests, and as a mapping key for an application's local data store. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item author |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
(User) The user who saved this favorite. That is, this property is the user who saved the target asset as a favorite, not the creator of that asset. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item inReplyTo |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
(AssetRef) A reference to the target asset that has been marked as a favorite. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=item published |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
(datetime) The time that the favorite was created, as a W3CDTF timestamp. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=back |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub delete { |
72
|
0
|
|
|
0
|
1
|
|
my $api = shift; |
73
|
0
|
|
|
|
|
|
my @args; |
74
|
0
|
|
|
|
|
|
push @args, shift; # id |
75
|
0
|
|
|
|
|
|
my $uri = sprintf '/favorites/%s.json', @args; |
76
|
0
|
|
|
|
|
|
$api->base->call("DELETE", $uri, @_); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=pod |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item get |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
my $res = $tp->favorites->get($id); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Get basic information about the selected favorite, including its owner and the target asset. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Returns Favorite which contains following properties. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=over 8 |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item id |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
(string) A URI that serves as a globally unique identifier for the favorite. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item urlId |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
(string) A string containing the canonical identifier that can be used to identify this favorite in URLs. This can be used to recognise where the same favorite is returned in response to different requests, and as a mapping key for an application's local data store. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item author |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
(User) The user who saved this favorite. That is, this property is the user who saved the target asset as a favorite, not the creator of that asset. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item inReplyTo |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
(AssetRef) A reference to the target asset that has been marked as a favorite. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item published |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
(datetime) The time that the favorite was created, as a W3CDTF timestamp. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=back |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=cut |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
sub get { |
120
|
0
|
|
|
0
|
1
|
|
my $api = shift; |
121
|
0
|
|
|
|
|
|
my @args; |
122
|
0
|
|
|
|
|
|
push @args, shift; # id |
123
|
0
|
|
|
|
|
|
my $uri = sprintf '/favorites/%s.json', @args; |
124
|
0
|
|
|
|
|
|
$api->base->call("GET", $uri, @_); |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=pod |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=back |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=cut |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
### END auto-generated |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
1; |