The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::TypePad::Blogs - Blogs API methods

METHODS

get
  my $res = $tp->blogs->get($id);

Get basic information about the selected blog.

Returns Blog which contains following properties.

id

(string) A URI that serves as a globally unique identifier for the object.

urlId

(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.

title

(string) The title of the blog.

homeUrl

(string) The URL of the blog's home page.

owner

(User) The user who owns the blog.

description

(string) The description of the blog as provided by its owner.

objectTypes

(set<string>) B<Deprecated> An array of object type identifier URIs. This set will contain the string C<tag:api.typepad.com,2009:Blog> for a Blog object.

objectType

(string) The keyword identifying the type of object this is. For a Blog object, M<objectType> will be C<Blog>.

add_category
  my $res = $tp->blogs->add_category($id);

Send label argument to remove a category from the blog

Returns hash reference which contains following properties.

begin_import
  my $res = $tp->blogs->begin_import($id);

Begin an import into the selected blog.

Returns hash reference which contains following properties.

job

(ImporterJob) The O<ImporterJob> object representing the job that was created.

get_categories
  my $res = $tp->blogs->get_categories($id);

Get a list of categories which are defined for the selected blog.

Returns List<string> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<string>) The items within the selected slice of the list.

get_commenting_settings
  my $res = $tp->blogs->get_commenting_settings($id);

Get the commenting-related settings for this blog.

Returns BlogCommentingSettings which contains following properties.

signinAllowed

(boolean) C<true> if this blog allows users to sign in to comment, or C<false> if all new comments are anonymous.

signinRequired

(boolean) C<true> if this blog requires users to be logged in in order to leave a comment, or C<false> if anonymous comments will be rejected.

emailAddressRequired

(boolean) C<true> if this blog requires anonymous comments to be submitted with an email address, or C<false> otherwise.

captchaRequired

(boolean) C<true> if this blog requires anonymous commenters to pass a CAPTCHA before submitting a comment, or C<false> otherwise.

moderationEnabled

(boolean) C<true> if this blog places new comments into a moderation queue for approval before they are displayed, or C<false> if new comments may be available immediately.

timeLimit

(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.

htmlAllowed

(boolean) C<true> if this blog allows commenters to use basic HTML formatting in comments, or C<false> if HTML will be removed.

urlsAutoLinked

(boolean) C<true> if comments in this blog will automatically have any bare URLs turned into links, or C<false> if URLs will be shown unlinked.

get_published_comments
  my $res = $tp->blogs->get_published_comments($id);

Return a pageable list of published comments associated with the selected blog

Returns List<Comment> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Comment>) The items within the selected slice of the list.

get_published_recent_comments
  my $res = $tp->blogs->get_published_recent_comments($id);

Return the fifty most recent published comments associated with the selected blog

Returns List<Comment> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Comment>) The items within the selected slice of the list.

get_crosspost_accounts
  my $res = $tp->blogs->get_crosspost_accounts($id);

Get a list of accounts that can be used for crossposting with this blog.

Returns List<Account> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Account>) The items within the selected slice of the list.

discover_external_post_asset
  my $res = $tp->blogs->discover_external_post_asset($id);

If the selected blog is a connected blog, create or retrieve the external post stub for the given permalink.

Returns hash reference which contains following properties.

asset

(Asset) The asset that acts as a stub for the given permalink.

post_to_media_assets
  my $res = $tp->blogs->post_to_media_assets($id);

Add a new media asset to the account that owns this blog.

Returns Asset which contains following properties.

id

(string) A URI that serves as a globally unique identifier for the user.

urlId

