SAY MEDIA > WWW-TypePad > WWW::TypePad::Assets

Download:
WWW-TypePad-0.4002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

WWW::TypePad::Assets - Assets API methods

METHODS ^

search
  my $res = $tp->assets->search();

Search for user-created content across the whole of TypePad.

Returns Stream<Asset> which contains following properties.

totalResults

(integer) The total number of items in the whole stream of which this response contains a subset. C<null> if an exact count cannot be determined.

estimatedTotalResults

(integer) An estimate of the total number of items in the whole list of which this response contains a subset. C<null> if a count cannot be determined at all, or if an exact count is returned in C<totalResults>.

moreResultsToken

(string) An opaque token that can be used as the C<start-token> parameter of a followup request to retrieve additional results. C<null> if there are no more results to retrieve, but the presence of this token does not guarantee that the response to a followup request will actually contain results.

entries

(array<Asset>) A selection of items from the underlying stream.

delete
  my $res = $tp->assets->delete($id);

Delete the selected asset and its associated events, comments and favorites.

Returns Asset which contains following properties.

id

(string) B<Read Only> A URI that serves as a globally unique identifier for the user.

urlId

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

shortUrl

(string) B<Read Only> The short version of the URL that is this asset's permalink. This is currently available only for O<Post> assetes.

author

(User) B<Read Only> The user who created the selected asset.

published

(datetime) B<Read Only> 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) B<Read Only> The content of this asset rendered to HTML. This is currently available only for O<Post> and O<Page> assets.

excerpt

(string) B<Read Only> 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<Read Only> 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) B<Read Only> An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.

objectTypes

(set<string>) B<Read Only> 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) B<Read Only> The keyword identifying the type of asset this is.

isFavoriteForCurrentUser

(boolean) B<Read Only> 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) B<Read Only> The number of distinct users who have added this asset as a favorite.

commentCount

(integer) B<Read Only> 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) B<Read Only> An object describing the group or blog to which this asset belongs.

publicationStatus

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

crosspostAccounts

(set<string>) B<Write Only> 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<Read Only> 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<Read Only> B<Deprecated> If this asset was created by 'reblogging' another asset, this property describes the original asset.

reblogOfUrl

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

positiveVoteCount

(integer) B<Read Only> The total number of positive votes this asset has received via the N</assets/{id}/cast-positive-vote> endpoint.

negativeVoteCount

(integer) B<Read Only> The total number of negative votes this asset has received via the N</assets/{id}/cast-negative-vote> endpoint.

hasExtendedContent

(boolean) B<Read Only> C<true> if this asset has the extended content. This is currently supported only for O<Post> assets that are posted within a blog.

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

Get basic information about the selected asset.

Returns Asset which contains following properties.

id

(string) B<Read Only> A URI that serves as a globally unique identifier for the user.

urlId

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

shortUrl

(string) B<Read Only> The short version of the URL that is this asset's permalink. This is currently available only for O<Post> assetes.

author

(User) B<Read Only> The user who created the selected asset.

published

(datetime) B<Read Only> 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) B<Read Only> The content of this asset rendered to HTML. This is currently available only for O<Post> and O<Page> assets.

excerpt

(string) B<Read Only> 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<Read Only> 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) B<Read Only> An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.

objectTypes

(set<string>) B<Read Only> 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) B<Read Only> The keyword identifying the type of asset this is.

isFavoriteForCurrentUser

(boolean) B<Read Only> 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) B<Read Only> The number of distinct users who have added this asset as a favorite.

commentCount

(integer) B<Read Only> 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) B<Read Only> An object describing the group or blog to which this asset belongs.

publicationStatus

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

crosspostAccounts

(set<string>) B<Write Only> 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<Read Only> 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<Read Only> B<Deprecated> If this asset was created by 'reblogging' another asset, this property describes the original asset.

reblogOfUrl

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

positiveVoteCount

(integer) B<Read Only> The total number of positive votes this asset has received via the N</assets/{id}/cast-positive-vote> endpoint.

negativeVoteCount

(integer) B<Read Only> The total number of negative votes this asset has received via the N</assets/{id}/cast-negative-vote> endpoint.

hasExtendedContent

(boolean) B<Read Only> C<true> if this asset has the extended content. This is currently supported only for O<Post> assets that are posted within a blog.

put
  my $res = $tp->assets->put($id);

Update the selected asset.

Returns Asset which contains following properties.

id

