| 1 | package IO::Iron::IronWorker::Api; | ||
| 2 | |||
| 3 | ## no critic (Documentation::RequirePodAtEnd) | ||
| 4 | ## no critic (Documentation::RequirePodSections) | ||
| 5 | |||
| 6 | 4 | ▶ | use 5.010_000; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | # Global Creator | ||
| 11 | ▶ | BEGIN { | |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | # No exports. | ||
| 13 | } | ||
| 14 | |||
| 15 | # Global Destructor | ||
| 16 | ▶ | END { | |
|
Subroutine
END: called CC=1 SCAR=0.0
| |||
| 17 | } | ||
| 18 | |||
| 19 | |||
| 20 | # ABSTRACT: IronWorker API reference for Perl Client Libraries! | ||
| 21 | |||
| 22 | 4 | our $VERSION = '0.12_01'; # TRIAL VERSION: generated by DZP::OurPkgVersion | |
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | |||
| 27 | sub IRONWORKER_LIST_CODE_PACKAGES { | ||
| 28 | return { | ||
| 29 | 0 | ▶ | 'action_name' => 'IRONWORKER_LIST_CODE_PACKAGES', |
|
Subroutine
IRONWORKER_LIST_CODE_PACKAGES: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 30 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/codes', | ||
| 31 | 'action' => 'GET', | ||
| 32 | 'return' => 'LIST:codes', | ||
| 33 | 'retry' => 0, | ||
| 34 | 'require_body' => 0, | ||
| 35 | 'paged' => 1, | ||
| 36 | 'per_page' => 100, | ||
| 37 | 'url_escape' => { '{Project ID}' => 1 }, | ||
| 38 | 'log_message' => '(project={Project ID}). Listed code packages.', | ||
| 39 | }; | ||
| 40 | } | ||
| 41 | |||
| 42 | |||
| 43 | sub IRONWORKER_UPLOAD_OR_UPDATE_A_CODE_PACKAGE { | ||
| 44 | return { | ||
| 45 | 0 | ▶ | 'action_name' => 'IRONWORKER_UPLOAD_OR_UPDATE_A_CODE_PACKAGE', |
|
Subroutine
IRONWORKER_UPLOAD_OR_UPDATE_A_CODE_PACKAGE: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 46 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/codes', | ||
| 47 | 'action' => 'POST', | ||
| 48 | 'return' => 'HASH', | ||
| 49 | 'retry' => 1, | ||
| 50 | 'require_body' => 1, | ||
| 51 | 'request_fields' => { 'name' => 1, 'file' => 1, 'file_name' => 1, 'runtime' => 1, 'config' => 1, 'max_concurrency' => 1, 'retries' => 1, 'retries_delay' => 1 }, | ||
| 52 | 'url_escape' => { '{Project ID}' => 1 }, | ||
| 53 | 'content_type' => 'multipart', | ||
| 54 | 'log_message' => '(project={Project ID}). Uploaded or updated a code package.', | ||
| 55 | }; | ||
| 56 | } | ||
| 57 | |||
| 58 | |||
| 59 | sub IRONWORKER_GET_INFO_ABOUT_A_CODE_PACKAGE { | ||
| 60 | return { | ||
| 61 | 0 | ▶ | 'action_name' => 'IRONWORKER_GET_INFO_ABOUT_A_CODE_PACKAGE', |
|
Subroutine
IRONWORKER_GET_INFO_ABOUT_A_CODE_PACKAGE: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 62 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/codes/{Code ID}', | ||
| 63 | 'action' => 'GET', | ||
| 64 | 'return' => 'HASH', | ||
| 65 | 'retry' => 1, | ||
| 66 | 'require_body' => 0, | ||
| 67 | 'url_escape' => { '{Project ID}' => 1, '{Code ID}' => 1 }, | ||
| 68 | 'log_message' => '(project={Project ID}, code={Code ID}). Got info about a code package.', | ||
| 69 | }; | ||
| 70 | } | ||
| 71 | |||
| 72 | |||
| 73 | sub IRONWORKER_DELETE_A_CODE_PACKAGE { | ||
| 74 | return { | ||
| 75 | 0 | ▶ | 'action_name' => 'IRONWORKER_DELETE_A_CODE_PACKAGE', |
|
Subroutine
IRONWORKER_DELETE_A_CODE_PACKAGE: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 76 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/codes/{Code ID}', | ||
| 77 | 'action' => 'DELETE', | ||
| 78 | 'return' => 'MESSAGE', | ||
| 79 | 'retry' => 1, | ||
| 80 | 'require_body' => 0, | ||
| 81 | 'url_escape' => { '{Project ID}' => 1, '{Code ID}' => 1 }, | ||
| 82 | 'log_message' => '(project={Project ID}, code={Code ID}). Deleted a code package.', | ||
| 83 | }; | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | sub IRONWORKER_DOWNLOAD_A_CODE_PACKAGE { | ||
| 88 | return { | ||
| 89 | 0 | ▶ | 'action_name' => 'IRONWORKER_DOWNLOAD_A_CODE_PACKAGE', |
|
Subroutine
IRONWORKER_DOWNLOAD_A_CODE_PACKAGE: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 90 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/codes/{Code ID}/download', | ||
| 91 | 'action' => 'GET', | ||
| 92 | 'return' => 'BINARY', | ||
| 93 | 'retry' => 1, | ||
| 94 | 'require_body' => 0, | ||
| 95 | 'url_params' => { 'revision' => 1 }, | ||
| 96 | 'url_escape' => { '{Project ID}' => 1, '{Code ID}' => 1 }, | ||
| 97 | 'log_message' => '(project={Project ID}, code={Code ID}). Downloaded a code package.', | ||
| 98 | }; | ||
| 99 | } | ||
| 100 | |||
| 101 | |||
| 102 | sub IRONWORKER_LIST_CODE_PACKAGE_REVISIONS { | ||
| 103 | return { | ||
| 104 | 0 | ▶ | 'action_name' => 'IRONWORKER_LIST_CODE_PACKAGE_REVISIONS', |
|
Subroutine
IRONWORKER_LIST_CODE_PACKAGE_REVISIONS: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 105 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/codes/{Code ID}/revisions', | ||
| 106 | 'action' => 'GET', | ||
| 107 | 'return' => 'LIST:revisions', | ||
| 108 | 'retry' => 1, | ||
| 109 | 'require_body' => 0, | ||
| 110 | 'paged' => 1, | ||
| 111 | 'per_page' => 100, | ||
| 112 | 'url_escape' => { '{Project ID}' => 1, '{Code ID}' => 1 }, | ||
| 113 | 'log_message' => '(project={Project ID}, code={Code ID}). Listed code package revisions.', | ||
| 114 | }; | ||
| 115 | } | ||
| 116 | |||
| 117 | |||
| 118 | sub IRONWORKER_LIST_TASKS { | ||
| 119 | return { | ||
| 120 | 0 | ▶ | 'action_name' => 'IRONWORKER_LIST_TASKS', |
|
Subroutine
IRONWORKER_LIST_TASKS: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 121 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/tasks', | ||
| 122 | 'action' => 'GET', | ||
| 123 | 'return' => 'LIST:tasks', | ||
| 124 | 'retry' => 1, | ||
| 125 | 'require_body' => 0, | ||
| 126 | 'paged' => 1, | ||
| 127 | 'per_page' => 100, | ||
| 128 | 'url_params' => { 'code_name' => 1, 'queued' => 1, 'running' => 1, 'complete' => 1, 'error' => 1, 'cancelled' => 1, 'killed' => 1, 'timeout' => 1, 'from_time' => 1, 'to_time' => 1 }, | ||
| 129 | 'url_escape' => { '{Project ID}' => 1, 'code_name' => 1 }, | ||
| 130 | 'log_message' => '(project={Project ID}). Listed tasks.', | ||
| 131 | }; | ||
| 132 | } | ||
| 133 | |||
| 134 | |||
| 135 | sub IRONWORKER_QUEUE_A_TASK { | ||
| 136 | return { | ||
| 137 | 0 | ▶ | 'action_name' => 'IRONWORKER_QUEUE_A_TASK', |
|
Subroutine
IRONWORKER_QUEUE_A_TASK: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 138 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/tasks', | ||
| 139 | 'action' => 'POST', | ||
| 140 | 'return' => 'HASH', | ||
| 141 | 'retry' => 1, | ||
| 142 | 'require_body' => 1, | ||
| 143 | 'request_fields' => { 'tasks' => 1 }, | ||
| 144 | 'url_escape' => { '{Project ID}' => 1 }, | ||
| 145 | 'log_message' => '(project={Project ID}). Queued tasks.', | ||
| 146 | }; | ||
| 147 | } | ||
| 148 | |||
| 149 | |||
| 150 | sub IRONWORKER_QUEUE_A_TASK_FROM_A_WEBHOOK { | ||
| 151 | return { | ||
| 152 | 0 | ▶ | 'action_name' => 'IRONWORKER_QUEUE_A_TASK_FROM_A_WEBHOOK', |
|
Subroutine
IRONWORKER_QUEUE_A_TASK_FROM_A_WEBHOOK: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 153 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/tasks/webhook', | ||
| 154 | 'action' => 'POST', | ||
| 155 | 'return' => 'HASH', | ||
| 156 | 'retry' => 1, | ||
| 157 | 'require_body' => 1, | ||
| 158 | 'url_params' => { 'code_name' => 1 }, | ||
| 159 | 'url_escape' => { '{Project ID}' => 1 }, | ||
| 160 | 'log_message' => '(project={Project ID}). Queued tasks.', | ||
| 161 | }; # Request body will be passed along as the payload for the task. | ||
| 162 | } | ||
| 163 | |||
| 164 | |||
| 165 | |||
| 166 | |||
| 167 | sub IRONWORKER_GET_INFO_ABOUT_A_TASK { | ||
| 168 | return { | ||
| 169 | 0 | ▶ | 'action_name' => 'IRONWORKER_GET_INFO_ABOUT_A_TASK', |
|
Subroutine
IRONWORKER_GET_INFO_ABOUT_A_TASK: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 170 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/tasks/{Task ID}', | ||
| 171 | 'action' => 'GET', | ||
| 172 | 'return' => 'HASH', | ||
| 173 | 'retry' => 1, | ||
| 174 | 'require_body' => 0, | ||
| 175 | 'url_escape' => { '{Project ID}' => 1, '{Task ID}' => 1 }, | ||
| 176 | 'log_message' => '(project={Project ID}, code={Task ID}). Got info about a task.', | ||
| 177 | }; | ||
| 178 | } | ||
| 179 | |||
| 180 | |||
| 181 | sub IRONWORKER_GET_A_TASKS_LOG { | ||
| 182 | return { | ||
| 183 | 0 | ▶ | 'action_name' => 'IRONWORKER_GET_A_TASKS_LOG', |
|
Subroutine
IRONWORKER_GET_A_TASKS_LOG: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 184 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/tasks/{Task ID}/log', | ||
| 185 | 'action' => 'GET', | ||
| 186 | 'return' => 'PLAIN_TEXT', | ||
| 187 | 'retry' => 1, | ||
| 188 | 'require_body' => 0, | ||
| 189 | 'url_escape' => { '{Project ID}' => 1, '{Task ID}' => 1 }, | ||
| 190 | 'log_message' => '(project={Project ID}, code={Task ID}). Got a task\'s log.', | ||
| 191 | }; # Return plain text, not JSON! | ||
| 192 | } | ||
| 193 | |||
| 194 | |||
| 195 | sub IRONWORKER_CANCEL_A_TASK { | ||
| 196 | return { | ||
| 197 | 0 | ▶ | 'action_name' => 'IRONWORKER_CANCEL_A_TASK', |
|
Subroutine
IRONWORKER_CANCEL_A_TASK: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 198 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/tasks/{Task ID}/cancel', | ||
| 199 | 'action' => 'POST', | ||
| 200 | 'return' => 'MESSAGE', | ||
| 201 | 'retry' => 1, | ||
| 202 | 'require_body' => 0, | ||
| 203 | 'url_escape' => { '{Project ID}' => 1, '{Task ID}' => 1, }, | ||
| 204 | 'log_message' => '(project={Project ID}, task={Task ID}). Cancelled a task.', | ||
| 205 | }; | ||
| 206 | } | ||
| 207 | |||
| 208 | |||
| 209 | sub IRONWORKER_SET_A_TASKS_PROGRESS { | ||
| 210 | return { | ||
| 211 | 0 | ▶ | 'action_name' => 'IRONWORKER_SET_A_TASKS_PROGRESS', |
|
Subroutine
IRONWORKER_SET_A_TASKS_PROGRESS: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 212 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/tasks/{Task ID}/progress', | ||
| 213 | 'action' => 'POST', | ||
| 214 | 'return' => 'MESSAGE', | ||
| 215 | 'retry' => 1, | ||
| 216 | 'require_body' => 1, | ||
| 217 | 'request_fields' => { 'percent' => 1, 'msg' => 1 }, | ||
| 218 | 'url_escape' => { '{Project ID}' => 1, '{Task ID}' => 1 }, | ||
| 219 | 'log_message' => '(project={Project ID}, code={Task ID}). Set task\'s progress.', | ||
| 220 | }; | ||
| 221 | } | ||
| 222 | |||
| 223 | |||
| 224 | sub IRONWORKER_RETRY_A_TASK { | ||
| 225 | return { | ||
| 226 | 0 | ▶ | 'action_name' => 'IRONWORKER_RETRY_A_TASK', |
|
Subroutine
IRONWORKER_RETRY_A_TASK: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 227 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/tasks/{Task ID}/retry', | ||
| 228 | 'action' => 'POST', | ||
| 229 | 'return' => 'MESSAGE', | ||
| 230 | 'retry' => 1, | ||
| 231 | 'require_body' => 1, | ||
| 232 | 'request_fields' => { 'delay' => 1 }, | ||
| 233 | 'url_escape' => { '{Project ID}' => 1, '{Task ID}' => 1 }, | ||
| 234 | 'log_message' => '(project={Project ID}, code={Task ID}, delay={delay}). Task queued for retry.', | ||
| 235 | }; | ||
| 236 | } | ||
| 237 | |||
| 238 | |||
| 239 | sub IRONWORKER_LIST_SCHEDULED_TASKS { | ||
| 240 | return { | ||
| 241 | 0 | ▶ | 'action_name' => 'IRONWORKER_LIST_SCHEDULED_TASKS', |
|
Subroutine
IRONWORKER_LIST_SCHEDULED_TASKS: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 242 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/schedules', | ||
| 243 | 'action' => 'GET', | ||
| 244 | 'return' => 'LIST:schedules', | ||
| 245 | 'retry' => 1, | ||
| 246 | 'require_body' => 0, | ||
| 247 | 'paged' => 1, | ||
| 248 | 'per_page' => 100, | ||
| 249 | 'url_escape' => { '{Project ID}' => 1 }, | ||
| 250 | 'log_message' => '(project={Project ID}). Listed scheduled tasks.', | ||
| 251 | }; | ||
| 252 | } | ||
| 253 | |||
| 254 | |||
| 255 | sub IRONWORKER_SCHEDULE_A_TASK { | ||
| 256 | return { | ||
| 257 | 0 | ▶ | 'action_name' => 'IRONWORKER_SCHEDULE_A_TASK', |
|
Subroutine
IRONWORKER_SCHEDULE_A_TASK: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 258 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/schedules', | ||
| 259 | 'action' => 'POST', | ||
| 260 | 'return' => 'HASH', | ||
| 261 | 'retry' => 1, | ||
| 262 | 'require_body' => 1, | ||
| 263 | 'request_fields' => { 'schedules' => 1 }, | ||
| 264 | 'url_escape' => { '{Project ID}' => 1 }, | ||
| 265 | 'log_message' => '(project={Project ID}). Scheduled task.', | ||
| 266 | }; | ||
| 267 | } | ||
| 268 | |||
| 269 | |||
| 270 | sub IRONWORKER_GET_INFO_ABOUT_A_SCHEDULED_TASK { | ||
| 271 | return { | ||
| 272 | 0 | ▶ | 'action_name' => 'IRONWORKER_GET_INFO_ABOUT_A_SCHEDULED_TASK', |
|
Subroutine
IRONWORKER_GET_INFO_ABOUT_A_SCHEDULED_TASK: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 273 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/schedules/{Schedule ID}', | ||
| 274 | 'action' => 'GET', | ||
| 275 | 'return' => 'HASH', | ||
| 276 | 'retry' => 1, | ||
| 277 | 'require_body' => 0, | ||
| 278 | 'url_escape' => { '{Project ID}' => 1, '{Schedule ID}' => 1, }, | ||
| 279 | 'log_message' => '(project={Project ID}, schedule={Schedule ID}). Got info about scheduled task.', | ||
| 280 | }; | ||
| 281 | } | ||
| 282 | |||
| 283 | |||
| 284 | sub IRONWORKER_CANCEL_A_SCHEDULED_TASK { | ||
| 285 | return { | ||
| 286 | 0 | ▶ | 'action_name' => 'IRONWORKER_CANCEL_A_SCHEDULED_TASK', |
|
Subroutine
IRONWORKER_CANCEL_A_SCHEDULED_TASK: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 287 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/schedules/{Schedule ID}/cancel', | ||
| 288 | 'action' => 'POST', | ||
| 289 | 'return' => 'MESSAGE', | ||
| 290 | 'retry' => 1, | ||
| 291 | 'require_body' => 0, | ||
| 292 | 'url_escape' => { '{Project ID}' => 1, '{Schedule ID}' => 1, }, | ||
| 293 | 'log_message' => '(project={Project ID}, schedule={Schedule ID}). Canceled scheduled task.', | ||
| 294 | }; | ||
| 295 | } | ||
| 296 | |||
| 297 | |||
| 298 | sub IRONWORKER_LIST_OF_AVAILABLE_STACKS { | ||
| 299 | return { | ||
| 300 | 0 | ▶ | 'action_name' => 'IRONWORKER_LIST_OF_AVAILABLE_STACKS', |
|
Subroutine
IRONWORKER_LIST_OF_AVAILABLE_STACKS: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 301 | 'href' => '{Protocol}://{Host}:{Port}/{API Version}/stacks', | ||
| 302 | 'action' => 'GET', | ||
| 303 | 'return' => 'LIST', # Return as JSON. | ||
| 304 | 'retry' => 0, | ||
| 305 | 'require_body' => 0, | ||
| 306 | 'paged' => 0, | ||
| 307 | 'url_escape' => { }, | ||
| 308 | 'log_message' => '(). Listed stacks.', | ||
| 309 | }; | ||
| 310 | } | ||
| 311 | |||
| 312 | 4 | 1; | |
| 313 | |||
| 314 | __END__ | ||