(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.

permalinkUrl

(string) 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.

author

(User) The user who created the selected asset.

published

(string) The time at which the asset was created, as a W3CDTF timestamp.

content

(string) The raw asset content. The M<textFormat> 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 M<content> value up to 10,000 bytes long, while a O<Post> asset in a blog may have up to 65,000 bytes of content.

renderedContent

(string) The content of this asset rendered to HTML. This is currently available only for O<Post> and O<Page> assets.

excerpt

(string) A short, plain-text excerpt of the entry content. This is currently available only for O<Post> assets.

textFormat

(string) A keyword that indicates what formatting mode to use for the content of this asset. This can be C<html> for assets the content of which is HTML, C<html_convert_linebreaks> for assets the content of which is HTML but where paragraph tags should be added automatically, or C<markdown> 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.

groups

(array<string>) B<Deprecated> An array of strings containing the M<id> URI of the O<Group> object that this asset is mapped into, if any. This property has been superseded by the M<container> property.

source

(AssetSource) An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.

objectTypes

(set<string>) B<Deprecated> 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.

objectType

(string) The keyword identifying the type of asset this is.

isFavoriteForCurrentUser

(boolean) C<true> if this asset is a favorite for the currently authenticated user, or C<false> otherwise. This property is omitted from responses to anonymous requests.

favoriteCount

(integer) The number of distinct users who have added this asset as a favorite.

commentCount

(integer) 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.

title

(string) The title of the asset.

description

(string) The description of the asset.

container

(ContainerRef) An object describing the group or blog to which this asset belongs.

publicationStatus

(PublicationStatus) B<Editable> An object describing the visibility status and publication date for this asset. Only visibility status is editable.

crosspostAccounts

(set<string>) B<Editable> A set of identifiers for O<Account> objects to which to crosspost this asset when it's posted. This property is omitted when retrieving existing assets.

isConversationsAnswer

(boolean) B<Deprecated> C<true> 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.

reblogOf

(AssetRef) B<Deprecated> If this asset was created by 'reblogging' another asset, this property describes the original asset.

reblogOfUrl

(string) B<Deprecated> 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.

post_to_page_assets
  my $res = $tp->blogs->post_to_page_assets($id);

Add a new page to a blog

Returns Page which contains following properties.

filename

(string) B<Editable> The base name of the page, used to create the M<permalinkUrl>.

(array<ImageLink>) A list of links to the images that are embedded within the content of this page.

title

(string) B<Editable> The title of the page.

description

(string) B<Editable> The description of the page.

textFormat

(string) B<Editable> A keyword that indicates what formatting mode to use for the content of this page. This can be C<html> for assets the content of which is HTML, C<html_convert_linebreaks> for assets the content of which is HTML but where paragraph tags should be added automatically, or C<markdown> 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.

publicationStatus

(PublicationStatus) B<Editable> An object describing the draft status and publication date for this page.

feedbackStatus

(FeedbackStatus) B<Editable> An object describing the comment and trackback behavior for this page.

suppressEvents

(boolean) B<Editable> 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.

id

(string) A URI that serves as a globally unique identifier for the user.

urlId

(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.

permalinkUrl

(string) 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.

author

(User) The user who created the selected asset.

published

(string) The time at which the asset was created, as a W3CDTF timestamp.

content

(string) The raw asset content. The M<textFormat> 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 M<content> value up to 10,000 bytes long, while a O<Post> asset in a blog may have up to 65,000 bytes of content.

renderedContent

(string) The content of this asset rendered to HTML. This is currently available only for O<Post> and O<Page> assets.

excerpt

(string) A short, plain-text excerpt of the entry content. This is currently available only for O<Post> assets.

textFormat

(string) A keyword that indicates what formatting mode to use for the content of this asset. This can be C<html> for assets the content of which is HTML, C<html_convert_linebreaks> for assets the content of which is HTML but where paragraph tags should be added automatically, or C<markdown> 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.

groups

(array<string>) B<Deprecated> An array of strings containing the M<id> URI of the O<Group> object that this asset is mapped into, if any. This property has been superseded by the M<container> property.

source

(AssetSource) An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.

objectTypes

(set<string>) B<Deprecated> 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.

objectType

(string) The keyword identifying the type of asset this is.

isFavoriteForCurrentUser

(boolean) C<true> if this asset is a favorite for the currently authenticated user, or C<false> otherwise. This property is omitted from responses to anonymous requests.

favoriteCount

(integer) The number of distinct users who have added this asset as a favorite.

commentCount

(integer) 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.

title

(string) The title of the asset.

description

(string) The description of the asset.

container

(ContainerRef) An object describing the group or blog to which this asset belongs.

publicationStatus

(PublicationStatus) B<Editable> An object describing the visibility status and publication date for this asset. Only visibility status is editable.

crosspostAccounts

(set<string>) B<Editable> A set of identifiers for O<Account> objects to which to crosspost this asset when it's posted. This property is omitted when retrieving existing assets.

isConversationsAnswer

(boolean) B<Deprecated> C<true> 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.

reblogOf

(AssetRef) B<Deprecated> If this asset was created by 'reblogging' another asset, this property describes the original asset.

reblogOfUrl

(string) B<Deprecated> 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.

get_page_assets
  my $res = $tp->blogs->get_page_assets($id);

Get a list of pages associated with the selected blog.

Returns List<Page> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Page>) The items within the selected slice of the list.

post_to_post_assets
  my $res = $tp->blogs->post_to_post_assets($id);

Add a new post to a blog

Returns Post which contains following properties.

categories

(array<string>) B<Editable> A list of categories associated with the post.

embeddedImageLinks

(array<ImageLink>) A list of links to the images that are embedded within the content of this post.

(array<VideoLink>) A list of links to the videos that are embedded within the content of this post.

(array<AudioLink>) A list of links to the audio streams that are embedded within the content of this post.

title

(string) B<Editable> The title of the post.

description

(string) B<Editable> The description of the post.

filename

(string) B<Editable> The base name of the post to use when creating its M<permalinkUrl>.

content

(string) B<Editable> The raw post content. The M<textFormat> property defines what format this data is in.

textFormat

(string) B<Editable> A keyword that indicates what formatting mode to use for the content of this post. This can be C<html> for assets the content of which is HTML, C<html_convert_linebreaks> for assets the content of which is HTML but where paragraph tags should be added automatically, or C<markdown> 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.

publicationStatus

(PublicationStatus) B<Editable> An object describing the draft status and publication date for this post.

feedbackStatus

(FeedbackStatus) B<Editable> An object describing the comment and trackback behavior for this post.

reblogCount

(integer) The number of times this post has been reblogged by other people.

reblogOf

(AssetRef) A reference to a post of which this post is a reblog.

suppressEvents

(boolean) B<Editable> 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.

id

(string) A URI that serves as a globally unique identifier for the user.

urlId

(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.

permalinkUrl

(string) 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.

author

(User) The user who created the selected asset.

published

(string) The time at which the asset was created, as a W3CDTF timestamp.

content

(string) The raw asset content. The M<textFormat> 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 M<content> value up to 10,000 bytes long, while a O<Post> asset in a blog may have up to 65,000 bytes of content.

renderedContent

(string) The content of this asset rendered to HTML. This is currently available only for O<Post> and O<Page> assets.

excerpt

(string) A short, plain-text excerpt of the entry content. This is currently available only for O<Post> assets.

textFormat

(string) A keyword that indicates what formatting mode to use for the content of this asset. This can be C<html> for assets the content of which is HTML, C<html_convert_linebreaks> for assets the content of which is HTML but where paragraph tags should be added automatically, or C<markdown> 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.

groups

(array<string>) B<Deprecated> An array of strings containing the M<id> URI of the O<Group> object that this asset is mapped into, if any. This property has been superseded by the M<container> property.

source

(AssetSource) An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.

objectTypes

(set<string>) B<Deprecated> 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.

objectType

(string) The keyword identifying the type of asset this is.

isFavoriteForCurrentUser

(boolean) C<true> if this asset is a favorite for the currently authenticated user, or C<false> otherwise. This property is omitted from responses to anonymous requests.

favoriteCount

(integer) The number of distinct users who have added this asset as a favorite.

commentCount

(integer) 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.

title

(string) The title of the asset.

description

(string) The description of the asset.

container

(ContainerRef) An object describing the group or blog to which this asset belongs.

publicationStatus

(PublicationStatus) B<Editable> An object describing the visibility status and publication date for this asset. Only visibility status is editable.

crosspostAccounts

(set<string>) B<Editable> A set of identifiers for O<Account> objects to which to crosspost this asset when it's posted. This property is omitted when retrieving existing assets.

isConversationsAnswer

(boolean) B<Deprecated> C<true> 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.

reblogOf

(AssetRef) B<Deprecated> If this asset was created by 'reblogging' another asset, this property describes the original asset.

reblogOfUrl

(string) B<Deprecated> 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.

get_post_assets
  my $res = $tp->blogs->get_post_assets($id);

Get a list of posts associated with the selected blog.

Returns List<Post> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Post>) The items within the selected slice of the list.

get_post_assets_by_category
  my $res = $tp->blogs->get_post_assets_by_category($id, $category);

Get all visibile posts in the selected blog that have been assigned to the given category.

Returns List<Post> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Post>) The items within the selected slice of the list.