(string) B<Read Only> A URI that serves as a globally unique identifier for the user.

urlId

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

shortUrl

(string) B<Read Only> The short version of the URL that is this asset's permalink. This is currently available only for O<Post> assetes.

author

(User) B<Read Only> The user who created the selected asset.

published

(datetime) B<Read Only> 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) B<Read Only> The content of this asset rendered to HTML. This is currently available only for O<Post> and O<Page> assets.

excerpt

(string) B<Read Only> 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<Read Only> 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) B<Read Only> An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.

objectTypes

(set<string>) B<Read Only> 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) B<Read Only> The keyword identifying the type of asset this is.

isFavoriteForCurrentUser

(boolean) B<Read Only> 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) B<Read Only> The number of distinct users who have added this asset as a favorite.

commentCount

(integer) B<Read Only> 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) B<Read Only> An object describing the group or blog to which this asset belongs.

publicationStatus

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

crosspostAccounts

(set<string>) B<Write Only> 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<Read Only> 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<Read Only> B<Deprecated> If this asset was created by 'reblogging' another asset, this property describes the original asset.

reblogOfUrl

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

positiveVoteCount

(integer) B<Read Only> The total number of positive votes this asset has received via the N</assets/{id}/cast-positive-vote> endpoint.

negativeVoteCount

(integer) B<Read Only> The total number of negative votes this asset has received via the N</assets/{id}/cast-negative-vote> endpoint.

hasExtendedContent

(boolean) B<Read Only> C<true> if this asset has the extended content. This is currently supported only for O<Post> assets that are posted within a blog.

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

Send label argument to add a category to an asset

Returns hash reference which contains following properties.

cast_negative_vote
  my $res = $tp->assets->cast_negative_vote($id);

Send a negative vote/thumbs up for an asset.

Returns hash reference which contains following properties.

negativeVoteCount

(integer) The new sum of negative votes for the asset.

cast_positive_vote
  my $res = $tp->assets->cast_positive_vote($id);

Send a positive vote/thumbs up for an asset.

Returns hash reference which contains following properties.

positiveVoteCount

(integer) The new sum of positive votes for the asset.

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

Get a list of categories into which this asset has been placed within its blog. Currently supported only for O<Post> assets that are posted within a 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_comment_tree
  my $res = $tp->assets->get_comment_tree($id);

Get a list of assets that were posted in response to the selected asset and their depth in the response tree

Returns List<CommentTreeItem> 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<CommentTreeItem>) The items within the selected slice of the list.

post_to_comments
  my $res = $tp->assets->post_to_comments($id);

Create a new Comment asset as a response to the selected asset.

Returns Comment which contains following properties.

inReplyTo

(AssetRef) B<Read Only> A reference to the asset that this comment is in reply to.

root

(AssetRef) B<Read Only> A reference to the root asset that this comment is descended from. This will be the same as M<inReplyTo> unless this comment is a reply to another comment.

publicationStatus

(PublicationStatus) An object describing the visibility status and publication date for this page. Only visibility status is editable.

suppressEvents

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

commenter

(CommenterInfo) B<Read Only> A structure containing information about the author of this comment, which may be either an authenticated user or an unauthenticated user.

id

(string) B<Read Only> A URI that serves as a globally unique identifier for the user.

urlId

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

shortUrl

(string) B<Read Only> The short version of the URL that is this asset's permalink. This is currently available only for O<Post> assetes.

author

(User) B<Read Only> The user who created the selected asset.

published

(datetime) B<Read Only> 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) B<Read Only> The content of this asset rendered to HTML. This is currently available only for O<Post> and O<Page> assets.

excerpt

(string) B<Read Only> 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<Read Only> 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) B<Read Only> An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.

objectTypes

(set<string>) B<Read Only> 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) B<Read Only> The keyword identifying the type of asset this is.

isFavoriteForCurrentUser

(boolean) B<Read Only> 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) B<Read Only> The number of distinct users who have added this asset as a favorite.

commentCount

(integer) B<Read Only> 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) B<Read Only> An object describing the group or blog to which this asset belongs.

publicationStatus

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

crosspostAccounts

(set<string>) B<Write Only> 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<Read Only> 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<Read Only> B<Deprecated> If this asset was created by 'reblogging' another asset, this property describes the original asset.

reblogOfUrl

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

positiveVoteCount

(integer) B<Read Only> The total number of positive votes this asset has received via the N</assets/{id}/cast-positive-vote> endpoint.

