line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::TypePad::Object::Endpoint; |
2
|
1
|
|
|
1
|
|
1173
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
6
|
use WebService::TypePad::Util::Coerce; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
5
|
1
|
|
|
1
|
|
5
|
use base qw(WebService::TypePad::Object::Base); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13507
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub name { |
8
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
9
|
0
|
0
|
|
|
|
|
if (@_) { |
10
|
0
|
|
|
|
|
|
$self->{data}{name} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]); |
11
|
0
|
|
|
|
|
|
return $_[0]; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
else { |
14
|
0
|
|
|
|
|
|
return $self->{data}{name}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub supported_methods { |
19
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
20
|
0
|
0
|
|
|
|
|
if (@_) { |
21
|
0
|
|
|
|
|
|
$self->{data}{supportedMethods} = WebService::TypePad::Util::Coerce::coerce_map_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_string_in); |
22
|
0
|
|
|
|
|
|
return $_[0]; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
else { |
25
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_map_out($self->{data}{supportedMethods}); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub supported_query_arguments { |
30
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
31
|
0
|
0
|
|
|
|
|
if (@_) { |
32
|
0
|
|
|
|
|
|
$self->{data}{supportedQueryArguments} = WebService::TypePad::Util::Coerce::coerce_set_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_string_in); |
33
|
0
|
|
|
|
|
|
return $_[0]; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
else { |
36
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_set_out($self->{data}{supportedQueryArguments}); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub format_sensitive { |
41
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
42
|
0
|
0
|
|
|
|
|
if (@_) { |
43
|
0
|
|
|
|
|
|
$self->{data}{formatSensitive} = WebService::TypePad::Util::Coerce::coerce_boolean_in($_[0]); |
44
|
0
|
|
|
|
|
|
return $_[0]; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
else { |
47
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_boolean_out($self->{data}{formatSensitive}); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub property_endpoints { |
52
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
53
|
0
|
0
|
|
|
|
|
if (@_) { |
54
|
0
|
|
|
|
|
|
$self->{data}{propertyEndpoints} = WebService::TypePad::Util::Coerce::coerce_array_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_Endpoint_in); |
55
|
0
|
|
|
|
|
|
return $_[0]; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
else { |
58
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_array_out($self->{data}{propertyEndpoints}, \&WebService::TypePad::Util::Coerce::coerce_Endpoint_out); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub action_endpoints { |
63
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
64
|
0
|
0
|
|
|
|
|
if (@_) { |
65
|
0
|
|
|
|
|
|
$self->{data}{actionEndpoints} = WebService::TypePad::Util::Coerce::coerce_array_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_Endpoint_in); |
66
|
0
|
|
|
|
|
|
return $_[0]; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
else { |
69
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_array_out($self->{data}{actionEndpoints}, \&WebService::TypePad::Util::Coerce::coerce_Endpoint_out); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub can_have_id { |
74
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
75
|
0
|
0
|
|
|
|
|
if (@_) { |
76
|
0
|
|
|
|
|
|
$self->{data}{canHaveId} = WebService::TypePad::Util::Coerce::coerce_boolean_in($_[0]); |
77
|
0
|
|
|
|
|
|
return $_[0]; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
else { |
80
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_boolean_out($self->{data}{canHaveId}); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub can_omit_id { |
85
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
86
|
0
|
0
|
|
|
|
|
if (@_) { |
87
|
0
|
|
|
|
|
|
$self->{data}{canOmitId} = WebService::TypePad::Util::Coerce::coerce_boolean_in($_[0]); |
88
|
0
|
|
|
|
|
|
return $_[0]; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
else { |
91
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_boolean_out($self->{data}{canOmitId}); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub parameterized { |
96
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
97
|
0
|
0
|
|
|
|
|
if (@_) { |
98
|
0
|
|
|
|
|
|
$self->{data}{parameterized} = WebService::TypePad::Util::Coerce::coerce_boolean_in($_[0]); |
99
|
0
|
|
|
|
|
|
return $_[0]; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
else { |
102
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_boolean_out($self->{data}{parameterized}); |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub filter_endpoints { |
107
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
108
|
0
|
0
|
|
|
|
|
if (@_) { |
109
|
0
|
|
|
|
|
|
$self->{data}{filterEndpoints} = WebService::TypePad::Util::Coerce::coerce_array_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_Endpoint_in); |
110
|
0
|
|
|
|
|
|
return $_[0]; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
else { |
113
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_array_out($self->{data}{filterEndpoints}, \&WebService::TypePad::Util::Coerce::coerce_Endpoint_out); |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub resource_object_type { |
118
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
119
|
0
|
0
|
|
|
|
|
if (@_) { |
120
|
0
|
|
|
|
|
|
$self->{data}{resourceObjectType} = WebService::TypePad::Util::Coerce::coerce_ObjectType_in($_[0]); |
121
|
0
|
|
|
|
|
|
return $_[0]; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
else { |
124
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_ObjectType_out($self->{data}{resourceObjectType}); |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
sub post_object_type { |
129
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
130
|
0
|
0
|
|
|
|
|
if (@_) { |
131
|
0
|
|
|
|
|
|
$self->{data}{postObjectType} = WebService::TypePad::Util::Coerce::coerce_ObjectType_in($_[0]); |
132
|
0
|
|
|
|
|
|
return $_[0]; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
else { |
135
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_ObjectType_out($self->{data}{postObjectType}); |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
sub response_object_type { |
140
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
141
|
0
|
0
|
|
|
|
|
if (@_) { |
142
|
0
|
|
|
|
|
|
$self->{data}{responseObjectType} = WebService::TypePad::Util::Coerce::coerce_ObjectType_in($_[0]); |
143
|
0
|
|
|
|
|
|
return $_[0]; |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
else { |
146
|
0
|
|
|
|
|
|
return WebService::TypePad::Util::Coerce::coerce_ObjectType_out($self->{data}{responseObjectType}); |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
1; |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 NAME |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
WebService::TypePad::Object::Endpoint - Perl representation of TypePad's Endpoint object type |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head1 SYNOPSIS |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
use WebService::TypePad::Object::Endpoint; |
159
|
|
|
|
|
|
|
my $endpoint = WebService::TypePad::Object::Endpoint->new(); |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head1 DESCRIPTION |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
This is a Perl representation of TypePad's Endpoint object type. |
164
|
|
|
|
|
|
|
For more information about this type and its parameters, see L. |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=head1 PROPERTIES |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
Each of these properties has an accessor method which will retrieve the property's value when called with no arguments or set the property's value when called with one argument. |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head2 $endpoint->action_endpoints |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
For noun endpoints, an array of action endpoints that it supports. |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
Returns an array of L objects. |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head2 $endpoint->can_have_id |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
For noun endpoints, true if an id part is accepted, or false if the noun may only be used alone. |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Returns a single C value. |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head2 $endpoint->can_omit_id |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
For noun endpoints, true if the id part can be ommitted, or false if it is always required. |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
Returns a single C value. |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=head2 $endpoint->filter_endpoints |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
For endpoints that return lists, an array of filters that can be appended to the endpoint. |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
Returns an array of L objects. |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head2 $endpoint->format_sensitive |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
true if this requires expects a format suffix, or false otherwise. |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
Returns a single C value. |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=head2 $endpoint->name |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
The name of the noun, as it appears in URLs. |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
Returns a single C value. |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
=head2 $endpoint->parameterized |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
For filter endpoints, true if a parameter is required on the filter, or false if it's a boolean filter. |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
Returns a single C value. |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=head2 $endpoint->post_object_type |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
The type of object that this endpoint accepts for POST operations. |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
Returns a single L object. |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=head2 $endpoint->property_endpoints |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
For noun endpoints, an array of property endpoints that it supports. |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
Returns an array of L objects. |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=head2 $endpoint->resource_object_type |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
The type of object that this endpoint represents for GET, PUT and DELETE operations. This is not returned for action endpoints, since they do not represent resources. |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
Returns a single L object. |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=head2 $endpoint->response_object_type |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
For action endpoints, the type of object that this endpoint returns on success. If the endpoint returns no payload on success, this property is null. |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
Returns a single L object. |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
=head2 $endpoint->supported_methods |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
A mapping whose keys are the HTTP method that this endpoint accepts and whose values are docstrings describing the result of each method. |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
Returns a map of C values. |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
=head2 $endpoint->supported_query_arguments |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
The names of the query string arguments that this endpoint accepts. |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
Returns a set of C values. |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=head1 SEE ALSO |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=over 1 |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=item * L |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
=item * L |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
=back |