| 1 | package WWW::TypePad::ImportJobs; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | # Install an accessor into WWW::TypePad to access an instance of this class | ||
| 7 | # bound to the WWW::TypePad instance. | ||
| 8 | 0 | ▶ | sub WWW::TypePad::import_jobs { __PACKAGE__->new( base => $_[0] ) } |
|
Subroutine
import_jobs: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 9 | |||
| 10 | ### BEGIN auto-generated | ||
| 11 | ### This is an automatically generated code, do not edit! | ||
| 12 | ### Scroll down to look for END to add additional methods | ||
| 13 | |||
| 14 | =pod | ||
| 15 | |||
| 16 | =head1 NAME | ||
| 17 | |||
| 18 | WWW::TypePad::ImportJobs - ImportJobs API methods | ||
| 19 | |||
| 20 | =head1 METHODS | ||
| 21 | |||
| 22 | =cut | ||
| 23 | |||
| 24 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | 1 | ▶ | use Any::Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | 1 | extends 'WWW::TypePad::Noun'; | |
| 27 | |||
| 28 | 1 | ▶ | use Carp (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 29 | |||
| 30 | |||
| 31 | =pod | ||
| 32 | |||
| 33 | =over 4 | ||
| 34 | |||
| 35 | |||
| 36 | =item close_job | ||
| 37 | |||
| 38 | my $res = $tp->import_jobs->close_job($id); | ||
| 39 | |||
| 40 | Terminates a blog import job. | ||
| 41 | |||
| 42 | Returns hash reference which contains following properties. | ||
| 43 | |||
| 44 | =over 8 | ||
| 45 | |||
| 46 | |||
| 47 | =back | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | 0 | ▶ | sub close_job { |
|
Subroutine
close_job: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 52 | 0 | my $api = shift; | |
| 53 | 0 | my @args; | |
| 54 | 0 | push @args, shift; # id | |
| 55 | 0 | my $uri = sprintf '/import-jobs/%s/close-job.json', @args; | |
| 56 | 0 | $api->base->call("POST", $uri, @_); | |
| 57 | } | ||
| 58 | |||
| 59 | |||
| 60 | =pod | ||
| 61 | |||
| 62 | |||
| 63 | |||
| 64 | =item post_to_media_assets | ||
| 65 | |||
| 66 | my $res = $tp->import_jobs->post_to_media_assets($id); | ||
| 67 | |||
| 68 | Add a new media asset to the account that owns the blog associated with this import job. | ||
| 69 | |||
| 70 | Returns Asset which contains following properties. | ||
| 71 | |||
| 72 | =over 8 | ||
| 73 | |||
| 74 | =item id | ||
| 75 | |||
| 76 | (string) BE<lt>Read OnlyE<gt> A URI that serves as a globally unique identifier for the user. | ||
| 77 | |||
| 78 | =item urlId | ||
| 79 | |||
| 80 | (string) BE<lt>Read OnlyE<gt> A string containing the canonical identifier that can be used to identify this object in URLs. This can be used to recognise where the same user is returned in response to different requests, and as a mapping key for an application's local data store. | ||
| 81 | |||
| 82 | =item permalinkUrl | ||
| 83 | |||
| 84 | (string) BE<lt>Read OnlyE<gt> The URL that is this asset's permalink. This will be omitted if the asset does not have a permalink of its own (for example, if it's embedded in another asset) or if TypePad does not know its permalink. | ||
| 85 | |||
| 86 | =item shortUrl | ||
| 87 | |||
| 88 | (string) BE<lt>Read OnlyE<gt> The short version of the URL that is this asset's permalink. This is currently available only for OE<lt>PostE<gt> assetes. | ||
| 89 | |||
| 90 | =item author | ||
| 91 | |||
| 92 | (User) BE<lt>Read OnlyE<gt> The user who created the selected asset. | ||
| 93 | |||
| 94 | =item published | ||
| 95 | |||
| 96 | (datetime) BE<lt>Read OnlyE<gt> The time at which the asset was created, as a W3CDTF timestamp. | ||
| 97 | |||
| 98 | =item content | ||
| 99 | |||
| 100 | (string) The raw asset content. The ME<lt>textFormatE<gt> property describes how to format this data. Use this property to set the asset content in write operations. An asset posted in a group may have a ME<lt>contentE<gt> value up to 10,000 bytes long, while a OE<lt>PostE<gt> asset in a blog may have up to 65,000 bytes of content. | ||
| 101 | |||
| 102 | =item renderedContent | ||
| 103 | |||
| 104 | (string) BE<lt>Read OnlyE<gt> The content of this asset rendered to HTML. This is currently available only for OE<lt>PostE<gt> and OE<lt>PageE<gt> assets. | ||
| 105 | |||
| 106 | =item excerpt | ||
| 107 | |||
| 108 | (string) BE<lt>Read OnlyE<gt> A short, plain-text excerpt of the entry content. This is currently available only for OE<lt>PostE<gt> assets. | ||
| 109 | |||
| 110 | =item textFormat | ||
| 111 | |||
| 112 | (string) A keyword that indicates what formatting mode to use for the content of this asset. This can be CE<lt>htmlE<gt> for assets the content of which is HTML, CE<lt>html_convert_linebreaksE<gt> for assets the content of which is HTML but where paragraph tags should be added automatically, or CE<lt>markdownE<gt> for assets the content of which is Markdown source. Other formatting modes may be added in future. Applications that present assets for editing should use this property to present an appropriate editor. | ||
| 113 | |||
| 114 | =item groups | ||
| 115 | |||
| 116 | (arrayE<lt>stringE<gt>) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> An array of strings containing the ME<lt>idE<gt> URI of the OE<lt>GroupE<gt> object that this asset is mapped into, if any. This property has been superseded by the ME<lt>containerE<gt> property. | ||
| 117 | |||
| 118 | =item source | ||
| 119 | |||
| 120 | (AssetSource) BE<lt>Read OnlyE<gt> An object describing the site from which this asset was retrieved, if the asset was obtained from an external source. | ||
| 121 | |||
| 122 | =item objectTypes | ||
| 123 | |||
| 124 | (setE<lt>stringE<gt>) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> An array of object type identifier URIs identifying the type of this asset. Only the one object type URI for the particular type of asset this asset is will be present. | ||
| 125 | |||
| 126 | =item objectType | ||
| 127 | |||
| 128 | (string) BE<lt>Read OnlyE<gt> The keyword identifying the type of asset this is. | ||
| 129 | |||
| 130 | =item isFavoriteForCurrentUser | ||
| 131 | |||
| 132 | (boolean) BE<lt>Read OnlyE<gt> CE<lt>trueE<gt> if this asset is a favorite for the currently authenticated user, or CE<lt>falseE<gt> otherwise. This property is omitted from responses to anonymous requests. | ||
| 133 | |||
| 134 | =item favoriteCount | ||
| 135 | |||
| 136 | (integer) BE<lt>Read OnlyE<gt> The number of distinct users who have added this asset as a favorite. | ||
| 137 | |||
| 138 | =item commentCount | ||
| 139 | |||
| 140 | (integer) BE<lt>Read OnlyE<gt> The number of comments that have been posted in reply to this asset. This number includes comments that have been posted in response to other comments. | ||
| 141 | |||
| 142 | =item title | ||
| 143 | |||
| 144 | (string) The title of the asset. | ||
| 145 | |||
| 146 | =item description | ||
| 147 | |||
| 148 | (string) The description of the asset. | ||
| 149 | |||
| 150 | =item container | ||
| 151 | |||
| 152 | (ContainerRef) BE<lt>Read OnlyE<gt> An object describing the group or blog to which this asset belongs. | ||
| 153 | |||
| 154 | =item publicationStatus | ||
| 155 | |||
| 156 | (PublicationStatus) An object describing the visibility status and publication date for this asset. Only visibility status is editable. | ||
| 157 | |||
| 158 | =item crosspostAccounts | ||
| 159 | |||
| 160 | (setE<lt>stringE<gt>) BE<lt>Write OnlyE<gt> A set of identifiers for OE<lt>AccountE<gt> objects to which to crosspost this asset when it's posted. This property is omitted when retrieving existing assets. | ||
| 161 | |||
| 162 | =item isConversationsAnswer | ||
| 163 | |||
| 164 | (boolean) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> CE<lt>trueE<gt> if this asset is an answer to a TypePad Conversations question, or absent otherwise. This property is deprecated and will be replaced with something more useful in future. | ||
| 165 | |||
| 166 | =item reblogOf | ||
| 167 | |||
| 168 | (AssetRef) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> If this asset was created by 'reblogging' another asset, this property describes the original asset. | ||
| 169 | |||
| 170 | =item reblogOfUrl | ||
| 171 | |||
| 172 | (string) BE<lt>Read OnlyE<gt> BE<lt>DeprecatedE<gt> If this asset was created by 'reblogging' another asset or some other arbitrary web page, this property contains the URL of the item that was reblogged. | ||
| 173 | |||
| 174 | =item positiveVoteCount | ||
| 175 | |||
| 176 | (integer) BE<lt>Read OnlyE<gt> The total number of positive votes this asset has received via the NE<lt>/assets/{id}/cast-positive-voteE<gt> endpoint. | ||
| 177 | |||
| 178 | =item negativeVoteCount | ||
| 179 | |||
| 180 | (integer) BE<lt>Read OnlyE<gt> The total number of negative votes this asset has received via the NE<lt>/assets/{id}/cast-negative-voteE<gt> endpoint. | ||
| 181 | |||
| 182 | =item hasExtendedContent | ||
| 183 | |||
| 184 | (boolean) BE<lt>Read OnlyE<gt> CE<lt>trueE<gt> if this asset has the extended content. This is currently supported only for OE<lt>PostE<gt> assets that are posted within a blog. | ||
| 185 | |||
| 186 | |||
| 187 | =back | ||
| 188 | |||
| 189 | =cut | ||
| 190 | |||
| 191 | 0 | ▶ | sub post_to_media_assets { |
|
Subroutine
post_to_media_assets: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 192 | 0 | my $api = shift; | |
| 193 | 0 | my @args; | |
| 194 | 0 | push @args, shift; # id | |
| 195 | 0 | my $uri = sprintf '/import-jobs/%s/media-assets.json', @args; | |
| 196 | 0 | $api->base->call("POST", $uri, @_); | |
| 197 | } | ||
| 198 | |||
| 199 | |||
| 200 | =pod | ||
| 201 | |||
| 202 | |||
| 203 | |||
| 204 | =item submit_items | ||
| 205 | |||
| 206 | my $res = $tp->import_jobs->submit_items($id); | ||
| 207 | |||
| 208 | Imports a selection of items into a blog import job. | ||
| 209 | |||
| 210 | Returns hash reference which contains following properties. | ||
| 211 | |||
| 212 | =over 8 | ||
| 213 | |||
| 214 | |||
| 215 | =back | ||
| 216 | |||
| 217 | =cut | ||
| 218 | |||
| 219 | 0 | ▶ | sub submit_items { |
|
Subroutine
submit_items: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 220 | 0 | my $api = shift; | |
| 221 | 0 | my @args; | |
| 222 | 0 | push @args, shift; # id | |
| 223 | 0 | my $uri = sprintf '/import-jobs/%s/submit-items.json', @args; | |
| 224 | 0 | $api->base->call("POST", $uri, @_); | |
| 225 | } | ||
| 226 | |||
| 227 | |||
| 228 | =pod | ||
| 229 | |||
| 230 | =back | ||
| 231 | |||
| 232 | =cut | ||
| 233 | |||
| 234 | ### END auto-generated | ||
| 235 | |||
| 236 | 1 | 1; | |