File Coverage

blib/lib/WWW/TypePad/Blogs.pm
Criterion Covered Total %
statement 15 198 7.5
branch n/a
condition n/a
subroutine 5 48 10.4
pod 26 43 60.4
total 46 289 15.9


line stmt bran cond sub pod time code
1             package WWW::TypePad::Blogs;
2              
3 1     1   8 use strict;
  1         2  
  1         44  
4 1     1   8 use warnings;
  1         4  
  1         87  
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::blogs { __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::Blogs - Blogs API methods
19              
20             =head1 METHODS
21              
22             =cut
23              
24 1     1   6 use strict;
  1         2  
  1         30  
25 1     1   6 use Any::Moose;
  1         2  
  1         10  
26             extends 'WWW::TypePad::Noun';
27              
28 1     1   1580 use Carp ();
  1         3  
  1         6199  
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             (setEstringE) BEDeprecatedE An array of object type identifier URIs. This set will contain the string CEtag:api.typepad.com,2009:BlogE for a Blog object.
73              
74             =item objectType
75              
76             (string) The keyword identifying the type of object this is. For a Blog object, MEobjectTypeE will be CEBlogE.
77              
78              
79             =back
80              
81             =cut
82              
83             sub get {
84 0     0 1   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             sub add_category {
112 0     0 1   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 OEImporterJobE object representing the job that was created.
137              
138              
139             =back
140              
141             =cut
142              
143             sub begin_import {
144 0     0 1   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             sub build_embed_code_for_urls {
176 0     0 1   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 ListEstringE 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             (arrayEstringE) The items within the selected slice of the list.
205              
206              
207             =back
208              
209             =cut
210              
211             sub get_categories {
212 0     0 1   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             sub categories {
221 0     0 1   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) CEtrueE if this blog allows users to sign in to comment, or CEfalseE if all new comments are anonymous.
243              
244             =item signinRequired
245              
246             (boolean) CEtrueE if this blog requires users to be logged in in order to leave a comment, or CEfalseE if anonymous comments will be rejected.
247              
248             =item emailAddressRequired
249              
250             (boolean) CEtrueE if this blog requires anonymous comments to be submitted with an email address, or CEfalseE otherwise.
251              
252             =item captchaRequired
253              
254             (boolean) CEtrueE if this blog requires anonymous commenters to pass a CAPTCHA before submitting a comment, or CEfalseE otherwise.
255              
256             =item moderationEnabled
257              
258             (boolean) CEtrueE if this blog places new comments into a moderation queue for approval before they are displayed, or CEfalseE 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) CEtrueE if this blog allows commenters to use basic HTML formatting in comments, or CEfalseE if HTML will be removed.
267              
268             =item urlsAutoLinked
269              
270             (boolean) CEtrueE if comments in this blog will automatically have any bare URLs turned into links, or CEfalseE if URLs will be shown unlinked.
271              
272              
273             =back
274              
275             =cut
276              
277             sub get_commenting_settings {
278 0     0 1   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             sub commenting_settings {
287 0     0 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 ListECommentE 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             (arrayECommentE) The items within the selected slice of the list.
313              
314              
315             =back
316              
317             =cut
318              
319             sub get_published_comments {
320 0     0 1   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             sub published_comments {
329 0     0 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 ListECommentE 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             (arrayECommentE) The items within the selected slice of the list.
355              
356              
357             =back
358              
359             =cut
360              
361             sub get_published_recent_comments {
362 0     0 1   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             sub published_recent_comments {
371 0     0 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 ListEAccountE 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             (arrayEAccountE) The items within the selected slice of the list.
397              
398              
399             =back
400              
401             =cut
402              
403             sub get_crosspost_accounts {
404 0     0 1   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             sub crosspost_accounts {
413 0     0 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             sub discover_external_post_asset {
442 0     0 1   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) BERead OnlyE A URI that serves as a globally unique identifier for the user.
467              
468             =item urlId
469              
470             (string) BERead OnlyE 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) BERead OnlyE 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) BERead OnlyE The short version of the URL that is this asset's permalink. This is currently available only for OEPostE assetes.
479              
480             =item author
481              
482             (User) BERead OnlyE The user who created the selected asset.
483              
484             =item published
485              
486             (datetime) BERead OnlyE The time at which the asset was created, as a W3CDTF timestamp.
487              
488             =item content
489              
490             (string) The raw asset content. The MEtextFormatE 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 MEcontentE value up to 10,000 bytes long, while a OEPostE asset in a blog may have up to 65,000 bytes of content.
491              
492             =item renderedContent
493              
494             (string) BERead OnlyE The content of this asset rendered to HTML. This is currently available only for OEPostE and OEPageE assets.
495              
496             =item excerpt
497              
498             (string) BERead OnlyE A short, plain-text excerpt of the entry content. This is currently available only for OEPostE 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 CEhtmlE for assets the content of which is HTML, CEhtml_convert_linebreaksE for assets the content of which is HTML but where paragraph tags should be added automatically, or CEmarkdownE 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             (arrayEstringE) BERead OnlyE BEDeprecatedE An array of strings containing the MEidE URI of the OEGroupE object that this asset is mapped into, if any. This property has been superseded by the MEcontainerE property.
507              
508             =item source
509              
510             (AssetSource) BERead OnlyE 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             (setEstringE) BERead OnlyE BEDeprecatedE 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) BERead OnlyE The keyword identifying the type of asset this is.
519              
520             =item isFavoriteForCurrentUser
521              
522             (boolean) BERead OnlyE CEtrueE if this asset is a favorite for the currently authenticated user, or CEfalseE otherwise. This property is omitted from responses to anonymous requests.
523              
524             =item favoriteCount
525              
526             (integer) BERead OnlyE The number of distinct users who have added this asset as a favorite.
527              
528             =item commentCount
529              
530             (integer) BERead OnlyE 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) BERead OnlyE 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             (setEstringE) BEWrite OnlyE A set of identifiers for OEAccountE 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) BERead OnlyE BEDeprecatedE CEtrueE 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) BERead OnlyE BEDeprecatedE If this asset was created by 'reblogging' another asset, this property describes the original asset.
559              
560             =item reblogOfUrl
561              
562             (string) BERead OnlyE BEDeprecatedE 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) BERead OnlyE The total number of positive votes this asset has received via the NE/assets/{id}/cast-positive-voteE endpoint.
567              
568             =item negativeVoteCount
569              
570             (integer) BERead OnlyE The total number of negative votes this asset has received via the NE/assets/{id}/cast-negative-voteE endpoint.
571              
572             =item hasExtendedContent
573              
574             (boolean) BERead OnlyE CEtrueE if this asset has the extended content. This is currently supported only for OEPostE assets that are posted within a blog.
575              
576              
577             =back
578              
579             =cut
580              
581             sub post_to_media_assets {
582 0     0 1   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 MEpermalinkUrlE.
607              
608             =item embeddedImageLinks
609              
610             (arrayEImageLinkE) BERead OnlyE 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 CEhtmlE for assets the content of which is HTML, CEhtml_convert_linebreaksE for assets the content of which is HTML but where paragraph tags should be added automatically, or CEmarkdownE 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) BEWrite OnlyE 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) BERead OnlyE A URI that serves as a globally unique identifier for the user.
639              
640             =item urlId
641              
642             (string) BERead OnlyE 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) BERead OnlyE 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) BERead OnlyE The short version of the URL that is this asset's permalink. This is currently available only for OEPostE assetes.
651              
652             =item author
653              
654             (User) BERead OnlyE The user who created the selected asset.
655              
656             =item published
657              
658             (datetime) BERead OnlyE The time at which the asset was created, as a W3CDTF timestamp.
659              
660             =item content
661              
662             (string) The raw asset content. The MEtextFormatE 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 MEcontentE value up to 10,000 bytes long, while a OEPostE asset in a blog may have up to 65,000 bytes of content.
663              
664             =item renderedContent
665              
666             (string) BERead OnlyE The content of this asset rendered to HTML. This is currently available only for OEPostE and OEPageE assets.
667              
668             =item excerpt
669              
670             (string) BERead OnlyE A short, plain-text excerpt of the entry content. This is currently available only for OEPostE 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 CEhtmlE for assets the content of which is HTML, CEhtml_convert_linebreaksE for assets the content of which is HTML but where paragraph tags should be added automatically, or CEmarkdownE 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             (arrayEstringE) BERead OnlyE BEDeprecatedE An array of strings containing the MEidE URI of the OEGroupE object that this asset is mapped into, if any. This property has been superseded by the MEcontainerE property.
679              
680             =item source
681              
682             (AssetSource) BERead OnlyE 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             (setEstringE) BERead OnlyE BEDeprecatedE 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) BERead OnlyE The keyword identifying the type of asset this is.
691              
692             =item isFavoriteForCurrentUser
693              
694             (boolean) BERead OnlyE CEtrueE if this asset is a favorite for the currently authenticated user, or CEfalseE otherwise. This property is omitted from responses to anonymous requests.
695              
696             =item favoriteCount
697              
698             (integer) BERead OnlyE The number of distinct users who have added this asset as a favorite.
699              
700             =item commentCount
701              
702             (integer) BERead OnlyE 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) BERead OnlyE 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             (setEstringE) BEWrite OnlyE A set of identifiers for OEAccountE 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) BERead OnlyE BEDeprecatedE CEtrueE 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) BERead OnlyE BEDeprecatedE If this asset was created by 'reblogging' another asset, this property describes the original asset.
731              
732             =item reblogOfUrl
733              
734             (string) BERead OnlyE BEDeprecatedE 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) BERead OnlyE The total number of positive votes this asset has received via the NE/assets/{id}/cast-positive-voteE endpoint.
739              
740             =item negativeVoteCount
741              
742             (integer) BERead OnlyE The total number of negative votes this asset has received via the NE/assets/{id}/cast-negative-voteE endpoint.
743              
744             =item hasExtendedContent
745              
746             (boolean) BERead OnlyE CEtrueE if this asset has the extended content. This is currently supported only for OEPostE assets that are posted within a blog.
747              
748              
749             =back
750              
751             =cut
752              
753             sub post_to_page_assets {
754 0     0 1   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 ListEPageE 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             (arrayEPageE) The items within the selected slice of the list.
783              
784              
785             =back
786              
787             =cut
788              
789             sub get_page_assets {
790 0     0 1   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             sub page_assets {
799 0     0 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             (arrayEstringE) A list of categories associated with the post.
821              
822             =item embeddedImageLinks
823              
824             (arrayEImageLinkE) BERead OnlyE A list of links to the images that are embedded within the content of this post.
825              
826             =item embeddedVideoLinks
827              
828             (arrayEVideoLinkE) BERead OnlyE A list of links to the videos that are embedded within the content of this post.
829              
830             =item embeddedAudioLinks
831              
832             (arrayEAudioLinkE) BERead OnlyE 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 MEpermalinkUrlE.
845              
846             =item content
847              
848             (string) The raw post content. The MEtextFormatE 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 CEhtmlE for assets the content of which is HTML, CEhtml_convert_linebreaksE for assets the content of which is HTML but where paragraph tags should be added automatically, or CEmarkdownE 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) BERead OnlyE The number of times this post has been reblogged by other people.
865              
866             =item reblogOf
867              
868             (AssetRef) BEFixed After CreationE A reference to a post of which this post is a reblog.
869              
870             =item suppressEvents
871              
872             (boolean) BEWrite OnlyE 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) BEWrite OnlyE An optional, write-only flag indicating that the asset is starting a new conversation.
877              
878             =item conversationId
879              
880             (string) BERead OnlyE Identifies the OEConversationE object this asset belongs to, if any. Omitted if the asset is not part of a conversation.
881              
882             =item id
883              
884             (string) BERead OnlyE A URI that serves as a globally unique identifier for the user.
885              
886             =item urlId
887              
888             (string) BERead OnlyE 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) BERead OnlyE 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) BERead OnlyE The short version of the URL that is this asset's permalink. This is currently available only for OEPostE assetes.
897              
898             =item author
899              
900             (User) BERead OnlyE The user who created the selected asset.
901              
902             =item published
903              
904             (datetime) BERead OnlyE The time at which the asset was created, as a W3CDTF timestamp.
905              
906             =item content
907              
908             (string) The raw asset content. The MEtextFormatE 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 MEcontentE value up to 10,000 bytes long, while a OEPostE asset in a blog may have up to 65,000 bytes of content.
909              
910             =item renderedContent
911              
912             (string) BERead OnlyE The content of this asset rendered to HTML. This is currently available only for OEPostE and OEPageE assets.
913              
914             =item excerpt
915              
916             (string) BERead OnlyE A short, plain-text excerpt of the entry content. This is currently available only for OEPostE 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 CEhtmlE for assets the content of which is HTML, CEhtml_convert_linebreaksE for assets the content of which is HTML but where paragraph tags should be added automatically, or CEmarkdownE 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             (arrayEstringE) BERead OnlyE BEDeprecatedE An array of strings containing the MEidE URI of the OEGroupE object that this asset is mapped into, if any. This property has been superseded by the MEcontainerE property.
925              
926             =item source
927              
928             (AssetSource) BERead OnlyE 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             (setEstringE) BERead OnlyE BEDeprecatedE 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) BERead OnlyE The keyword identifying the type of asset this is.
937              
938             =item isFavoriteForCurrentUser
939              
940             (boolean) BERead OnlyE CEtrueE if this asset is a favorite for the currently authenticated user, or CEfalseE otherwise. This property is omitted from responses to anonymous requests.
941              
942             =item favoriteCount
943              
944             (integer) BERead OnlyE The number of distinct users who have added this asset as a favorite.
945              
946             =item commentCount
947              
948             (integer) BERead OnlyE 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) BERead OnlyE 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             (setEstringE) BEWrite OnlyE A set of identifiers for OEAccountE 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) BERead OnlyE BEDeprecatedE CEtrueE 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) BERead OnlyE BEDeprecatedE If this asset was created by 'reblogging' another asset, this property describes the original asset.
977              
978             =item reblogOfUrl
979              
980             (string) BERead OnlyE BEDeprecatedE 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) BERead OnlyE The total number of positive votes this asset has received via the NE/assets/{id}/cast-positive-voteE endpoint.
985              
986             =item negativeVoteCount
987              
988             (integer) BERead OnlyE The total number of negative votes this asset has received via the NE/assets/{id}/cast-negative-voteE endpoint.
989              
990             =item hasExtendedContent
991              
992             (boolean) BERead OnlyE CEtrueE if this asset has the extended content. This is currently supported only for OEPostE assets that are posted within a blog.
993              
994              
995             =back
996              
997             =cut
998              
999             sub post_to_post_assets {
1000 0     0 1   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 ListEPostE 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             (arrayEPostE) The items within the selected slice of the list.
1029              
1030              
1031             =back
1032              
1033             =cut
1034              
1035             sub get_post_assets {
1036 0     0 1   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             sub post_assets {
1045 0     0 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 ListEPostE 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             (arrayEPostE) The items within the selected slice of the list.
1071              
1072              
1073             =back
1074              
1075             =cut
1076              
1077             sub get_post_assets_by_category {
1078 0     0 1   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             sub post_assets_by_category {
1088 0     0 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 ListEPostE 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             (arrayEPostE) The items within the selected slice of the list.
1114              
1115              
1116             =back
1117              
1118             =cut
1119              
1120             sub get_post_assets_by_filename {
1121 0     0 1   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             sub post_assets_by_filename {
1131 0     0 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 ListEPostE 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             (arrayEPostE) The items within the selected slice of the list.
1157              
1158              
1159             =back
1160              
1161             =cut
1162              
1163             sub get_post_assets_by_month {
1164 0     0 1   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             sub post_assets_by_month {
1174 0     0 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 ListEPostE 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             (arrayEPostE) The items within the selected slice of the list.
1200              
1201              
1202             =back
1203              
1204             =cut
1205              
1206             sub get_published_post_assets_by_category {
1207 0     0 1   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             sub published_post_assets_by_category {
1217 0     0 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 ListEPostE 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             (arrayEPostE) The items within the selected slice of the list.
1243              
1244              
1245             =back
1246              
1247             =cut
1248              
1249             sub get_published_post_assets_by_month {
1250 0     0 1   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             sub published_post_assets_by_month {
1260 0     0 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 ListEPostE 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             (arrayEPostE) The items within the selected slice of the list.
1286              
1287              
1288             =back
1289              
1290             =cut
1291              
1292             sub get_published_recent_post_assets {
1293 0     0 1   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             sub published_recent_post_assets {
1302 0     0 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 ListEPostE 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             (arrayEPostE) The items within the selected slice of the list.
1328              
1329              
1330             =back
1331              
1332             =cut
1333              
1334             sub get_recent_post_assets {
1335 0     0 1   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             sub recent_post_assets {
1344 0     0 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             sub get_post_by_email_settings_by_user {
1373 0     0 1   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             sub post_by_email_settings_by_user {
1383 0     0 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             sub remove_category {
1408 0     0 1   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             (mapEintegerE) 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             sub get_stats {
1444 0     0 1   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             sub stats {
1453 0     0 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             sub upload_media_asset {
1467 0     0 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;