TypePad/Blogs.pm

filter: Statementstmt 8.5% 17 / 200 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 10.4% 5 / 48 Podpod 60.4% 26 / 43 totaltotal 16.4% 48 / 291 CC 1 SCAR 6.4
CC
1
Cov
8%
blogs
2.0
get
2.0
add_category
2.0
CRAP 1.9
« TypePad/Users.pm ↑ Summary TypePad/Groups.pm »
1 package WWW::TypePad::Blogs;
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::blogs { __PACKAGE__->new( base => $_[0] ) }
Subroutine blogs: 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::Blogs - Blogs 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 get
37  
38 my $res = $tp->blogs->get($id);
39  
40 Get basic information about the selected blog.
41  
42 Returns Blog 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 object.
49  
50 =item urlId
51  
52 (string) A string containing 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.
53  
54 =item title
55  
56 (string) The title of the blog.
57  
58 =item homeUrl
59  
60 (string) The URL of the blog's home page.
61  
62 =item owner
63  
64 (User) The user who owns the blog.
65  
66 =item description
67  
68 (string) The description of the blog as provided by its owner.
69  
70 =item objectTypes
71  
72 (setE<lt>stringE<gt>) BE<lt>DeprecatedE<gt> An array of object type identifier URIs. This set will contain the string CE<lt>tag:api.typepad.com,2009:BlogE<gt> for a Blog object.
73  
74 =item objectType
75  
76 (string) The keyword identifying the type of object this is. For a Blog object, ME<lt>objectTypeE<gt> will be CE<lt>BlogE<gt>.
77  
78  
79 =back
80  
81 =cut
82  
83 0 ▶sub get {
Subroutine get: not called CC=1 SCAR=6.9
Pod documented
84 0 my $api = shift;
85 0 my @args;
86 0 push @args, shift; # id
87 0 my $uri = sprintf '/blogs/%s.json', @args;
88 0 $api->base->call("GET", $uri, @_);
89 }
90  
91  
92 =pod
93  
94  
95  
96 =item add_category
97  
98 my $res = $tp->blogs->add_category($id);
99  
100 Send label argument to remove a category from the blog
101  
102 Returns hash reference which contains following properties.
103  
104 =over 8
105  
106  
107 =back
108  
109 =cut
110  
111 0 ▶sub add_category {
Subroutine add_category: not called CC=1 SCAR=6.9
Pod documented
112 0 my $api = shift;
113 0 my @args;
114 0 push @args, shift; # id
115 0 my $uri = sprintf '/blogs/%s/add-category.json', @args;
116 0 $api->base->call("POST", $uri, @_);
117 }
118  
119  
120 =pod
121  
122  
123  
124 =item begin_import
125  
126 my $res = $tp->blogs->begin_import($id);
127  
128 Begin an import into the selected blog.
129  
130 Returns hash reference which contains following properties.
131  
132 =over 8
133  
134 =item job
135  
136 (ImporterJob) The OE<lt>ImporterJobE<gt> object representing the job that was created.
137  
138  
139 =back
140  
141 =cut
142  
143 0 ▶sub begin_import {
Subroutine begin_import: not called CC=1 SCAR=6.9
Pod documented
144 0 my $api = shift;
145 0 my @args;
146 0 push @args, shift; # id
147 0 my $uri = sprintf '/blogs/%s/begin-import.json', @args;
148 0 $api->base->call("POST", $uri, @_);
149 }
150  
151  
152 =pod
153  
154  
155  
156 =item build_embed_code_for_urls
157  
158 my $res = $tp->blogs->build_embed_code_for_urls($id);
159  
160 Given an array of absolute URLs, will try to return a block of HTML that embeds the content represented by those URLs as sensibly as possible.
161  
162 Returns hash reference which contains following properties.
163  
164 =over 8
165  
166 =item embedCode
167  
168 (string) An HTML fragment that embeds the provided URLs. This string may contain untrustworthy HTML, so to avoid XSS vulnerabilities this should not be displayed in a sensitive context without sanitization.
169  
170  
171 =back
172  
173 =cut
174  
175 0 ▶sub build_embed_code_for_urls {
Subroutine build_embed_code_for_urls: not called CC=1 SCAR=6.9
Pod documented
176 0 my $api = shift;
177 0 my @args;
178 0 push @args, shift; # id
179 0 my $uri = sprintf '/blogs/%s/build-embed-code-for-urls.json', @args;
180 0 $api->base->call("POST", $uri, @_);
181 }
182  
183  
184 =pod
185  
186  
187  
188 =item get_categories
189  
190 my $res = $tp->blogs->get_categories($id);
191  
192 Get a list of categories which are defined for the selected blog.
193  
194 Returns ListE<lt>stringE<gt> which contains following properties.
195  
196 =over 8
197  
198 =item totalResults
199  
200 (integer) The total number of items in the whole list of which this list object is a paginated view.
201  
202 =item entries
203  
204 (arrayE<lt>stringE<gt>) The items within the selected slice of the list.
205  
206  
207 =back
208  
209 =cut
210  
211 0 ▶sub get_categories {
Subroutine get_categories: not called CC=1 SCAR=6.9
Pod documented
212 0 my $api = shift;
213 0 my @args;
214 0 push @args, shift; # id
215 0 my $uri = sprintf '/blogs/%s/categories.json', @args;
216 0 $api->base->call("GET", $uri, @_);
217 }
218  
219  
220 0 ▶sub categories {
Subroutine categories: not called CC=1 SCAR=6.9
Pod documented
221 0 my $self = shift;
222 0 Carp::carp("'categories' is deprecated. Use 'get_categories' instead.");
223 0 $self->get_categories(@_);
224 }
225  
226 =pod
227  
228  
229  
230 =item get_commenting_settings
231  
232 my $res = $tp->blogs->get_commenting_settings($id);
233  
234 Get the commenting-related settings for this blog.
235  
236 Returns BlogCommentingSettings which contains following properties.
237  
238 =over 8
239  
240 =item signinAllowed
241  
242 (boolean) CE<lt>trueE<gt> if this blog allows users to sign in to comment, or CE<lt>falseE<gt> if all new comments are anonymous.
243  
244 =item signinRequired
245  
246 (boolean) CE<lt>trueE<gt> if this blog requires users to be logged in in order to leave a comment, or CE<lt>falseE<gt> if anonymous comments will be rejected.
247  
248 =item emailAddressRequired
249  
250 (boolean) CE<lt>trueE<gt> if this blog requires anonymous comments to be submitted with an email address, or CE<lt>falseE<gt> otherwise.
251  
252 =item captchaRequired
253  
254 (boolean) CE<lt>trueE<gt> if this blog requires anonymous commenters to pass a CAPTCHA before submitting a comment, or CE<lt>falseE<gt> otherwise.
255  
256 =item moderationEnabled
257  
258 (boolean) CE<lt>trueE<gt> if this blog places new comments into a moderation queue for approval before they are displayed, or CE<lt>falseE<gt> if new comments may be available immediately.
259  
260 =item timeLimit
261  
262 (integer) Number of days after a post is published that comments will be allowed. If the blog has no time limit for comments, this property will be omitted.
263  
264 =item htmlAllowed
265  
266 (boolean) CE<lt>trueE<gt> if this blog allows commenters to use basic HTML formatting in comments, or CE<lt>falseE<gt> if HTML will be removed.
267  
268 =item urlsAutoLinked
269  
270 (boolean) CE<lt>trueE<gt> if comments in this blog will automatically have any bare URLs turned into links, or CE<lt>falseE<gt> if URLs will be shown unlinked.
271  
272  
273 =back
274  
275 =cut
276  
277 0 ▶sub get_commenting_settings {
Subroutine get_commenting_settings: not called CC=1 SCAR=6.9
Pod documented
278 0 my $api = shift;
279 0 my @args;
280 0 push @args, shift; # id
281 0 my $uri = sprintf '/blogs/%s/commenting-settings.json', @args;
282 0 $api->base->call("GET", $uri, @_);
283 }
284  
285  
286 0 ▶sub commenting_settings {
Subroutine commenting_settings: not called CC=1 SCAR=6.9
Pod undocumented
287 0 my $self = shift;
288 0 Carp::carp("'commenting_settings' is deprecated. Use 'get_commenting_settings' instead.");
289 0 $self->get_commenting_settings(@_);
290 }
291  
292 =pod
293  
294  
295  
296 =item get_published_comments
297  
298 my $res = $tp->blogs->get_published_comments($id);
299  
300 Return a pageable list of published comments associated with the selected blog
301  
302 Returns ListE<lt>CommentE<gt> which contains following properties.
303  
304 =over 8
305  
306 =item totalResults
307  
308 (integer) The total number of items in the whole list of which this list object is a paginated view.
309  
310 =item entries
311  
312 (arrayE<lt>CommentE<gt>) The items within the selected slice of the list.
313  
314  
315 =back
316  
317 =cut
318  
319 0 ▶sub get_published_comments {
Subroutine get_published_comments: not called CC=1 SCAR=6.9
Pod documented
320 0 my $api = shift;
321 0 my @args;
322 0 push @args, shift; # id
323 0 my $uri = sprintf '/blogs/%s/comments/@published.json', @args;
324 0 $api->base->call("GET", $uri, @_);
325 }
326  
327  
328 0 ▶sub published_comments {
Subroutine published_comments: not called CC=1 SCAR=6.9
Pod undocumented
329 0 my $self = shift;
330 0 Carp::carp("'published_comments' is deprecated. Use 'get_published_comments' instead.");
331 0 $self->get_published_comments(@_);
332 }
333  
334 =pod
335  
336  
337  
338 =item get_published_recent_comments
339  
340 my $res = $tp->blogs->get_published_recent_comments($id);
341  
342 Return the fifty most recent published comments associated with the selected blog
343  
344 Returns ListE<lt>CommentE<gt> which contains following properties.
345  
346 =over 8
347  
348 =item totalResults
349  
350 (integer) The total number of items in the whole list of which this list object is a paginated view.
351  
352 =item entries
353  
354 (arrayE<lt>CommentE<gt>) The items within the selected slice of the list.
355  
356  
357 =back
358  
359 =cut
360  
361 0 ▶sub get_published_recent_comments {
Subroutine get_published_recent_comments: not called CC=1 SCAR=6.9
Pod documented
362 0 my $api = shift;
363 0 my @args;
364 0 push @args, shift; # id
365 0 my $uri = sprintf '/blogs/%s/comments/@published/@recent.json', @args;
366 0 $api->base->call("GET", $uri, @_);
367 }
368  
369  
370 0 ▶sub published_recent_comments {
Subroutine published_recent_comments: not called CC=1 SCAR=6.9
Pod undocumented
371 0 my $self = shift;
372 0 Carp::carp("'published_recent_comments' is deprecated. Use 'get_published_recent_comments' instead.");
373 0 $self->get_published_recent_comments(@_);
374 }
375  
376 =pod
377  
378  
379  
380 =item get_crosspost_accounts
381  
382 my $res = $tp->blogs->get_crosspost_accounts($id);
383  
384 Get a list of accounts that can be used for crossposting with this blog.
385  
386 Returns ListE<lt>AccountE<gt> which contains following properties.
387  
388 =over 8
389  
390 =item totalResults
391  
392 (integer) The total number of items in the whole list of which this list object is a paginated view.
393  
394 =item entries
395  
396 (arrayE<lt>AccountE<gt>) The items within the selected slice of the list.
397  
398  
399 =back
400  
401 =cut
402  
403 0 ▶sub get_crosspost_accounts {
Subroutine get_crosspost_accounts: not called CC=1 SCAR=6.9
Pod documented
404 0 my $api = shift;
405 0 my @args;
406 0 push @args, shift; # id
407 0 my $uri = sprintf '/blogs/%s/crosspost-accounts.json', @args;
408 0 $api->base->call("GET", $uri, @_);
409 }
410  
411  
412 0 ▶sub crosspost_accounts {
Subroutine crosspost_accounts: not called CC=1 SCAR=6.9
Pod undocumented
413 0 my $self = shift;
414 0 Carp::carp("'crosspost_accounts' is deprecated. Use 'get_crosspost_accounts' instead.");
415 0 $self->get_crosspost_accounts(@_);
416 }
417  
418 =pod
419  
420  
421  
422 =item discover_external_post_asset
423  
424 my $res = $tp->blogs->discover_external_post_asset($id);
425  
426 If the selected blog is a connected blog, create or retrieve the external post stub for the given permalink.
427  
428 Returns hash reference which contains following properties.
429  
430 =over 8
431  
432 =item asset
433  
434 (Asset) The asset that acts as a stub for the given permalink.
435  
436  
437 =back
438  
439 =cut
440  
441 0 ▶sub discover_external_post_asset {
Subroutine discover_external_post_asset: not called CC=1 SCAR=6.9
Pod documented
442 0 my $api = shift;
443 0 my @args;
444 0 push @args, shift; # id
445 0 my $uri = sprintf '/blogs/%s/discover-external-post-asset.json', @args;
446 0 $api->base->call("POST", $uri, @_);
447 }
448  
449  
450 =pod
451  
452  
453  
454 =item post_to_media_assets
455  
456 my $res = $tp->blogs->post_to_media_assets($id);
457  
458 Add a new media asset to the account that owns this blog.
459  
460 Returns Asset which contains following properties.
461  
462 =over 8
463  
464 =item id
465  
466 (string) BE<lt>Read OnlyE<gt> A URI that serves as a globally unique identifier for the user.
467  
468 =item urlId
469  
470 (string) BE<lt>Read OnlyE<gt> A string containing 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.
471  
472 =item permalinkUrl
473  
474 (string) BE<lt>Read OnlyE<gt> The URL that is this asset's permalink. This will be omitted if the asset does not have a permalink of its own (for example, if it's embedded in another asset) or if TypePad does not know its permalink.
475  
476 =item shortUrl
477  
478 (string) BE<lt>Read OnlyE<gt> The short version of the URL that is this asset's permalink. This is currently available only for OE<lt>PostE<gt> assetes.
479  
480 =item author
481  
482 (User) BE<lt>Read OnlyE<gt> The user who created the selected asset.
483  
484 =item published
485  
486 (datetime) BE<lt>Read OnlyE<gt> The time at which the asset was created, as a W3CDTF timestamp.
487  
488 =item content
489  
490 (string) The raw asset content. The ME<lt>textFormatE<gt> property describes how to format this data. Use this property to set the asset content in write operations. An asset posted in a group may have a ME<lt>contentE<gt> value up to 10,000 bytes long, while a OE<lt>PostE<gt> asset in a blog may have up to 65,000 bytes of content.
491  
492 =item renderedContent
493  
494 (string) BE<lt>Read OnlyE<gt> The content of this asset rendered to HTML. This is currently available only for OE<lt>PostE<gt> and OE<lt>PageE<gt> assets.
495  
496 =item excerpt
497  
498 (string) BE<lt>Read OnlyE<gt> A short, plain-text excerpt of the entry content. This is currently available only for OE<lt>PostE<gt> assets.
499  
500 =item textFormat
501  
502 (string) A keyword that indicates what formatting mode to use for the content of this asset. This can be CE<lt>htmlE<gt> for assets the content of which is HTML, CE<lt>html_convert_linebreaksE<gt> for assets the content of which is HTML but where paragraph tags should be added automatically, or CE<lt>markdownE<gt> for assets the content of which is Markdown source. Other formatting modes may be added in future. Applications that present assets for editing should use this property to present an appropriate editor.
503  
504 =item groups
505  
506 (arrayE<lt>stringE<gt>) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> An array of strings containing the ME<lt>idE<gt> URI of the OE<lt>GroupE<gt> object that this asset is mapped into, if any. This property has been superseded by the ME<lt>containerE<gt> property.
507  
508 =item source
509  
510 (AssetSource) BE<lt>Read OnlyE<gt> An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.
511  
512 =item objectTypes
513  
514 (setE<lt>stringE<gt>) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> An array of object type identifier URIs identifying the type of this asset. Only the one object type URI for the particular type of asset this asset is will be present.
515  
516 =item objectType
517  
518 (string) BE<lt>Read OnlyE<gt> The keyword identifying the type of asset this is.
519  
520 =item isFavoriteForCurrentUser
521  
522 (boolean) BE<lt>Read OnlyE<gt> CE<lt>trueE<gt> if this asset is a favorite for the currently authenticated user, or CE<lt>falseE<gt> otherwise. This property is omitted from responses to anonymous requests.
523  
524 =item favoriteCount
525  
526 (integer) BE<lt>Read OnlyE<gt> The number of distinct users who have added this asset as a favorite.
527  
528 =item commentCount
529  
530 (integer) BE<lt>Read OnlyE<gt> The number of comments that have been posted in reply to this asset. This number includes comments that have been posted in response to other comments.
531  
532 =item title
533  
534 (string) The title of the asset.
535  
536 =item description
537  
538 (string) The description of the asset.
539  
540 =item container
541  
542 (ContainerRef) BE<lt>Read OnlyE<gt> An object describing the group or blog to which this asset belongs.
543  
544 =item publicationStatus
545  
546 (PublicationStatus) An object describing the visibility status and publication date for this asset. Only visibility status is editable.
547  
548 =item crosspostAccounts
549  
550 (setE<lt>stringE<gt>) BE<lt>Write OnlyE<gt> A set of identifiers for OE<lt>AccountE<gt> objects to which to crosspost this asset when it's posted. This property is omitted when retrieving existing assets.
551  
552 =item isConversationsAnswer
553  
554 (boolean) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> CE<lt>trueE<gt> if this asset is an answer to a TypePad Conversations question, or absent otherwise. This property is deprecated and will be replaced with something more useful in future.
555  
556 =item reblogOf
557  
558 (AssetRef) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> If this asset was created by 'reblogging' another asset, this property describes the original asset.
559  
560 =item reblogOfUrl
561  
562 (string) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> If this asset was created by 'reblogging' another asset or some other arbitrary web page, this property contains the URL of the item that was reblogged.
563  
564 =item positiveVoteCount
565  
566 (integer) BE<lt>Read OnlyE<gt> The total number of positive votes this asset has received via the NE<lt>/assets/{id}/cast-positive-voteE<gt> endpoint.
567  
568 =item negativeVoteCount
569  
570 (integer) BE<lt>Read OnlyE<gt> The total number of negative votes this asset has received via the NE<lt>/assets/{id}/cast-negative-voteE<gt> endpoint.
571  
572 =item hasExtendedContent
573  
574 (boolean) BE<lt>Read OnlyE<gt> CE<lt>trueE<gt> if this asset has the extended content. This is currently supported only for OE<lt>PostE<gt> assets that are posted within a blog.
575  
576  
577 =back
578  
579 =cut
580  
581 0 ▶sub post_to_media_assets {
Subroutine post_to_media_assets: not called CC=1 SCAR=6.9
Pod documented
582 0 my $api = shift;
583 0 my @args;
584 0 push @args, shift; # id
585 0 my $uri = sprintf '/blogs/%s/media-assets.json', @args;
586 0 $api->base->call("POST", $uri, @_);
587 }
588  
589  
590 =pod
591  
592  
593  
594 =item post_to_page_assets
595  
596 my $res = $tp->blogs->post_to_page_assets($id);
597  
598 Add a new page to a blog
599  
600 Returns Page which contains following properties.
601  
602 =over 8
603  
604 =item filename
605  
606 (string) The base name of the page, used to create the ME<lt>permalinkUrlE<gt>.
607  
608 =item embeddedImageLinks
609  
610 (arrayE<lt>ImageLinkE<gt>) BE<lt>Read OnlyE<gt> A list of links to the images that are embedded within the content of this page.
611  
612 =item title
613  
614 (string) The title of the page.
615  
616 =item description
617  
618 (string) The description of the page.
619  
620 =item textFormat
621  
622 (string) A keyword that indicates what formatting mode to use for the content of this page. This can be CE<lt>htmlE<gt> for assets the content of which is HTML, CE<lt>html_convert_linebreaksE<gt> for assets the content of which is HTML but where paragraph tags should be added automatically, or CE<lt>markdownE<gt> for assets the content of which is Markdown source. Other formatting modes may be added in future. Applications that present assets for editing should use this property to present an appropriate editor.
623  
624 =item publicationStatus
625  
626 (PublicationStatus) An object describing the draft status and publication date for this page.
627  
628 =item feedbackStatus
629  
630 (FeedbackStatus) An object describing the comment and trackback behavior for this page.
631  
632 =item suppressEvents
633  
634 (boolean) BE<lt>Write OnlyE<gt> An optional, write-only flag indicating that asset creation should not trigger notification events such as emails or dashboard entries. Not available to all applications.
635  
636 =item id
637  
638 (string) BE<lt>Read OnlyE<gt> A URI that serves as a globally unique identifier for the user.
639  
640 =item urlId
641  
642 (string) BE<lt>Read OnlyE<gt> A string containing 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.
643  
644 =item permalinkUrl
645  
646 (string) BE<lt>Read OnlyE<gt> The URL that is this asset's permalink. This will be omitted if the asset does not have a permalink of its own (for example, if it's embedded in another asset) or if TypePad does not know its permalink.
647  
648 =item shortUrl
649  
650 (string) BE<lt>Read OnlyE<gt> The short version of the URL that is this asset's permalink. This is currently available only for OE<lt>PostE<gt> assetes.
651  
652 =item author
653  
654 (User) BE<lt>Read OnlyE<gt> The user who created the selected asset.
655  
656 =item published
657  
658 (datetime) BE<lt>Read OnlyE<gt> The time at which the asset was created, as a W3CDTF timestamp.
659  
660 =item content
661  
662 (string) The raw asset content. The ME<lt>textFormatE<gt> property describes how to format this data. Use this property to set the asset content in write operations. An asset posted in a group may have a ME<lt>contentE<gt> value up to 10,000 bytes long, while a OE<lt>PostE<gt> asset in a blog may have up to 65,000 bytes of content.
663  
664 =item renderedContent
665  
666 (string) BE<lt>Read OnlyE<gt> The content of this asset rendered to HTML. This is currently available only for OE<lt>PostE<gt> and OE<lt>PageE<gt> assets.
667  
668 =item excerpt
669  
670 (string) BE<lt>Read OnlyE<gt> A short, plain-text excerpt of the entry content. This is currently available only for OE<lt>PostE<gt> assets.
671  
672 =item textFormat
673  
674 (string) A keyword that indicates what formatting mode to use for the content of this asset. This can be CE<lt>htmlE<gt> for assets the content of which is HTML, CE<lt>html_convert_linebreaksE<gt> for assets the content of which is HTML but where paragraph tags should be added automatically, or CE<lt>markdownE<gt> for assets the content of which is Markdown source. Other formatting modes may be added in future. Applications that present assets for editing should use this property to present an appropriate editor.
675  
676 =item groups
677  
678 (arrayE<lt>stringE<gt>) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> An array of strings containing the ME<lt>idE<gt> URI of the OE<lt>GroupE<gt> object that this asset is mapped into, if any. This property has been superseded by the ME<lt>containerE<gt> property.
679  
680 =item source
681  
682 (AssetSource) BE<lt>Read OnlyE<gt> An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.
683  
684 =item objectTypes
685  
686 (setE<lt>stringE<gt>) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> An array of object type identifier URIs identifying the type of this asset. Only the one object type URI for the particular type of asset this asset is will be present.
687  
688 =item objectType
689  
690 (string) BE<lt>Read OnlyE<gt> The keyword identifying the type of asset this is.
691  
692 =item isFavoriteForCurrentUser
693  
694 (boolean) BE<lt>Read OnlyE<gt> CE<lt>trueE<gt> if this asset is a favorite for the currently authenticated user, or CE<lt>falseE<gt> otherwise. This property is omitted from responses to anonymous requests.
695  
696 =item favoriteCount
697  
698 (integer) BE<lt>Read OnlyE<gt> The number of distinct users who have added this asset as a favorite.
699  
700 =item commentCount
701  
702 (integer) BE<lt>Read OnlyE<gt> The number of comments that have been posted in reply to this asset. This number includes comments that have been posted in response to other comments.
703  
704 =item title
705  
706 (string) The title of the asset.
707  
708 =item description
709  
710 (string) The description of the asset.
711  
712 =item container
713  
714 (ContainerRef) BE<lt>Read OnlyE<gt> An object describing the group or blog to which this asset belongs.
715  
716 =item publicationStatus
717  
718 (PublicationStatus) An object describing the visibility status and publication date for this asset. Only visibility status is editable.
719  
720 =item crosspostAccounts
721  
722 (setE<lt>stringE<gt>) BE<lt>Write OnlyE<gt> A set of identifiers for OE<lt>AccountE<gt> objects to which to crosspost this asset when it's posted. This property is omitted when retrieving existing assets.
723  
724 =item isConversationsAnswer
725  
726 (boolean) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> CE<lt>trueE<gt> if this asset is an answer to a TypePad Conversations question, or absent otherwise. This property is deprecated and will be replaced with something more useful in future.
727  
728 =item reblogOf
729  
730 (AssetRef) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> If this asset was created by 'reblogging' another asset, this property describes the original asset.
731  
732 =item reblogOfUrl
733  
734 (string) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> If this asset was created by 'reblogging' another asset or some other arbitrary web page, this property contains the URL of the item that was reblogged.
735  
736 =item positiveVoteCount
737  
738 (integer) BE<lt>Read OnlyE<gt> The total number of positive votes this asset has received via the NE<lt>/assets/{id}/cast-positive-voteE<gt> endpoint.
739  
740 =item negativeVoteCount
741  
742 (integer) BE<lt>Read OnlyE<gt> The total number of negative votes this asset has received via the NE<lt>/assets/{id}/cast-negative-voteE<gt> endpoint.
743  
744 =item hasExtendedContent
745  
746 (boolean) BE<lt>Read OnlyE<gt> CE<lt>trueE<gt> if this asset has the extended content. This is currently supported only for OE<lt>PostE<gt> assets that are posted within a blog.
747  
748  
749 =back
750  
751 =cut
752  
753 0 ▶sub post_to_page_assets {
Subroutine post_to_page_assets: not called CC=1 SCAR=6.9
Pod documented
754 0 my $api = shift;
755 0 my @args;
756 0 push @args, shift; # id
757 0 my $uri = sprintf '/blogs/%s/page-assets.json', @args;
758 0 $api->base->call("POST", $uri, @_);
759 }
760  
761  
762 =pod
763  
764  
765  
766 =item get_page_assets
767  
768 my $res = $tp->blogs->get_page_assets($id);
769  
770 Get a list of pages associated with the selected blog.
771  
772 Returns ListE<lt>PageE<gt> which contains following properties.
773  
774 =over 8
775  
776 =item totalResults
777  
778 (integer) The total number of items in the whole list of which this list object is a paginated view.
779  
780 =item entries
781  
782 (arrayE<lt>PageE<gt>) The items within the selected slice of the list.
783  
784  
785 =back
786  
787 =cut
788  
789 0 ▶sub get_page_assets {
Subroutine get_page_assets: not called CC=1 SCAR=6.9
Pod documented
790 0 my $api = shift;
791 0 my @args;
792 0 push @args, shift; # id
793 0 my $uri = sprintf '/blogs/%s/page-assets.json', @args;
794 0 $api->base->call("GET", $uri, @_);
795 }
796  
797  
798 0 ▶sub page_assets {
Subroutine page_assets: not called CC=1 SCAR=6.9
Pod undocumented
799 0 my $self = shift;
800 0 Carp::carp("'page_assets' is deprecated. Use 'get_page_assets' instead.");
801 0 $self->get_page_assets(@_);
802 }
803  
804 =pod
805  
806  
807  
808 =item post_to_post_assets
809  
810 my $res = $tp->blogs->post_to_post_assets($id);
811  
812 Add a new post to a blog
813  
814 Returns Post which contains following properties.
815  
816 =over 8
817  
818 =item categories
819  
820 (arrayE<lt>stringE<gt>) A list of categories associated with the post.
821  
822 =item embeddedImageLinks
823  
824 (arrayE<lt>ImageLinkE<gt>) BE<lt>Read OnlyE<gt> A list of links to the images that are embedded within the content of this post.
825  
826 =item embeddedVideoLinks
827  
828 (arrayE<lt>VideoLinkE<gt>) BE<lt>Read OnlyE<gt> A list of links to the videos that are embedded within the content of this post.
829  
830 =item embeddedAudioLinks
831  
832 (arrayE<lt>AudioLinkE<gt>) BE<lt>Read OnlyE<gt> A list of links to the audio streams that are embedded within the content of this post.
833  
834 =item title
835  
836 (string) The title of the post.
837  
838 =item description
839  
840 (string) The description of the post.
841  
842 =item filename
843  
844 (string) The base name of the post to use when creating its ME<lt>permalinkUrlE<gt>.
845  
846 =item content
847  
848 (string) The raw post content. The ME<lt>textFormatE<gt> property defines what format this data is in.
849  
850 =item textFormat
851  
852 (string) A keyword that indicates what formatting mode to use for the content of this post. This can be CE<lt>htmlE<gt> for assets the content of which is HTML, CE<lt>html_convert_linebreaksE<gt> for assets the content of which is HTML but where paragraph tags should be added automatically, or CE<lt>markdownE<gt> for assets the content of which is Markdown source. Other formatting modes may be added in future. Applications that present assets for editing should use this property to present an appropriate editor.
853  
854 =item publicationStatus
855  
856 (PublicationStatus) An object describing the draft status and publication date for this post.
857  
858 =item feedbackStatus
859  
860 (FeedbackStatus) An object describing the comment and trackback behavior for this post.
861  
862 =item reblogCount
863  
864 (integer) BE<lt>Read OnlyE<gt> The number of times this post has been reblogged by other people.
865  
866 =item reblogOf
867  
868 (AssetRef) BE<lt>Fixed After CreationE<gt> A reference to a post of which this post is a reblog.
869  
870 =item suppressEvents
871  
872 (boolean) BE<lt>Write OnlyE<gt> An optional, write-only flag indicating that asset creation should not trigger notification events such as emails or dashboard entries. Not available to all applications.
873  
874 =item createConversation
875  
876 (boolean) BE<lt>Write OnlyE<gt> An optional, write-only flag indicating that the asset is starting a new conversation.
877  
878 =item conversationId
879  
880 (string) BE<lt>Read OnlyE<gt> Identifies the OE<lt>ConversationE<gt> object this asset belongs to, if any. Omitted if the asset is not part of a conversation.
881  
882 =item id
883  
884 (string) BE<lt>Read OnlyE<gt> A URI that serves as a globally unique identifier for the user.
885  
886 =item urlId
887  
888 (string) BE<lt>Read OnlyE<gt> A string containing 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.
889  
890 =item permalinkUrl
891  
892 (string) BE<lt>Read OnlyE<gt> The URL that is this asset's permalink. This will be omitted if the asset does not have a permalink of its own (for example, if it's embedded in another asset) or if TypePad does not know its permalink.
893  
894 =item shortUrl
895  
896 (string) BE<lt>Read OnlyE<gt> The short version of the URL that is this asset's permalink. This is currently available only for OE<lt>PostE<gt> assetes.
897  
898 =item author
899  
900 (User) BE<lt>Read OnlyE<gt> The user who created the selected asset.
901  
902 =item published
903  
904 (datetime) BE<lt>Read OnlyE<gt> The time at which the asset was created, as a W3CDTF timestamp.
905  
906 =item content
907  
908 (string) The raw asset content. The ME<lt>textFormatE<gt> property describes how to format this data. Use this property to set the asset content in write operations. An asset posted in a group may have a ME<lt>contentE<gt> value up to 10,000 bytes long, while a OE<lt>PostE<gt> asset in a blog may have up to 65,000 bytes of content.
909  
910 =item renderedContent
911  
912 (string) BE<lt>Read OnlyE<gt> The content of this asset rendered to HTML. This is currently available only for OE<lt>PostE<gt> and OE<lt>PageE<gt> assets.
913  
914 =item excerpt
915  
916 (string) BE<lt>Read OnlyE<gt> A short, plain-text excerpt of the entry content. This is currently available only for OE<lt>PostE<gt> assets.
917  
918 =item textFormat
919  
920 (string) A keyword that indicates what formatting mode to use for the content of this asset. This can be CE<lt>htmlE<gt> for assets the content of which is HTML, CE<lt>html_convert_linebreaksE<gt> for assets the content of which is HTML but where paragraph tags should be added automatically, or CE<lt>markdownE<gt> for assets the content of which is Markdown source. Other formatting modes may be added in future. Applications that present assets for editing should use this property to present an appropriate editor.
921  
922 =item groups
923  
924 (arrayE<lt>stringE<gt>) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> An array of strings containing the ME<lt>idE<gt> URI of the OE<lt>GroupE<gt> object that this asset is mapped into, if any. This property has been superseded by the ME<lt>containerE<gt> property.
925  
926 =item source
927  
928 (AssetSource) BE<lt>Read OnlyE<gt> An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.
929  
930 =item objectTypes
931  
932 (setE<lt>stringE<gt>) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> An array of object type identifier URIs identifying the type of this asset. Only the one object type URI for the particular type of asset this asset is will be present.
933  
934 =item objectType
935  
936 (string) BE<lt>Read OnlyE<gt> The keyword identifying the type of asset this is.
937  
938 =item isFavoriteForCurrentUser
939  
940 (boolean) BE<lt>Read OnlyE<gt> CE<lt>trueE<gt> if this asset is a favorite for the currently authenticated user, or CE<lt>falseE<gt> otherwise. This property is omitted from responses to anonymous requests.
941  
942 =item favoriteCount
943  
944 (integer) BE<lt>Read OnlyE<gt> The number of distinct users who have added this asset as a favorite.
945  
946 =item commentCount
947  
948 (integer) BE<lt>Read OnlyE<gt> The number of comments that have been posted in reply to this asset. This number includes comments that have been posted in response to other comments.
949  
950 =item title
951  
952 (string) The title of the asset.
953  
954 =item description
955  
956 (string) The description of the asset.
957  
958 =item container
959  
960 (ContainerRef) BE<lt>Read OnlyE<gt> An object describing the group or blog to which this asset belongs.
961  
962 =item publicationStatus
963  
964 (PublicationStatus) An object describing the visibility status and publication date for this asset. Only visibility status is editable.
965  
966 =item crosspostAccounts
967  
968 (setE<lt>stringE<gt>) BE<lt>Write OnlyE<gt> A set of identifiers for OE<lt>AccountE<gt> objects to which to crosspost this asset when it's posted. This property is omitted when retrieving existing assets.
969  
970 =item isConversationsAnswer
971  
972 (boolean) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> CE<lt>trueE<gt> if this asset is an answer to a TypePad Conversations question, or absent otherwise. This property is deprecated and will be replaced with something more useful in future.
973  
974 =item reblogOf
975  
976 (AssetRef) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> If this asset was created by 'reblogging' another asset, this property describes the original asset.
977  
978 =item reblogOfUrl
979  
980 (string) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> If this asset was created by 'reblogging' another asset or some other arbitrary web page, this property contains the URL of the item that was reblogged.
981  
982 =item positiveVoteCount
983  
984 (integer) BE<lt>Read OnlyE<gt> The total number of positive votes this asset has received via the NE<lt>/assets/{id}/cast-positive-voteE<gt> endpoint.
985  
986 =item negativeVoteCount
987  
988 (integer) BE<lt>Read OnlyE<gt> The total number of negative votes this asset has received via the NE<lt>/assets/{id}/cast-negative-voteE<gt> endpoint.
989  
990 =item hasExtendedContent
991  
992 (boolean) BE<lt>Read OnlyE<gt> CE<lt>trueE<gt> if this asset has the extended content. This is currently supported only for OE<lt>PostE<gt> assets that are posted within a blog.
993  
994  
995 =back
996  
997 =cut
998  
999 0 ▶sub post_to_post_assets {
Subroutine post_to_post_assets: not called CC=1 SCAR=6.9
Pod documented
1000 0 my $api = shift;
1001 0 my @args;
1002 0 push @args, shift; # id
1003 0 my $uri = sprintf '/blogs/%s/post-assets.json', @args;
1004 0 $api->base->call("POST", $uri, @_);
1005 }
1006  
1007  
1008 =pod
1009  
1010  
1011  
1012 =item get_post_assets
1013  
1014 my $res = $tp->blogs->get_post_assets($id);
1015  
1016 Get a list of posts associated with the selected blog.
1017  
1018 Returns ListE<lt>PostE<gt> which contains following properties.
1019  
1020 =over 8
1021  
1022 =item totalResults
1023  
1024 (integer) The total number of items in the whole list of which this list object is a paginated view.
1025  
1026 =item entries
1027  
1028 (arrayE<lt>PostE<gt>) The items within the selected slice of the list.
1029  
1030  
1031 =back
1032  
1033 =cut
1034  
1035 0 ▶sub get_post_assets {
Subroutine get_post_assets: not called CC=1 SCAR=6.9
Pod documented
1036 0 my $api = shift;
1037 0 my @args;
1038 0 push @args, shift; # id
1039 0 my $uri = sprintf '/blogs/%s/post-assets.json', @args;
1040 0 $api->base->call("GET", $uri, @_);
1041 }
1042  
1043  
1044 0 ▶sub post_assets {
Subroutine post_assets: not called CC=1 SCAR=6.9
Pod undocumented
1045 0 my $self = shift;
1046 0 Carp::carp("'post_assets' is deprecated. Use 'get_post_assets' instead.");
1047 0 $self->get_post_assets(@_);
1048 }
1049  
1050 =pod
1051  
1052  
1053  
1054 =item get_post_assets_by_category
1055  
1056 my $res = $tp->blogs->get_post_assets_by_category($id, $category);
1057  
1058 Get all visibile posts in the selected blog that have been assigned to the given category.
1059  
1060 Returns ListE<lt>PostE<gt> which contains following properties.
1061  
1062 =over 8
1063  
1064 =item totalResults
1065  
1066 (integer) The total number of items in the whole list of which this list object is a paginated view.
1067  
1068 =item entries
1069  
1070 (arrayE<lt>PostE<gt>) The items within the selected slice of the list.
1071  
1072  
1073 =back
1074  
1075 =cut
1076  
1077 0 ▶sub get_post_assets_by_category {
Subroutine get_post_assets_by_category: not called CC=1 SCAR=6.9
Pod documented
1078 0 my $api = shift;
1079 0 my @args;
1080 0 push @args, shift; # id
1081 0 push @args, shift; # category
1082 0 my $uri = sprintf '/blogs/%s/post-assets/@by-category/%s.json', @args;
1083 0 $api->base->call("GET", $uri, @_);
1084 }
1085  
1086  
1087 0 ▶sub post_assets_by_category {
Subroutine post_assets_by_category: not called CC=1 SCAR=6.9
Pod undocumented
1088 0 my $self = shift;
1089 0 Carp::carp("'post_assets_by_category' is deprecated. Use 'get_post_assets_by_category' instead.");
1090 0 $self->get_post_assets_by_category(@_);
1091 }
1092  
1093 =pod
1094  
1095  
1096  
1097 =item get_post_assets_by_filename
1098  
1099 my $res = $tp->blogs->get_post_assets_by_filename($id, $filename);
1100  
1101 Get zero or one posts matching the given year, month and filename.
1102  
1103 Returns ListE<lt>PostE<gt> which contains following properties.
1104  
1105 =over 8
1106  
1107 =item totalResults
1108  
1109 (integer) The total number of items in the whole list of which this list object is a paginated view.
1110  
1111 =item entries
1112  
1113 (arrayE<lt>PostE<gt>) The items within the selected slice of the list.
1114  
1115  
1116 =back
1117  
1118 =cut
1119  
1120 0 ▶sub get_post_assets_by_filename {
Subroutine get_post_assets_by_filename: not called CC=1 SCAR=6.9
Pod documented
1121 0 my $api = shift;
1122 0 my @args;
1123 0 push @args, shift; # id
1124 0 push @args, shift; # filename
1125 0 my $uri = sprintf '/blogs/%s/post-assets/@by-filename/%s.json', @args;
1126 0 $api->base->call("GET", $uri, @_);
1127 }
1128  
1129  
1130 0 ▶sub post_assets_by_filename {
Subroutine post_assets_by_filename: not called CC=1 SCAR=6.9
Pod undocumented
1131 0 my $self = shift;
1132 0 Carp::carp("'post_assets_by_filename' is deprecated. Use 'get_post_assets_by_filename' instead.");
1133 0 $self->get_post_assets_by_filename(@_);
1134 }
1135  
1136 =pod
1137  
1138  
1139  
1140 =item get_post_assets_by_month
1141  
1142 my $res = $tp->blogs->get_post_assets_by_month($id, $month);
1143  
1144 Get all visible posts in the selected blog that have a publication date within the selected month, specified as a string of the form "YYYY-MM".
1145  
1146 Returns ListE<lt>PostE<gt> which contains following properties.
1147  
1148 =over 8
1149  
1150 =item totalResults
1151  
1152 (integer) The total number of items in the whole list of which this list object is a paginated view.
1153  
1154 =item entries
1155  
1156 (arrayE<lt>PostE<gt>) The items within the selected slice of the list.
1157  
1158  
1159 =back
1160  
1161 =cut
1162  
1163 0 ▶sub get_post_assets_by_month {
Subroutine get_post_assets_by_month: not called CC=1 SCAR=6.9
Pod documented
1164 0 my $api = shift;
1165 0 my @args;
1166 0 push @args, shift; # id
1167 0 push @args, shift; # month
1168 0 my $uri = sprintf '/blogs/%s/post-assets/@by-month/%s.json', @args;
1169 0 $api->base->call("GET", $uri, @_);
1170 }
1171  
1172  
1173 0 ▶sub post_assets_by_month {
Subroutine post_assets_by_month: not called CC=1 SCAR=6.9
Pod undocumented
1174 0 my $self = shift;
1175 0 Carp::carp("'post_assets_by_month' is deprecated. Use 'get_post_assets_by_month' instead.");
1176 0 $self->get_post_assets_by_month(@_);
1177 }
1178  
1179 =pod
1180  
1181  
1182  
1183 =item get_published_post_assets_by_category
1184  
1185 my $res = $tp->blogs->get_published_post_assets_by_category($id, $category);
1186  
1187 Get the published posts in the selected blog that have been assigned to the given category.
1188  
1189 Returns ListE<lt>PostE<gt> which contains following properties.
1190  
1191 =over 8
1192  
1193 =item totalResults
1194  
1195 (integer) The total number of items in the whole list of which this list object is a paginated view.
1196  
1197 =item entries
1198  
1199 (arrayE<lt>PostE<gt>) The items within the selected slice of the list.
1200  
1201  
1202 =back
1203  
1204 =cut
1205  
1206 0 ▶sub get_published_post_assets_by_category {
Subroutine get_published_post_assets_by_category: not called CC=1 SCAR=6.9
Pod documented
1207 0 my $api = shift;
1208 0 my @args;
1209 0 push @args, shift; # id
1210 0 push @args, shift; # category
1211 0 my $uri = sprintf '/blogs/%s/post-assets/@published/@by-category/%s.json', @args;
1212 0 $api->base->call("GET", $uri, @_);
1213 }
1214  
1215  
1216 0 ▶sub published_post_assets_by_category {
Subroutine published_post_assets_by_category: not called CC=1 SCAR=6.9
Pod undocumented
1217 0 my $self = shift;
1218 0 Carp::carp("'published_post_assets_by_category' is deprecated. Use 'get_published_post_assets_by_category' instead.");
1219 0 $self->get_published_post_assets_by_category(@_);
1220 }
1221  
1222 =pod
1223  
1224  
1225  
1226 =item get_published_post_assets_by_month
1227  
1228 my $res = $tp->blogs->get_published_post_assets_by_month($id, $month);
1229  
1230 Get the posts that were published within the selected month (YYYY-MM) from the selected blog.
1231  
1232 Returns ListE<lt>PostE<gt> which contains following properties.
1233  
1234 =over 8
1235  
1236 =item totalResults
1237  
1238 (integer) The total number of items in the whole list of which this list object is a paginated view.
1239  
1240 =item entries
1241  
1242 (arrayE<lt>PostE<gt>) The items within the selected slice of the list.
1243  
1244  
1245 =back
1246  
1247 =cut
1248  
1249 0 ▶sub get_published_post_assets_by_month {
Subroutine get_published_post_assets_by_month: not called CC=1 SCAR=6.9
Pod documented
1250 0 my $api = shift;
1251 0 my @args;
1252 0 push @args, shift; # id
1253 0 push @args, shift; # month
1254 0 my $uri = sprintf '/blogs/%s/post-assets/@published/@by-month/%s.json', @args;
1255 0 $api->base->call("GET", $uri, @_);
1256 }
1257  
1258  
1259 0 ▶sub published_post_assets_by_month {
Subroutine published_post_assets_by_month: not called CC=1 SCAR=6.9
Pod undocumented
1260 0 my $self = shift;
1261 0 Carp::carp("'published_post_assets_by_month' is deprecated. Use 'get_published_post_assets_by_month' instead.");
1262 0 $self->get_published_post_assets_by_month(@_);
1263 }
1264  
1265 =pod
1266  
1267  
1268  
1269 =item get_published_recent_post_assets
1270  
1271 my $res = $tp->blogs->get_published_recent_post_assets($id);
1272  
1273 Get the most recent 50 published posts in the selected blog.
1274  
1275 Returns ListE<lt>PostE<gt> which contains following properties.
1276  
1277 =over 8
1278  
1279 =item totalResults
1280  
1281 (integer) The total number of items in the whole list of which this list object is a paginated view.
1282  
1283 =item entries
1284  
1285 (arrayE<lt>PostE<gt>) The items within the selected slice of the list.
1286  
1287  
1288 =back
1289  
1290 =cut
1291  
1292 0 ▶sub get_published_recent_post_assets {
Subroutine get_published_recent_post_assets: not called CC=1 SCAR=6.9
Pod documented
1293 0 my $api = shift;
1294 0 my @args;
1295 0 push @args, shift; # id
1296 0 my $uri = sprintf '/blogs/%s/post-assets/@published/@recent.json', @args;
1297 0 $api->base->call("GET", $uri, @_);
1298 }
1299  
1300  
1301 0 ▶sub published_recent_post_assets {
Subroutine published_recent_post_assets: not called CC=1 SCAR=6.9
Pod undocumented
1302 0 my $self = shift;
1303 0 Carp::carp("'published_recent_post_assets' is deprecated. Use 'get_published_recent_post_assets' instead.");
1304 0 $self->get_published_recent_post_assets(@_);
1305 }
1306  
1307 =pod
1308  
1309  
1310  
1311 =item get_recent_post_assets
1312  
1313 my $res = $tp->blogs->get_recent_post_assets($id);
1314  
1315 Get the most recent 50 posts in the selected blog, including draft and scheduled posts.
1316  
1317 Returns ListE<lt>PostE<gt> which contains following properties.
1318  
1319 =over 8
1320  
1321 =item totalResults
1322  
1323 (integer) The total number of items in the whole list of which this list object is a paginated view.
1324  
1325 =item entries
1326  
1327 (arrayE<lt>PostE<gt>) The items within the selected slice of the list.
1328  
1329  
1330 =back
1331  
1332 =cut
1333  
1334 0 ▶sub get_recent_post_assets {
Subroutine get_recent_post_assets: not called CC=1 SCAR=6.9
Pod documented
1335 0 my $api = shift;
1336 0 my @args;
1337 0 push @args, shift; # id
1338 0 my $uri = sprintf '/blogs/%s/post-assets/@recent.json', @args;
1339 0 $api->base->call("GET", $uri, @_);
1340 }
1341  
1342  
1343 0 ▶sub recent_post_assets {
Subroutine recent_post_assets: not called CC=1 SCAR=6.9
Pod undocumented
1344 0 my $self = shift;
1345 0 Carp::carp("'recent_post_assets' is deprecated. Use 'get_recent_post_assets' instead.");
1346 0 $self->get_recent_post_assets(@_);
1347 }
1348  
1349 =pod
1350  
1351  
1352  
1353 =item get_post_by_email_settings_by_user
1354  
1355 my $res = $tp->blogs->get_post_by_email_settings_by_user($id, $userId);
1356  
1357 Get the selected user's post-by-email address
1358  
1359 Returns PostByEmailAddress which contains following properties.
1360  
1361 =over 8
1362  
1363 =item emailAddress
1364  
1365 (string) A private email address for posting via email.
1366  
1367  
1368 =back
1369  
1370 =cut
1371  
1372 0 ▶sub get_post_by_email_settings_by_user {
Subroutine get_post_by_email_settings_by_user: not called CC=1 SCAR=6.9
Pod documented
1373 0 my $api = shift;
1374 0 my @args;
1375 0 push @args, shift; # id
1376 0 push @args, shift; # userId
1377 0 my $uri = sprintf '/blogs/%s/post-by-email-settings/@by-user/%s.json', @args;
1378 0 $api->base->call("GET", $uri, @_);
1379 }
1380  
1381  
1382 0 ▶sub post_by_email_settings_by_user {
Subroutine post_by_email_settings_by_user: not called CC=1 SCAR=6.9
Pod undocumented
1383 0 my $self = shift;
1384 0 Carp::carp("'post_by_email_settings_by_user' is deprecated. Use 'get_post_by_email_settings_by_user' instead.");
1385 0 $self->get_post_by_email_settings_by_user(@_);
1386 }
1387  
1388 =pod
1389  
1390  
1391  
1392 =item remove_category
1393  
1394 my $res = $tp->blogs->remove_category($id);
1395  
1396 Send label argument to remove a category from the blog
1397  
1398 Returns hash reference which contains following properties.
1399  
1400 =over 8
1401  
1402  
1403 =back
1404  
1405 =cut
1406  
1407 0 ▶sub remove_category {
Subroutine remove_category: not called CC=1 SCAR=6.9
Pod documented
1408 0 my $api = shift;
1409 0 my @args;
1410 0 push @args, shift; # id
1411 0 my $uri = sprintf '/blogs/%s/remove-category.json', @args;
1412 0 $api->base->call("POST", $uri, @_);
1413 }
1414  
1415  
1416 =pod
1417  
1418  
1419  
1420 =item get_stats
1421  
1422 my $res = $tp->blogs->get_stats($id);
1423  
1424 Get data about the pageviews for the selected blog.
1425  
1426 Returns BlogStats which contains following properties.
1427  
1428 =over 8
1429  
1430 =item totalPageViews
1431  
1432 (integer) The total number of page views received by the blog for all time.
1433  
1434 =item dailyPageViews
1435  
1436 (mapE<lt>integerE<gt>) A map containing the daily page views on the blog for the last 120 days. The keys of the map are dates in W3CDTF format, and the values are the integer number of page views on the blog for that date.
1437  
1438  
1439 =back
1440  
1441 =cut
1442  
1443 0 ▶sub get_stats {
Subroutine get_stats: not called CC=1 SCAR=6.9
Pod documented
1444 0 my $api = shift;
1445 0 my @args;
1446 0 push @args, shift; # id
1447 0 my $uri = sprintf '/blogs/%s/stats.json', @args;
1448 0 $api->base->call("GET", $uri, @_);
1449 }
1450  
1451  
1452 0 ▶sub stats {
Subroutine stats: not called CC=1 SCAR=6.9
Pod undocumented
1453 0 my $self = shift;
1454 0 Carp::carp("'stats' is deprecated. Use 'get_stats' instead.");
1455 0 $self->get_stats(@_);
1456 }
1457  
1458 =pod
1459  
1460 =back
1461  
1462 =cut
1463  
1464 ### END auto-generated
1465  
1466 0 ▶sub upload_media_asset {
Subroutine upload_media_asset: not called CC=1 SCAR=6.9
Pod undocumented
1467 0 my $api = shift;
1468 0 my( $id, $asset, $filename ) = @_;
1469  
1470 0 return $api->base->call_upload( {
1471 # No extension on this!
1472 target_url => '/blogs/' . $id . '/media-assets',
1473 asset => $asset,
1474 filename => $filename,
1475 } );
1476 }
1477  
1478 1 1;
« TypePad/Users.pm ↑ Summary TypePad/Groups.pm »