line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::Iron::IronMQ::Api; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
## no critic (Documentation::RequirePodAtEnd) |
4
|
|
|
|
|
|
|
## no critic (Documentation::RequirePodSections) |
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
64
|
use 5.010_000; |
|
3
|
|
|
|
|
10
|
|
7
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
33
|
|
|
3
|
|
|
|
|
71
|
|
8
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
72
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Global Creator |
11
|
|
|
|
3
|
|
|
BEGIN { |
12
|
|
|
|
|
|
|
# No exports. |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Global Destructor |
16
|
|
|
|
3
|
|
|
END { |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# ABSTRACT: IronMQ API reference for Perl Client Libraries! |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = '0.14'; # VERSION: generated by DZP::OurPkgVersion |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub IRONMQ_CREATE_QUEUE { |
24
|
|
|
|
|
|
|
return { |
25
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_CREATE_QUEUE', |
26
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}', |
27
|
|
|
|
|
|
|
'action' => 'PUT', |
28
|
|
|
|
|
|
|
'return' => 'NONE', |
29
|
|
|
|
|
|
|
'retry' => 1, |
30
|
|
|
|
|
|
|
'require_body' => 1, |
31
|
|
|
|
|
|
|
'request_fields' => { 'message_timeout' => 1, 'message_expiration' => 1, 'type' => 1, 'push' => 1, 'dead_letter' => 1, }, |
32
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
33
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Created a message queue.', |
34
|
|
|
|
|
|
|
}; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub IRONMQ_GET_QUEUE_INFO { |
38
|
|
|
|
|
|
|
return { |
39
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_GET_QUEUE_INFO', |
40
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}', |
41
|
|
|
|
|
|
|
'action' => 'GET', |
42
|
|
|
|
|
|
|
'return' => 'HASH', |
43
|
|
|
|
|
|
|
'retry' => 1, |
44
|
|
|
|
|
|
|
'require_body' => 0, |
45
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
46
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Got info about a message queue.', |
47
|
|
|
|
|
|
|
}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub IRONMQ_UPDATE_QUEUE { |
51
|
|
|
|
|
|
|
return { |
52
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_UPDATE_QUEUE', |
53
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}', |
54
|
|
|
|
|
|
|
'action' => 'PATCH', |
55
|
|
|
|
|
|
|
'return' => 'NONE', |
56
|
|
|
|
|
|
|
'retry' => 1, |
57
|
|
|
|
|
|
|
'require_body' => 1, |
58
|
|
|
|
|
|
|
'request_fields' => { 'subscribers' => 1, 'push_type' => 1, 'retries' => 1, 'retries_delay' => 1 }, |
59
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
60
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Updated a message queue.', |
61
|
|
|
|
|
|
|
}; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub IRONMQ_DELETE_QUEUE { |
65
|
|
|
|
|
|
|
return { |
66
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_DELETE_QUEUE', |
67
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}', |
68
|
|
|
|
|
|
|
'action' => 'DELETE', |
69
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
70
|
|
|
|
|
|
|
'retry' => 1, |
71
|
|
|
|
|
|
|
'require_body' => 0, |
72
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
73
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Deleted message queue.', |
74
|
|
|
|
|
|
|
}; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub IRONMQ_LIST_QUEUES { |
78
|
|
|
|
|
|
|
return { |
79
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_LIST_QUEUES', |
80
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues', |
81
|
|
|
|
|
|
|
'action' => 'GET', |
82
|
|
|
|
|
|
|
'return' => 'HASH', |
83
|
|
|
|
|
|
|
'retry' => 0, |
84
|
|
|
|
|
|
|
'require_body' => 0, |
85
|
|
|
|
|
|
|
'url_params' => { 'per_page' => 1, 'previous' => 1, 'prefix' => 1, }, |
86
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1 }, |
87
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}). Listed queues.', |
88
|
|
|
|
|
|
|
}; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub IRONMQ_ADD_SUBSCRIBERS_TO_A_MESSAGE_QUEUE { |
92
|
|
|
|
|
|
|
return { |
93
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_ADD_SUBSCRIBERS_TO_A_MESSAGE_QUEUE', |
94
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/subscribers', |
95
|
|
|
|
|
|
|
'action' => 'POST', |
96
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
97
|
|
|
|
|
|
|
'retry' => 1, |
98
|
|
|
|
|
|
|
'require_body' => 1, |
99
|
|
|
|
|
|
|
'request_fields' => { 'subscribers' => 1 }, |
100
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
101
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Updated a message queue by adding subscribers.', |
102
|
|
|
|
|
|
|
}; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
sub IRONMQ_DELETE_SUBSCRIBERS_FROM_A_MESSAGE_QUEUE { |
106
|
|
|
|
|
|
|
return { |
107
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_DELETE_SUBSCRIBERS_FROM_A_MESSAGE_QUEUE', |
108
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/subscribers', |
109
|
|
|
|
|
|
|
'action' => 'DELETE', |
110
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
111
|
|
|
|
|
|
|
'retry' => 1, |
112
|
|
|
|
|
|
|
'require_body' => 1, |
113
|
|
|
|
|
|
|
'request_fields' => { 'subscribers' => 1 }, |
114
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
115
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Updated a message queue by deleting subscribers.', |
116
|
|
|
|
|
|
|
}; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
# TODO Bug in documentation: href last '/' not needed. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
sub IRONMQ_ADD_ALERTS_TO_A_QUEUE { |
122
|
|
|
|
|
|
|
return { |
123
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_ADD_ALERTS_TO_A_QUEUE', |
124
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/alerts', |
125
|
|
|
|
|
|
|
'action' => 'POST', |
126
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
127
|
|
|
|
|
|
|
'retry' => 1, |
128
|
|
|
|
|
|
|
'require_body' => 1, |
129
|
|
|
|
|
|
|
'request_fields' => { 'alerts' => 1 }, |
130
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
131
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Set alerts to the queue.', |
132
|
|
|
|
|
|
|
}; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
# TODO Bug in documentation: href last '/' not needed. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub IRONMQ_REPLACE_ALERTS_ON_A_QUEUE { |
138
|
|
|
|
|
|
|
return { |
139
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_REPLACE_ALERTS_ON_A_QUEUE', |
140
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/alerts', |
141
|
|
|
|
|
|
|
'action' => 'PUT', |
142
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
143
|
|
|
|
|
|
|
'retry' => 1, |
144
|
|
|
|
|
|
|
'require_body' => 1, |
145
|
|
|
|
|
|
|
'request_fields' => { 'alerts' => 1 }, |
146
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
147
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Replaced alerts on the queue.', |
148
|
|
|
|
|
|
|
}; |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
# TODO Bug in documentation: href last '/' not needed. |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
sub IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE { |
154
|
|
|
|
|
|
|
return { |
155
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE', |
156
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/alerts', |
157
|
|
|
|
|
|
|
'action' => 'DELETE', |
158
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
159
|
|
|
|
|
|
|
'retry' => 1, |
160
|
|
|
|
|
|
|
'require_body' => 1, |
161
|
|
|
|
|
|
|
'request_fields' => { 'alerts' => 1 }, |
162
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
163
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Removed alerts from the queue.', |
164
|
|
|
|
|
|
|
}; |
165
|
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
sub IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE_BY_ID { |
168
|
|
|
|
|
|
|
return { |
169
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE_BY_ID', |
170
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/alerts/{Alert ID}', |
171
|
|
|
|
|
|
|
'action' => 'DELETE', |
172
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
173
|
|
|
|
|
|
|
'retry' => 1, |
174
|
|
|
|
|
|
|
'require_body' => 0, |
175
|
|
|
|
|
|
|
'request_fields' => { 'alerts' => 1 }, |
176
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Alert ID}' => 1, }, |
177
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, alert_id={Alert ID}). Removed one alert from the queue.', |
178
|
|
|
|
|
|
|
}; |
179
|
|
|
|
|
|
|
} |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
sub IRONMQ_POST_MESSAGES { |
182
|
|
|
|
|
|
|
return { |
183
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_POST_MESSAGES', |
184
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages', |
185
|
|
|
|
|
|
|
'action' => 'POST', |
186
|
|
|
|
|
|
|
'return' => 'HASH', |
187
|
|
|
|
|
|
|
'retry' => 1, |
188
|
|
|
|
|
|
|
'require_body' => 1, |
189
|
|
|
|
|
|
|
'request_fields' => { 'messages' => 1 }, |
190
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
191
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Pushed messages to the queue.', |
192
|
|
|
|
|
|
|
}; |
193
|
|
|
|
|
|
|
} |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
sub IRONMQ_RESERVE_MESSAGES { |
196
|
|
|
|
|
|
|
return { |
197
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_RESERVE_MESSAGES', |
198
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/reservations', |
199
|
|
|
|
|
|
|
'action' => 'POST', |
200
|
|
|
|
|
|
|
'return' => 'HASH', |
201
|
|
|
|
|
|
|
'retry' => 1, |
202
|
|
|
|
|
|
|
'require_body' => 1, |
203
|
|
|
|
|
|
|
'request_fields' => { 'n' => 1, 'timeout' => 1, 'wait' => 1, 'delete' => 1, }, |
204
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
205
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Reserved messages from the queue.', |
206
|
|
|
|
|
|
|
}; |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
sub IRONMQ_GET_MESSAGE_BY_ID { |
210
|
|
|
|
|
|
|
return { |
211
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_GET_MESSAGE_BY_ID', |
212
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}', |
213
|
|
|
|
|
|
|
'action' => 'GET', |
214
|
|
|
|
|
|
|
'return' => 'HASH', |
215
|
|
|
|
|
|
|
'retry' => 1, |
216
|
|
|
|
|
|
|
'require_body' => 0, |
217
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Message ID}' => 1, }, |
218
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Got a message from the queue.', |
219
|
|
|
|
|
|
|
}; |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
sub IRONMQ_PEEK_MESSAGES { |
223
|
|
|
|
|
|
|
return { |
224
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_PEEK_MESSAGES', |
225
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages', |
226
|
|
|
|
|
|
|
'action' => 'GET', |
227
|
|
|
|
|
|
|
'return' => 'HASH', |
228
|
|
|
|
|
|
|
'retry' => 1, |
229
|
|
|
|
|
|
|
'require_body' => 0, |
230
|
|
|
|
|
|
|
'url_params' => { 'n' => 1, }, |
231
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, }, |
232
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Peeked at messages on the queue.', |
233
|
|
|
|
|
|
|
}; |
234
|
|
|
|
|
|
|
} |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
sub IRONMQ_DELETE_MESSAGE { |
237
|
|
|
|
|
|
|
return { |
238
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_DELETE_MESSAGE', |
239
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}', |
240
|
|
|
|
|
|
|
'action' => 'DELETE', |
241
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
242
|
|
|
|
|
|
|
'retry' => 1, |
243
|
|
|
|
|
|
|
'require_body' => 1, |
244
|
|
|
|
|
|
|
'request_fields' => { 'reservation_id' => 1, }, |
245
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Message ID}' => 1, }, |
246
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Deleted a message from the queue.', |
247
|
|
|
|
|
|
|
}; |
248
|
|
|
|
|
|
|
} |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
sub IRONMQ_DELETE_MESSAGES { |
251
|
|
|
|
|
|
|
return { |
252
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_DELETE_MESSAGES', |
253
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages', |
254
|
|
|
|
|
|
|
'action' => 'DELETE', |
255
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
256
|
|
|
|
|
|
|
'retry' => 1, |
257
|
|
|
|
|
|
|
'require_body' => 1, |
258
|
|
|
|
|
|
|
'request_fields' => { 'ids' => 1, }, |
259
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, }, |
260
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Deleted messages from the queue.', |
261
|
|
|
|
|
|
|
}; |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
sub IRONMQ_TOUCH_MESSAGE { |
265
|
|
|
|
|
|
|
return { |
266
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_TOUCH_MESSAGE', |
267
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/touch', |
268
|
|
|
|
|
|
|
'action' => 'POST', |
269
|
|
|
|
|
|
|
'return' => 'HASH', |
270
|
|
|
|
|
|
|
'retry' => 1, |
271
|
|
|
|
|
|
|
'require_body' => 1, |
272
|
|
|
|
|
|
|
'request_fields' => { 'reservation_id' => 1, 'timeout' => 1, }, |
273
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Message ID}' => 1, }, |
274
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Touched a message on the queue.', |
275
|
|
|
|
|
|
|
}; |
276
|
|
|
|
|
|
|
} |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
sub IRONMQ_RELEASE_MESSAGE { |
279
|
|
|
|
|
|
|
return { |
280
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_RELEASE_MESSAGE', |
281
|
|
|
|
|
|
|
'href' => |
282
|
|
|
|
|
|
|
'{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/release', |
283
|
|
|
|
|
|
|
'action' => 'POST', |
284
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
285
|
|
|
|
|
|
|
'retry' => 1, |
286
|
|
|
|
|
|
|
'require_body' => 1, |
287
|
|
|
|
|
|
|
'request_fields' => { 'reservation_id' => 1, 'delay' => 1, }, |
288
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Message ID}' => 1, }, |
289
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Released a message on the queue.', |
290
|
|
|
|
|
|
|
}; |
291
|
|
|
|
|
|
|
} |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
sub IRONMQ_CLEAR_MESSAGES { |
294
|
|
|
|
|
|
|
return { |
295
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_CLEAR_MESSAGES', |
296
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages', |
297
|
|
|
|
|
|
|
'action' => 'DELETE', |
298
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
299
|
|
|
|
|
|
|
'retry' => 1, |
300
|
|
|
|
|
|
|
'require_body' => 1, |
301
|
|
|
|
|
|
|
'request_fields' => {}, |
302
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, }, |
303
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Cleared all messages from the queue.', |
304
|
|
|
|
|
|
|
}; |
305
|
|
|
|
|
|
|
} |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
sub IRONMQ_GET_PUSH_STATUSES_FOR_A_MESSAGE { |
308
|
|
|
|
|
|
|
return { |
309
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_GET_PUSH_STATUSES_FOR_A_MESSAGE', |
310
|
|
|
|
|
|
|
'href' => |
311
|
|
|
|
|
|
|
'{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/subscribers', |
312
|
|
|
|
|
|
|
'action' => 'GET', |
313
|
|
|
|
|
|
|
'return' => 'HASH', |
314
|
|
|
|
|
|
|
'retry' => 1, |
315
|
|
|
|
|
|
|
'require_body' => 0, |
316
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
317
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Got push status about a message.', |
318
|
|
|
|
|
|
|
}; |
319
|
|
|
|
|
|
|
} |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
1; |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
__END__ |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
=pod |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
=encoding UTF-8 |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
=head1 NAME |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
IO::Iron::IronMQ::Api - IronMQ API reference for Perl Client Libraries! |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
=head1 VERSION |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
version 0.14 |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
=head1 SYNOPSIS |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
This package is for internal use of IO::Iron::IronMQ::Client/Queue packages. |
340
|
|
|
|
|
|
|
Only IronMQ v3. Older v1/v2 no longer supported. |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
=head1 DESCRIPTION |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
=for stopwords IronMQ API Mikko Koivunalho perldoc CPAN AnnoCPAN ACKNOWLEDGMENTS TODO tradename licensable MERCHANTABILITY |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
=head2 Operate message queues |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
=head3 IRONMQ_CREATE_QUEUE |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name} |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
=head3 IRONMQ_GET_QUEUE_INFO |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name} |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
=head3 IRONMQ_UPDATE_QUEUE |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name} |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
=head3 IRONMQ_DELETE_QUEUE |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name} |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
=head3 IRONMQ_LIST_QUEUES |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
/projects/{Project ID}/queues |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
=head3 IRONMQ_ADD_SUBSCRIBERS_TO_A_MESSAGE_QUEUE |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/subscribers |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
=head3 IRONMQ_DELETE_SUBSCRIBERS_FROM_A_MESSAGE_QUEUE |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/subscribers |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=head2 Define queue alerts |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=head3 IRONMQ_ADD_ALERTS_TO_A_QUEUE |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/alerts |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
=head3 IRONMQ_REPLACE_ALERTS_ON_A_QUEUE |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/alerts |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
=head3 IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/alerts |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
=head3 IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE_BY_ID |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/alerts/{Alert ID} |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
=head2 Operate messages |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
=head3 IRONMQ_POST_MESSAGES |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/messages |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
=head3 IRONMQ_RESERVE_MESSAGES |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/reservations |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
=head3 IRONMQ_GET_MESSAGE_BY_ID |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID} |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=head3 IRONMQ_PEEK_MESSAGES |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/messages/peek |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=head3 IRONMQ_DELETE_MESSAGE |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID} |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=head3 IRONMQ_DELETE_MESSAGES |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/messages |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
=head3 IRONMQ_TOUCH_MESSAGE |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/touch |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=head3 IRONMQ_RELEASE_MESSAGE |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/release |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
=head3 IRONMQ_CLEAR_MESSAGES |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/clear |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
=head3 IRONMQ_GET_PUSH_STATUSES_FOR_A_MESSAGE |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/subscribers |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
=head1 AUTHOR |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
Mikko Koivunalho <mikko.koivunalho@iki.fi> |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=head1 BUGS |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
Please report any bugs or feature requests to bug-io-iron@rt.cpan.org or through the web interface at: |
445
|
|
|
|
|
|
|
http://rt.cpan.org/Public/Dist/Display.html?Name=IO-Iron |
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
This software is copyright (c) 2023 by Mikko Koivunalho. |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
452
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
The full text of the license can be found in the |
455
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
=cut |