get_post_assets_by_filename
  my $res = $tp->blogs->get_post_assets_by_filename($id, $fileRef);

Get zero or one posts matching the given year, month and filename.

Returns List<Post> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Post>) The items within the selected slice of the list.

get_post_assets_by_month
  my $res = $tp->blogs->get_post_assets_by_month($id, $month);

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".

Returns List<Post> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Post>) The items within the selected slice of the list.

get_published_post_assets_by_category
  my $res = $tp->blogs->get_published_post_assets_by_category($id, $category);

Get the published posts in the selected blog that have been assigned to the given category.

Returns List<Post> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Post>) The items within the selected slice of the list.

get_published_post_assets_by_month
  my $res = $tp->blogs->get_published_post_assets_by_month($id, $month);

Get the posts that were published within the selected month (YYYY-MM) from the selected blog.

Returns List<Post> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Post>) The items within the selected slice of the list.

get_published_recent_post_assets
  my $res = $tp->blogs->get_published_recent_post_assets($id);

Get the most recent 50 published posts in the selected blog.

Returns List<Post> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Post>) The items within the selected slice of the list.

get_recent_post_assets
  my $res = $tp->blogs->get_recent_post_assets($id);

Get the most recent 50 posts in the selected blog, including draft and scheduled posts.

Returns List<Post> which contains following properties.

totalResults

(integer) The total number of items in the whole list of which this list object is a paginated view.

entries

(array<Post>) The items within the selected slice of the list.

get_post_by_email_settings_by_user
  my $res = $tp->blogs->get_post_by_email_settings_by_user($id, $userId);

Get the selected user's post-by-email address

Returns PostByEmailAddress which contains following properties.

emailAddress

(string) A private email address for posting via email.

remove_category
  my $res = $tp->blogs->remove_category($id);

Send label argument to remove a category from the blog

Returns hash reference which contains following properties.

get_stats
  my $res = $tp->blogs->get_stats($id);

Get data about the pageviews for the selected blog.

Returns BlogStats which contains following properties.

totalPageViews

(integer) The total number of page views received by the blog for all time.

dailyPageViews

(map<integer>) 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.