TypePad/ExternalFeedSubscriptions.pm

filter: Statementstmt 27.8% 17 / 61 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 5 / 15 Podpod 80.0% 8 / 10 totaltotal 34.8% 30 / 86 CC 1 SCAR 5.1
CC
1
Cov
28%
external_feed_subscriptions
2.0
delete
2.0
get
2.0
CRAP 1.7
« TypePad/Applications.pm ↑ Summary TypePad/Relationships.pm »
1 package WWW::TypePad::ExternalFeedSubscriptions;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # Install an accessor into WWW::TypePad to access an instance of this class
7 # bound to the WWW::TypePad instance.
8 0 ▶sub WWW::TypePad::external_feed_subscriptions { __PACKAGE__->new( base => $_[0] ) }
Subroutine external_feed_subscriptions: not called CC=1 SCAR=6.9
Pod undocumented
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::ExternalFeedSubscriptions - ExternalFeedSubscriptions API methods
19  
20 =head1 METHODS
21  
22 =cut
23  
24 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 extends 'WWW::TypePad::Noun';
27  
28 1 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30  
31 =pod
32  
33 =over 4
34  
35  
36 =item delete
37  
38 my $res = $tp->external_feed_subscriptions->delete($id);
39  
40 Remove the selected subscription.
41  
42 Returns ExternalFeedSubscription which contains following properties.
43  
44 =over 8
45  
46 =item urlId
47  
48 (string) The canonical identifier that can be used to identify this object in URLs. This can be used to recognise where the same user is returned in response to different requests, and as a mapping key for an application's local data store.
49  
50 =item callbackUrl
51  
52 (string) The URL to which to send notifications of new items in this subscription's feeds.
53  
54 =item callbackStatus
55  
56 (string) The HTTP status code that was returned by the last call to the subscription's callback URL.
57  
58 =item filterRules
59  
60 (arrayE<lt>stringE<gt>) A list of rules for filtering notifications to this subscription. Each rule is a full-text search query string, like those used with the NE<lt>/assetsE<gt> endpoint. An item will be delivered to the ME<lt>callbackUrlE<gt> if it matches any one of these query strings.
61  
62 =item postAsUserId
63  
64 (arrayE<lt>stringE<gt>) For a Group-owned subscription, the urlId of the User who will own the items posted into the group by the subscription.
65  
66  
67 =back
68  
69 =cut
70  
71 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
Pod documented
72 0 my $api = shift;
73 0 my @args;
74 0 push @args, shift; # id
75 0 my $uri = sprintf '/external-feed-subscriptions/%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->external_feed_subscriptions->get($id);
87  
88 Get basic information about the selected subscription.
89  
90 Returns ExternalFeedSubscription which contains following properties.
91  
92 =over 8
93  
94 =item urlId
95  
96 (string) The canonical identifier that can be used to identify this object in URLs. This can be used to recognise where the same user is returned in response to different requests, and as a mapping key for an application's local data store.
97  
98 =item callbackUrl
99  
100 (string) The URL to which to send notifications of new items in this subscription's feeds.
101  
102 =item callbackStatus
103  
104 (string) The HTTP status code that was returned by the last call to the subscription's callback URL.
105  
106 =item filterRules
107  
108 (arrayE<lt>stringE<gt>) A list of rules for filtering notifications to this subscription. Each rule is a full-text search query string, like those used with the NE<lt>/assetsE<gt> endpoint. An item will be delivered to the ME<lt>callbackUrlE<gt> if it matches any one of these query strings.
109  
110 =item postAsUserId
111  
112 (arrayE<lt>stringE<gt>) For a Group-owned subscription, the urlId of the User who will own the items posted into the group by the subscription.
113  
114  
115 =back
116  
117 =cut
118  
119 0 ▶sub get {
Subroutine get: not called CC=1 SCAR=6.9
Pod documented
120 0 my $api = shift;
121 0 my @args;
122 0 push @args, shift; # id
123 0 my $uri = sprintf '/external-feed-subscriptions/%s.json', @args;
124 0 $api->base->call("GET", $uri, @_);
125 }
126  
127  
128 =pod
129  
130  
131  
132 =item add_feeds
133  
134 my $res = $tp->external_feed_subscriptions->add_feeds($id);
135  
136 Add one or more feed identifiers to the subscription.
137  
138 Returns hash reference which contains following properties.
139  
140 =over 8
141  
142  
143 =back
144  
145 =cut
146  
147 0 ▶sub add_feeds {
Subroutine add_feeds: not called CC=1 SCAR=6.9
Pod documented
148 0 my $api = shift;
149 0 my @args;
150 0 push @args, shift; # id
151 0 my $uri = sprintf '/external-feed-subscriptions/%s/add-feeds.json', @args;
152 0 $api->base->call("POST", $uri, @_);
153 }
154  
155  
156 =pod
157  
158  
159  
160 =item get_feeds
161  
162 my $res = $tp->external_feed_subscriptions->get_feeds($id);
163  
164 Get a list of strings containing the identifiers of the feeds to which this subscription is subscribed.
165  
166 Returns ListE<lt>stringE<gt> which contains following properties.
167  
168 =over 8
169  
170 =item totalResults
171  
172 (integer) The total number of items in the whole list of which this list object is a paginated view.
173  
174 =item entries
175  
176 (arrayE<lt>stringE<gt>) The items within the selected slice of the list.
177  
178  
179 =back
180  
181 =cut
182  
183 0 ▶sub get_feeds {
Subroutine get_feeds: not called CC=1 SCAR=6.9
Pod documented
184 0 my $api = shift;
185 0 my @args;
186 0 push @args, shift; # id
187 0 my $uri = sprintf '/external-feed-subscriptions/%s/feeds.json', @args;
188 0 $api->base->call("GET", $uri, @_);
189 }
190  
191  
192 0 ▶sub feeds {
Subroutine feeds: not called CC=1 SCAR=6.9
Pod undocumented
193 0 my $self = shift;
194 0 Carp::carp("'feeds' is deprecated. Use 'get_feeds' instead.");
195 0 $self->get_feeds(@_);
196 }
197  
198 =pod
199  
200  
201  
202 =item remove_feeds
203  
204 my $res = $tp->external_feed_subscriptions->remove_feeds($id);
205  
206 Remove one or more feed identifiers from the subscription.
207  
208 Returns hash reference which contains following properties.
209  
210 =over 8
211  
212  
213 =back
214  
215 =cut
216  
217 0 ▶sub remove_feeds {
Subroutine remove_feeds: not called CC=1 SCAR=6.9
Pod documented
218 0 my $api = shift;
219 0 my @args;
220 0 push @args, shift; # id
221 0 my $uri = sprintf '/external-feed-subscriptions/%s/remove-feeds.json', @args;
222 0 $api->base->call("POST", $uri, @_);
223 }
224  
225  
226 =pod
227  
228  
229  
230 =item update_filters
231  
232 my $res = $tp->external_feed_subscriptions->update_filters($id);
233  
234 Change the filtering rules for the subscription.
235  
236 Returns hash reference which contains following properties.
237  
238 =over 8
239  
240  
241 =back
242  
243 =cut
244  
245 0 ▶sub update_filters {
Subroutine update_filters: not called CC=1 SCAR=6.9
Pod documented
246 0 my $api = shift;
247 0 my @args;
248 0 push @args, shift; # id
249 0 my $uri = sprintf '/external-feed-subscriptions/%s/update-filters.json', @args;
250 0 $api->base->call("POST", $uri, @_);
251 }
252  
253  
254 =pod
255  
256  
257  
258 =item update_notification_settings
259  
260 my $res = $tp->external_feed_subscriptions->update_notification_settings($id);
261  
262 Change the callback URL and/or secret for the subscription.
263  
264 Returns hash reference which contains following properties.
265  
266 =over 8
267  
268  
269 =back
270  
271 =cut
272  
273 0 ▶sub update_notification_settings {
Subroutine update_notification_settings: not called CC=1 SCAR=6.9
Pod documented
274 0 my $api = shift;
275 0 my @args;
276 0 push @args, shift; # id
277 0 my $uri = sprintf '/external-feed-subscriptions/%s/update-notification-settings.json', @args;
278 0 $api->base->call("POST", $uri, @_);
279 }
280  
281  
282 =pod
283  
284  
285  
286 =item update_user
287  
288 my $res = $tp->external_feed_subscriptions->update_user($id);
289  
290 Change the "post as" user for a subscription owned by a group.
291  
292 Returns hash reference which contains following properties.
293  
294 =over 8
295  
296  
297 =back
298  
299 =cut
300  
301 0 ▶sub update_user {
Subroutine update_user: not called CC=1 SCAR=6.9
Pod documented
302 0 my $api = shift;
303 0 my @args;
304 0 push @args, shift; # id
305 0 my $uri = sprintf '/external-feed-subscriptions/%s/update-user.json', @args;
306 0 $api->base->call("POST", $uri, @_);
307 }
308  
309  
310 =pod
311  
312 =back
313  
314 =cut
315  
316 ### END auto-generated
317  
318 1 1;
« TypePad/Applications.pm ↑ Summary TypePad/Relationships.pm »