negativeVoteCount

(integer) B<Read Only> The total number of negative votes this asset has received via the N</assets/{id}/cast-negative-vote> endpoint.

hasExtendedContent

(boolean) B<Read Only> C<true> if this asset has the extended content. This is currently supported only for O<Post> assets that are posted within a blog.

get_comments
  my $res = $tp->assets->get_comments($id);

Get a list of assets that were posted in response to the selected asset.

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_extended_content
  my $res = $tp->assets->get_extended_content($id);

Get the extended content for the asset, if any. Currently supported only for O<Post> assets that are posted within a blog.

Returns AssetExtendedContent which contains following properties.

renderedExtendedContent

(string) The HTML rendered version of this asset's extended content, if it has any. Otherwise, this property is omitted.

get_favorites
  my $res = $tp->assets->get_favorites($id);

Get a list of favorites that have been created for the selected asset.

Returns List<Favorite> 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<Favorite>) The items within the selected slice of the list.

get_feedback_status
  my $res = $tp->assets->get_feedback_status($id);

Get the feedback status of the selected asset.

Returns FeedbackStatus which contains following properties.

allowComments

(boolean) C<true> if new comments may be posted to the related asset, or C<false> if no new comments are accepted.

showComments

(boolean) C<true> if comments should be displayed on the related asset's permalink page, or C<false> if they should be hidden.

allowTrackback

(boolean) C<true> if new trackback pings may be posted to the related asset, or C<false> if no new pings are accepted.

put_feedback_status
  my $res = $tp->assets->put_feedback_status($id);

Set the feedback status of the selected asset.

Returns FeedbackStatus which contains following properties.

allowComments

(boolean) C<true> if new comments may be posted to the related asset, or C<false> if no new comments are accepted.

showComments

(boolean) C<true> if comments should be displayed on the related asset's permalink page, or C<false> if they should be hidden.

allowTrackback

(boolean) C<true> if new trackback pings may be posted to the related asset, or C<false> if no new pings are accepted.

make_comment_preview
  my $res = $tp->assets->make_comment_preview($id);

Send relevant data to get back a model of what the submitted comment will look like.

Returns hash reference which contains following properties.

comment

(Asset) A mockup of the future comment.

get_media_assets
  my $res = $tp->assets->get_media_assets($id);

Get a list of media assets that are embedded in the content of the selected asset.

Returns List<Asset> 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<Asset>) The items within the selected slice of the list.

get_publication_status
  my $res = $tp->assets->get_publication_status($id);

Get the publication status of the selected asset.

Returns PublicationStatus which contains following properties.

publicationDate

(string) The time at which the related asset was (or will be) published, as a W3CDTF timestamp. If the related asset has been scheduled to be posted later, this property's timestamp will be in the future.

draft

(boolean) C<true> if this asset is private (not yet published), or C<false> if it has been published.

put_publication_status
  my $res = $tp->assets->put_publication_status($id);

Set the publication status of the selected asset.

Returns PublicationStatus which contains following properties.

publicationDate

(string) The time at which the related asset was (or will be) published, as a W3CDTF timestamp. If the related asset has been scheduled to be posted later, this property's timestamp will be in the future.

draft

(boolean) C<true> if this asset is private (not yet published), or C<false> if it has been published.

get_reblogs
  my $res = $tp->assets->get_reblogs($id);

Get a list of posts that were posted as reblogs of the selected asset.

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.

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

Send label argument to remove a category from an asset

Returns hash reference which contains following properties.

update_publication_status
  my $res = $tp->assets->update_publication_status($id);

Adjust publication status of an asset

Returns hash reference which contains following properties.

get_trending
  my $res = $tp->assets->get_trending();

Gets a stream of trending assets across TypePad

Returns Stream<Asset> which contains following properties.

totalResults

(integer) The total number of items in the whole stream of which this response contains a subset. C<null> if an exact count cannot be determined.

estimatedTotalResults

(integer) An estimate of the total number of items in the whole list of which this response contains a subset. C<null> if a count cannot be determined at all, or if an exact count is returned in C<totalResults>.

moreResultsToken

(string) An opaque token that can be used as the C<start-token> parameter of a followup request to retrieve additional results. C<null> if there are no more results to retrieve, but the presence of this token does not guarantee that the response to a followup request will actually contain results.

entries

(array<Asset>) A selection of items from the underlying stream.

syntax highlighting: