zernio-sdk 0.0.86 → 0.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/docs/WebhookEventsApi.md +766 -0
- data/docs/WebhookPayloadAccountConnected.md +5 -3
- data/docs/WebhookPayloadAccountConnectedAccount.md +4 -4
- data/docs/WebhookPayloadAccountDisconnected.md +5 -3
- data/docs/WebhookPayloadAccountDisconnectedAccount.md +6 -6
- data/docs/WebhookPayloadComment.md +7 -5
- data/docs/WebhookPayloadCommentAccount.md +3 -3
- data/docs/WebhookPayloadCommentComment.md +9 -9
- data/docs/WebhookPayloadCommentCommentAuthor.md +1 -1
- data/docs/WebhookPayloadCommentPost.md +2 -2
- data/docs/WebhookPayloadMessage.md +7 -5
- data/docs/WebhookPayloadMessageAccount.md +3 -3
- data/docs/WebhookPayloadMessageConversation.md +3 -5
- data/docs/WebhookPayloadMessageMessage.md +10 -10
- data/docs/WebhookPayloadMessageMessageAttachmentsInner.md +2 -2
- data/docs/WebhookPayloadMessageMessageSender.md +1 -1
- data/docs/WebhookPayloadPost.md +5 -3
- data/docs/WebhookPayloadPostPost.md +5 -5
- data/docs/WebhookPayloadPostPostPlatformsInner.md +4 -2
- data/docs/WebhookPayloadTest.md +24 -0
- data/lib/late-sdk/api/webhook_events_api.rb +748 -0
- data/lib/late-sdk/api/webhooks_api.rb +1 -1
- data/lib/late-sdk/models/webhook_log.rb +2 -2
- data/lib/late-sdk/models/webhook_payload_account_connected.rb +69 -1
- data/lib/late-sdk/models/webhook_payload_account_connected_account.rb +68 -0
- data/lib/late-sdk/models/webhook_payload_account_disconnected.rb +69 -1
- data/lib/late-sdk/models/webhook_payload_account_disconnected_account.rb +92 -0
- data/lib/late-sdk/models/webhook_payload_comment.rb +103 -1
- data/lib/late-sdk/models/webhook_payload_comment_account.rb +51 -0
- data/lib/late-sdk/models/webhook_payload_comment_comment.rb +143 -0
- data/lib/late-sdk/models/webhook_payload_comment_comment_author.rb +17 -0
- data/lib/late-sdk/models/webhook_payload_comment_post.rb +34 -0
- data/lib/late-sdk/models/webhook_payload_message.rb +104 -2
- data/lib/late-sdk/models/webhook_payload_message_account.rb +51 -0
- data/lib/late-sdk/models/webhook_payload_message_conversation.rb +39 -20
- data/lib/late-sdk/models/webhook_payload_message_message.rb +154 -4
- data/lib/late-sdk/models/webhook_payload_message_message_attachments_inner.rb +34 -0
- data/lib/late-sdk/models/webhook_payload_message_message_sender.rb +17 -0
- data/lib/late-sdk/models/webhook_payload_post.rb +71 -3
- data/lib/late-sdk/models/webhook_payload_post_post.rb +85 -0
- data/lib/late-sdk/models/webhook_payload_post_post_platforms_inner.rb +44 -1
- data/lib/late-sdk/models/webhook_payload_test.rb +269 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +1 -0
- data/openapi.yaml +236 -20
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/webhook_log_spec.rb +1 -1
- data/spec/models/webhook_payload_account_connected_spec.rb +6 -0
- data/spec/models/webhook_payload_account_disconnected_spec.rb +6 -0
- data/spec/models/webhook_payload_comment_spec.rb +6 -0
- data/spec/models/webhook_payload_message_conversation_spec.rb +0 -10
- data/spec/models/webhook_payload_message_message_spec.rb +2 -2
- data/spec/models/webhook_payload_message_spec.rb +6 -0
- data/spec/models/webhook_payload_post_post_platforms_inner_spec.rb +6 -0
- data/spec/models/webhook_payload_post_spec.rb +7 -1
- data/spec/models/webhook_payload_test_spec.rb +58 -0
- data/spec/models/webhook_spec.rb +1 -1
- metadata +664 -658
|
@@ -0,0 +1,766 @@
|
|
|
1
|
+
# Late::WebhookEventsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://zernio.com/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**on_account_connected**](WebhookEventsApi.md#on_account_connected) | **POST** /account.connected | Account connected event |
|
|
8
|
+
| [**on_account_disconnected**](WebhookEventsApi.md#on_account_disconnected) | **POST** /account.disconnected | Account disconnected event |
|
|
9
|
+
| [**on_comment_received**](WebhookEventsApi.md#on_comment_received) | **POST** /comment.received | Comment received event |
|
|
10
|
+
| [**on_message_received**](WebhookEventsApi.md#on_message_received) | **POST** /message.received | Message received event |
|
|
11
|
+
| [**on_post_cancelled**](WebhookEventsApi.md#on_post_cancelled) | **POST** /post.cancelled | Post cancelled event |
|
|
12
|
+
| [**on_post_failed**](WebhookEventsApi.md#on_post_failed) | **POST** /post.failed | Post failed event |
|
|
13
|
+
| [**on_post_partial**](WebhookEventsApi.md#on_post_partial) | **POST** /post.partial | Post partial event |
|
|
14
|
+
| [**on_post_published**](WebhookEventsApi.md#on_post_published) | **POST** /post.published | Post published event |
|
|
15
|
+
| [**on_post_recycled**](WebhookEventsApi.md#on_post_recycled) | **POST** /post.recycled | Post recycled event |
|
|
16
|
+
| [**on_post_scheduled**](WebhookEventsApi.md#on_post_scheduled) | **POST** /post.scheduled | Post scheduled event |
|
|
17
|
+
| [**on_webhook_test**](WebhookEventsApi.md#on_webhook_test) | **POST** /webhook.test | Webhook test event |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## on_account_connected
|
|
21
|
+
|
|
22
|
+
> on_account_connected(webhook_payload_account_connected)
|
|
23
|
+
|
|
24
|
+
Account connected event
|
|
25
|
+
|
|
26
|
+
Fired when a social account is successfully connected.
|
|
27
|
+
|
|
28
|
+
### Examples
|
|
29
|
+
|
|
30
|
+
```ruby
|
|
31
|
+
require 'time'
|
|
32
|
+
require 'late-sdk'
|
|
33
|
+
# setup authorization
|
|
34
|
+
Late.configure do |config|
|
|
35
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
36
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
api_instance = Late::WebhookEventsApi.new
|
|
40
|
+
webhook_payload_account_connected = # WebhookPayloadAccountConnected |
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
# Account connected event
|
|
44
|
+
api_instance.on_account_connected(webhook_payload_account_connected)
|
|
45
|
+
rescue Late::ApiError => e
|
|
46
|
+
puts "Error when calling WebhookEventsApi->on_account_connected: #{e}"
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Using the on_account_connected_with_http_info variant
|
|
51
|
+
|
|
52
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
53
|
+
|
|
54
|
+
> <Array(nil, Integer, Hash)> on_account_connected_with_http_info(webhook_payload_account_connected)
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
begin
|
|
58
|
+
# Account connected event
|
|
59
|
+
data, status_code, headers = api_instance.on_account_connected_with_http_info(webhook_payload_account_connected)
|
|
60
|
+
p status_code # => 2xx
|
|
61
|
+
p headers # => { ... }
|
|
62
|
+
p data # => nil
|
|
63
|
+
rescue Late::ApiError => e
|
|
64
|
+
puts "Error when calling WebhookEventsApi->on_account_connected_with_http_info: #{e}"
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Parameters
|
|
69
|
+
|
|
70
|
+
| Name | Type | Description | Notes |
|
|
71
|
+
| ---- | ---- | ----------- | ----- |
|
|
72
|
+
| **webhook_payload_account_connected** | [**WebhookPayloadAccountConnected**](WebhookPayloadAccountConnected.md) | | |
|
|
73
|
+
|
|
74
|
+
### Return type
|
|
75
|
+
|
|
76
|
+
nil (empty response body)
|
|
77
|
+
|
|
78
|
+
### Authorization
|
|
79
|
+
|
|
80
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
81
|
+
|
|
82
|
+
### HTTP request headers
|
|
83
|
+
|
|
84
|
+
- **Content-Type**: application/json
|
|
85
|
+
- **Accept**: Not defined
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## on_account_disconnected
|
|
89
|
+
|
|
90
|
+
> on_account_disconnected(webhook_payload_account_disconnected)
|
|
91
|
+
|
|
92
|
+
Account disconnected event
|
|
93
|
+
|
|
94
|
+
Fired when a connected social account becomes disconnected.
|
|
95
|
+
|
|
96
|
+
### Examples
|
|
97
|
+
|
|
98
|
+
```ruby
|
|
99
|
+
require 'time'
|
|
100
|
+
require 'late-sdk'
|
|
101
|
+
# setup authorization
|
|
102
|
+
Late.configure do |config|
|
|
103
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
104
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
api_instance = Late::WebhookEventsApi.new
|
|
108
|
+
webhook_payload_account_disconnected = # WebhookPayloadAccountDisconnected |
|
|
109
|
+
|
|
110
|
+
begin
|
|
111
|
+
# Account disconnected event
|
|
112
|
+
api_instance.on_account_disconnected(webhook_payload_account_disconnected)
|
|
113
|
+
rescue Late::ApiError => e
|
|
114
|
+
puts "Error when calling WebhookEventsApi->on_account_disconnected: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Using the on_account_disconnected_with_http_info variant
|
|
119
|
+
|
|
120
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
121
|
+
|
|
122
|
+
> <Array(nil, Integer, Hash)> on_account_disconnected_with_http_info(webhook_payload_account_disconnected)
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
begin
|
|
126
|
+
# Account disconnected event
|
|
127
|
+
data, status_code, headers = api_instance.on_account_disconnected_with_http_info(webhook_payload_account_disconnected)
|
|
128
|
+
p status_code # => 2xx
|
|
129
|
+
p headers # => { ... }
|
|
130
|
+
p data # => nil
|
|
131
|
+
rescue Late::ApiError => e
|
|
132
|
+
puts "Error when calling WebhookEventsApi->on_account_disconnected_with_http_info: #{e}"
|
|
133
|
+
end
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
|
140
|
+
| **webhook_payload_account_disconnected** | [**WebhookPayloadAccountDisconnected**](WebhookPayloadAccountDisconnected.md) | | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
nil (empty response body)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: application/json
|
|
153
|
+
- **Accept**: Not defined
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## on_comment_received
|
|
157
|
+
|
|
158
|
+
> on_comment_received(webhook_payload_comment)
|
|
159
|
+
|
|
160
|
+
Comment received event
|
|
161
|
+
|
|
162
|
+
Fired when a new comment is received on a tracked post.
|
|
163
|
+
|
|
164
|
+
### Examples
|
|
165
|
+
|
|
166
|
+
```ruby
|
|
167
|
+
require 'time'
|
|
168
|
+
require 'late-sdk'
|
|
169
|
+
# setup authorization
|
|
170
|
+
Late.configure do |config|
|
|
171
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
172
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
api_instance = Late::WebhookEventsApi.new
|
|
176
|
+
webhook_payload_comment = # WebhookPayloadComment |
|
|
177
|
+
|
|
178
|
+
begin
|
|
179
|
+
# Comment received event
|
|
180
|
+
api_instance.on_comment_received(webhook_payload_comment)
|
|
181
|
+
rescue Late::ApiError => e
|
|
182
|
+
puts "Error when calling WebhookEventsApi->on_comment_received: #{e}"
|
|
183
|
+
end
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Using the on_comment_received_with_http_info variant
|
|
187
|
+
|
|
188
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
189
|
+
|
|
190
|
+
> <Array(nil, Integer, Hash)> on_comment_received_with_http_info(webhook_payload_comment)
|
|
191
|
+
|
|
192
|
+
```ruby
|
|
193
|
+
begin
|
|
194
|
+
# Comment received event
|
|
195
|
+
data, status_code, headers = api_instance.on_comment_received_with_http_info(webhook_payload_comment)
|
|
196
|
+
p status_code # => 2xx
|
|
197
|
+
p headers # => { ... }
|
|
198
|
+
p data # => nil
|
|
199
|
+
rescue Late::ApiError => e
|
|
200
|
+
puts "Error when calling WebhookEventsApi->on_comment_received_with_http_info: #{e}"
|
|
201
|
+
end
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Parameters
|
|
205
|
+
|
|
206
|
+
| Name | Type | Description | Notes |
|
|
207
|
+
| ---- | ---- | ----------- | ----- |
|
|
208
|
+
| **webhook_payload_comment** | [**WebhookPayloadComment**](WebhookPayloadComment.md) | | |
|
|
209
|
+
|
|
210
|
+
### Return type
|
|
211
|
+
|
|
212
|
+
nil (empty response body)
|
|
213
|
+
|
|
214
|
+
### Authorization
|
|
215
|
+
|
|
216
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
217
|
+
|
|
218
|
+
### HTTP request headers
|
|
219
|
+
|
|
220
|
+
- **Content-Type**: application/json
|
|
221
|
+
- **Accept**: Not defined
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
## on_message_received
|
|
225
|
+
|
|
226
|
+
> on_message_received(webhook_payload_message)
|
|
227
|
+
|
|
228
|
+
Message received event
|
|
229
|
+
|
|
230
|
+
Fired when a new inbox message is received.
|
|
231
|
+
|
|
232
|
+
### Examples
|
|
233
|
+
|
|
234
|
+
```ruby
|
|
235
|
+
require 'time'
|
|
236
|
+
require 'late-sdk'
|
|
237
|
+
# setup authorization
|
|
238
|
+
Late.configure do |config|
|
|
239
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
240
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
api_instance = Late::WebhookEventsApi.new
|
|
244
|
+
webhook_payload_message = # WebhookPayloadMessage |
|
|
245
|
+
|
|
246
|
+
begin
|
|
247
|
+
# Message received event
|
|
248
|
+
api_instance.on_message_received(webhook_payload_message)
|
|
249
|
+
rescue Late::ApiError => e
|
|
250
|
+
puts "Error when calling WebhookEventsApi->on_message_received: #{e}"
|
|
251
|
+
end
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
#### Using the on_message_received_with_http_info variant
|
|
255
|
+
|
|
256
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
257
|
+
|
|
258
|
+
> <Array(nil, Integer, Hash)> on_message_received_with_http_info(webhook_payload_message)
|
|
259
|
+
|
|
260
|
+
```ruby
|
|
261
|
+
begin
|
|
262
|
+
# Message received event
|
|
263
|
+
data, status_code, headers = api_instance.on_message_received_with_http_info(webhook_payload_message)
|
|
264
|
+
p status_code # => 2xx
|
|
265
|
+
p headers # => { ... }
|
|
266
|
+
p data # => nil
|
|
267
|
+
rescue Late::ApiError => e
|
|
268
|
+
puts "Error when calling WebhookEventsApi->on_message_received_with_http_info: #{e}"
|
|
269
|
+
end
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Parameters
|
|
273
|
+
|
|
274
|
+
| Name | Type | Description | Notes |
|
|
275
|
+
| ---- | ---- | ----------- | ----- |
|
|
276
|
+
| **webhook_payload_message** | [**WebhookPayloadMessage**](WebhookPayloadMessage.md) | | |
|
|
277
|
+
|
|
278
|
+
### Return type
|
|
279
|
+
|
|
280
|
+
nil (empty response body)
|
|
281
|
+
|
|
282
|
+
### Authorization
|
|
283
|
+
|
|
284
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
285
|
+
|
|
286
|
+
### HTTP request headers
|
|
287
|
+
|
|
288
|
+
- **Content-Type**: application/json
|
|
289
|
+
- **Accept**: Not defined
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
## on_post_cancelled
|
|
293
|
+
|
|
294
|
+
> on_post_cancelled(webhook_payload_post)
|
|
295
|
+
|
|
296
|
+
Post cancelled event
|
|
297
|
+
|
|
298
|
+
Fired when a post publishing job is cancelled.
|
|
299
|
+
|
|
300
|
+
### Examples
|
|
301
|
+
|
|
302
|
+
```ruby
|
|
303
|
+
require 'time'
|
|
304
|
+
require 'late-sdk'
|
|
305
|
+
# setup authorization
|
|
306
|
+
Late.configure do |config|
|
|
307
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
308
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
api_instance = Late::WebhookEventsApi.new
|
|
312
|
+
webhook_payload_post = # WebhookPayloadPost |
|
|
313
|
+
|
|
314
|
+
begin
|
|
315
|
+
# Post cancelled event
|
|
316
|
+
api_instance.on_post_cancelled(webhook_payload_post)
|
|
317
|
+
rescue Late::ApiError => e
|
|
318
|
+
puts "Error when calling WebhookEventsApi->on_post_cancelled: #{e}"
|
|
319
|
+
end
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### Using the on_post_cancelled_with_http_info variant
|
|
323
|
+
|
|
324
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
325
|
+
|
|
326
|
+
> <Array(nil, Integer, Hash)> on_post_cancelled_with_http_info(webhook_payload_post)
|
|
327
|
+
|
|
328
|
+
```ruby
|
|
329
|
+
begin
|
|
330
|
+
# Post cancelled event
|
|
331
|
+
data, status_code, headers = api_instance.on_post_cancelled_with_http_info(webhook_payload_post)
|
|
332
|
+
p status_code # => 2xx
|
|
333
|
+
p headers # => { ... }
|
|
334
|
+
p data # => nil
|
|
335
|
+
rescue Late::ApiError => e
|
|
336
|
+
puts "Error when calling WebhookEventsApi->on_post_cancelled_with_http_info: #{e}"
|
|
337
|
+
end
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Parameters
|
|
341
|
+
|
|
342
|
+
| Name | Type | Description | Notes |
|
|
343
|
+
| ---- | ---- | ----------- | ----- |
|
|
344
|
+
| **webhook_payload_post** | [**WebhookPayloadPost**](WebhookPayloadPost.md) | | |
|
|
345
|
+
|
|
346
|
+
### Return type
|
|
347
|
+
|
|
348
|
+
nil (empty response body)
|
|
349
|
+
|
|
350
|
+
### Authorization
|
|
351
|
+
|
|
352
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
353
|
+
|
|
354
|
+
### HTTP request headers
|
|
355
|
+
|
|
356
|
+
- **Content-Type**: application/json
|
|
357
|
+
- **Accept**: Not defined
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
## on_post_failed
|
|
361
|
+
|
|
362
|
+
> on_post_failed(webhook_payload_post)
|
|
363
|
+
|
|
364
|
+
Post failed event
|
|
365
|
+
|
|
366
|
+
Fired when a post fails to publish on all target platforms.
|
|
367
|
+
|
|
368
|
+
### Examples
|
|
369
|
+
|
|
370
|
+
```ruby
|
|
371
|
+
require 'time'
|
|
372
|
+
require 'late-sdk'
|
|
373
|
+
# setup authorization
|
|
374
|
+
Late.configure do |config|
|
|
375
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
376
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
api_instance = Late::WebhookEventsApi.new
|
|
380
|
+
webhook_payload_post = # WebhookPayloadPost |
|
|
381
|
+
|
|
382
|
+
begin
|
|
383
|
+
# Post failed event
|
|
384
|
+
api_instance.on_post_failed(webhook_payload_post)
|
|
385
|
+
rescue Late::ApiError => e
|
|
386
|
+
puts "Error when calling WebhookEventsApi->on_post_failed: #{e}"
|
|
387
|
+
end
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
#### Using the on_post_failed_with_http_info variant
|
|
391
|
+
|
|
392
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
393
|
+
|
|
394
|
+
> <Array(nil, Integer, Hash)> on_post_failed_with_http_info(webhook_payload_post)
|
|
395
|
+
|
|
396
|
+
```ruby
|
|
397
|
+
begin
|
|
398
|
+
# Post failed event
|
|
399
|
+
data, status_code, headers = api_instance.on_post_failed_with_http_info(webhook_payload_post)
|
|
400
|
+
p status_code # => 2xx
|
|
401
|
+
p headers # => { ... }
|
|
402
|
+
p data # => nil
|
|
403
|
+
rescue Late::ApiError => e
|
|
404
|
+
puts "Error when calling WebhookEventsApi->on_post_failed_with_http_info: #{e}"
|
|
405
|
+
end
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Parameters
|
|
409
|
+
|
|
410
|
+
| Name | Type | Description | Notes |
|
|
411
|
+
| ---- | ---- | ----------- | ----- |
|
|
412
|
+
| **webhook_payload_post** | [**WebhookPayloadPost**](WebhookPayloadPost.md) | | |
|
|
413
|
+
|
|
414
|
+
### Return type
|
|
415
|
+
|
|
416
|
+
nil (empty response body)
|
|
417
|
+
|
|
418
|
+
### Authorization
|
|
419
|
+
|
|
420
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
421
|
+
|
|
422
|
+
### HTTP request headers
|
|
423
|
+
|
|
424
|
+
- **Content-Type**: application/json
|
|
425
|
+
- **Accept**: Not defined
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
## on_post_partial
|
|
429
|
+
|
|
430
|
+
> on_post_partial(webhook_payload_post)
|
|
431
|
+
|
|
432
|
+
Post partial event
|
|
433
|
+
|
|
434
|
+
Fired when a post publishes on some platforms and fails on others.
|
|
435
|
+
|
|
436
|
+
### Examples
|
|
437
|
+
|
|
438
|
+
```ruby
|
|
439
|
+
require 'time'
|
|
440
|
+
require 'late-sdk'
|
|
441
|
+
# setup authorization
|
|
442
|
+
Late.configure do |config|
|
|
443
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
444
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
api_instance = Late::WebhookEventsApi.new
|
|
448
|
+
webhook_payload_post = # WebhookPayloadPost |
|
|
449
|
+
|
|
450
|
+
begin
|
|
451
|
+
# Post partial event
|
|
452
|
+
api_instance.on_post_partial(webhook_payload_post)
|
|
453
|
+
rescue Late::ApiError => e
|
|
454
|
+
puts "Error when calling WebhookEventsApi->on_post_partial: #{e}"
|
|
455
|
+
end
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
#### Using the on_post_partial_with_http_info variant
|
|
459
|
+
|
|
460
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
461
|
+
|
|
462
|
+
> <Array(nil, Integer, Hash)> on_post_partial_with_http_info(webhook_payload_post)
|
|
463
|
+
|
|
464
|
+
```ruby
|
|
465
|
+
begin
|
|
466
|
+
# Post partial event
|
|
467
|
+
data, status_code, headers = api_instance.on_post_partial_with_http_info(webhook_payload_post)
|
|
468
|
+
p status_code # => 2xx
|
|
469
|
+
p headers # => { ... }
|
|
470
|
+
p data # => nil
|
|
471
|
+
rescue Late::ApiError => e
|
|
472
|
+
puts "Error when calling WebhookEventsApi->on_post_partial_with_http_info: #{e}"
|
|
473
|
+
end
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Parameters
|
|
477
|
+
|
|
478
|
+
| Name | Type | Description | Notes |
|
|
479
|
+
| ---- | ---- | ----------- | ----- |
|
|
480
|
+
| **webhook_payload_post** | [**WebhookPayloadPost**](WebhookPayloadPost.md) | | |
|
|
481
|
+
|
|
482
|
+
### Return type
|
|
483
|
+
|
|
484
|
+
nil (empty response body)
|
|
485
|
+
|
|
486
|
+
### Authorization
|
|
487
|
+
|
|
488
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
489
|
+
|
|
490
|
+
### HTTP request headers
|
|
491
|
+
|
|
492
|
+
- **Content-Type**: application/json
|
|
493
|
+
- **Accept**: Not defined
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
## on_post_published
|
|
497
|
+
|
|
498
|
+
> on_post_published(webhook_payload_post)
|
|
499
|
+
|
|
500
|
+
Post published event
|
|
501
|
+
|
|
502
|
+
Fired when a post is successfully published.
|
|
503
|
+
|
|
504
|
+
### Examples
|
|
505
|
+
|
|
506
|
+
```ruby
|
|
507
|
+
require 'time'
|
|
508
|
+
require 'late-sdk'
|
|
509
|
+
# setup authorization
|
|
510
|
+
Late.configure do |config|
|
|
511
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
512
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
api_instance = Late::WebhookEventsApi.new
|
|
516
|
+
webhook_payload_post = # WebhookPayloadPost |
|
|
517
|
+
|
|
518
|
+
begin
|
|
519
|
+
# Post published event
|
|
520
|
+
api_instance.on_post_published(webhook_payload_post)
|
|
521
|
+
rescue Late::ApiError => e
|
|
522
|
+
puts "Error when calling WebhookEventsApi->on_post_published: #{e}"
|
|
523
|
+
end
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
#### Using the on_post_published_with_http_info variant
|
|
527
|
+
|
|
528
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
529
|
+
|
|
530
|
+
> <Array(nil, Integer, Hash)> on_post_published_with_http_info(webhook_payload_post)
|
|
531
|
+
|
|
532
|
+
```ruby
|
|
533
|
+
begin
|
|
534
|
+
# Post published event
|
|
535
|
+
data, status_code, headers = api_instance.on_post_published_with_http_info(webhook_payload_post)
|
|
536
|
+
p status_code # => 2xx
|
|
537
|
+
p headers # => { ... }
|
|
538
|
+
p data # => nil
|
|
539
|
+
rescue Late::ApiError => e
|
|
540
|
+
puts "Error when calling WebhookEventsApi->on_post_published_with_http_info: #{e}"
|
|
541
|
+
end
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### Parameters
|
|
545
|
+
|
|
546
|
+
| Name | Type | Description | Notes |
|
|
547
|
+
| ---- | ---- | ----------- | ----- |
|
|
548
|
+
| **webhook_payload_post** | [**WebhookPayloadPost**](WebhookPayloadPost.md) | | |
|
|
549
|
+
|
|
550
|
+
### Return type
|
|
551
|
+
|
|
552
|
+
nil (empty response body)
|
|
553
|
+
|
|
554
|
+
### Authorization
|
|
555
|
+
|
|
556
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
557
|
+
|
|
558
|
+
### HTTP request headers
|
|
559
|
+
|
|
560
|
+
- **Content-Type**: application/json
|
|
561
|
+
- **Accept**: Not defined
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
## on_post_recycled
|
|
565
|
+
|
|
566
|
+
> on_post_recycled(webhook_payload_post)
|
|
567
|
+
|
|
568
|
+
Post recycled event
|
|
569
|
+
|
|
570
|
+
Fired when a post is recycled (cloned and re-scheduled for publishing).
|
|
571
|
+
|
|
572
|
+
### Examples
|
|
573
|
+
|
|
574
|
+
```ruby
|
|
575
|
+
require 'time'
|
|
576
|
+
require 'late-sdk'
|
|
577
|
+
# setup authorization
|
|
578
|
+
Late.configure do |config|
|
|
579
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
580
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
api_instance = Late::WebhookEventsApi.new
|
|
584
|
+
webhook_payload_post = # WebhookPayloadPost |
|
|
585
|
+
|
|
586
|
+
begin
|
|
587
|
+
# Post recycled event
|
|
588
|
+
api_instance.on_post_recycled(webhook_payload_post)
|
|
589
|
+
rescue Late::ApiError => e
|
|
590
|
+
puts "Error when calling WebhookEventsApi->on_post_recycled: #{e}"
|
|
591
|
+
end
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
#### Using the on_post_recycled_with_http_info variant
|
|
595
|
+
|
|
596
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
597
|
+
|
|
598
|
+
> <Array(nil, Integer, Hash)> on_post_recycled_with_http_info(webhook_payload_post)
|
|
599
|
+
|
|
600
|
+
```ruby
|
|
601
|
+
begin
|
|
602
|
+
# Post recycled event
|
|
603
|
+
data, status_code, headers = api_instance.on_post_recycled_with_http_info(webhook_payload_post)
|
|
604
|
+
p status_code # => 2xx
|
|
605
|
+
p headers # => { ... }
|
|
606
|
+
p data # => nil
|
|
607
|
+
rescue Late::ApiError => e
|
|
608
|
+
puts "Error when calling WebhookEventsApi->on_post_recycled_with_http_info: #{e}"
|
|
609
|
+
end
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
### Parameters
|
|
613
|
+
|
|
614
|
+
| Name | Type | Description | Notes |
|
|
615
|
+
| ---- | ---- | ----------- | ----- |
|
|
616
|
+
| **webhook_payload_post** | [**WebhookPayloadPost**](WebhookPayloadPost.md) | | |
|
|
617
|
+
|
|
618
|
+
### Return type
|
|
619
|
+
|
|
620
|
+
nil (empty response body)
|
|
621
|
+
|
|
622
|
+
### Authorization
|
|
623
|
+
|
|
624
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
625
|
+
|
|
626
|
+
### HTTP request headers
|
|
627
|
+
|
|
628
|
+
- **Content-Type**: application/json
|
|
629
|
+
- **Accept**: Not defined
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
## on_post_scheduled
|
|
633
|
+
|
|
634
|
+
> on_post_scheduled(webhook_payload_post)
|
|
635
|
+
|
|
636
|
+
Post scheduled event
|
|
637
|
+
|
|
638
|
+
Fired when a post is created and scheduled for publishing.
|
|
639
|
+
|
|
640
|
+
### Examples
|
|
641
|
+
|
|
642
|
+
```ruby
|
|
643
|
+
require 'time'
|
|
644
|
+
require 'late-sdk'
|
|
645
|
+
# setup authorization
|
|
646
|
+
Late.configure do |config|
|
|
647
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
648
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
api_instance = Late::WebhookEventsApi.new
|
|
652
|
+
webhook_payload_post = # WebhookPayloadPost |
|
|
653
|
+
|
|
654
|
+
begin
|
|
655
|
+
# Post scheduled event
|
|
656
|
+
api_instance.on_post_scheduled(webhook_payload_post)
|
|
657
|
+
rescue Late::ApiError => e
|
|
658
|
+
puts "Error when calling WebhookEventsApi->on_post_scheduled: #{e}"
|
|
659
|
+
end
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
#### Using the on_post_scheduled_with_http_info variant
|
|
663
|
+
|
|
664
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
665
|
+
|
|
666
|
+
> <Array(nil, Integer, Hash)> on_post_scheduled_with_http_info(webhook_payload_post)
|
|
667
|
+
|
|
668
|
+
```ruby
|
|
669
|
+
begin
|
|
670
|
+
# Post scheduled event
|
|
671
|
+
data, status_code, headers = api_instance.on_post_scheduled_with_http_info(webhook_payload_post)
|
|
672
|
+
p status_code # => 2xx
|
|
673
|
+
p headers # => { ... }
|
|
674
|
+
p data # => nil
|
|
675
|
+
rescue Late::ApiError => e
|
|
676
|
+
puts "Error when calling WebhookEventsApi->on_post_scheduled_with_http_info: #{e}"
|
|
677
|
+
end
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### Parameters
|
|
681
|
+
|
|
682
|
+
| Name | Type | Description | Notes |
|
|
683
|
+
| ---- | ---- | ----------- | ----- |
|
|
684
|
+
| **webhook_payload_post** | [**WebhookPayloadPost**](WebhookPayloadPost.md) | | |
|
|
685
|
+
|
|
686
|
+
### Return type
|
|
687
|
+
|
|
688
|
+
nil (empty response body)
|
|
689
|
+
|
|
690
|
+
### Authorization
|
|
691
|
+
|
|
692
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
693
|
+
|
|
694
|
+
### HTTP request headers
|
|
695
|
+
|
|
696
|
+
- **Content-Type**: application/json
|
|
697
|
+
- **Accept**: Not defined
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
## on_webhook_test
|
|
701
|
+
|
|
702
|
+
> on_webhook_test(webhook_payload_test)
|
|
703
|
+
|
|
704
|
+
Webhook test event
|
|
705
|
+
|
|
706
|
+
Fired when sending a test webhook to verify the endpoint configuration.
|
|
707
|
+
|
|
708
|
+
### Examples
|
|
709
|
+
|
|
710
|
+
```ruby
|
|
711
|
+
require 'time'
|
|
712
|
+
require 'late-sdk'
|
|
713
|
+
# setup authorization
|
|
714
|
+
Late.configure do |config|
|
|
715
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
716
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
717
|
+
end
|
|
718
|
+
|
|
719
|
+
api_instance = Late::WebhookEventsApi.new
|
|
720
|
+
webhook_payload_test = # WebhookPayloadTest |
|
|
721
|
+
|
|
722
|
+
begin
|
|
723
|
+
# Webhook test event
|
|
724
|
+
api_instance.on_webhook_test(webhook_payload_test)
|
|
725
|
+
rescue Late::ApiError => e
|
|
726
|
+
puts "Error when calling WebhookEventsApi->on_webhook_test: #{e}"
|
|
727
|
+
end
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
#### Using the on_webhook_test_with_http_info variant
|
|
731
|
+
|
|
732
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
733
|
+
|
|
734
|
+
> <Array(nil, Integer, Hash)> on_webhook_test_with_http_info(webhook_payload_test)
|
|
735
|
+
|
|
736
|
+
```ruby
|
|
737
|
+
begin
|
|
738
|
+
# Webhook test event
|
|
739
|
+
data, status_code, headers = api_instance.on_webhook_test_with_http_info(webhook_payload_test)
|
|
740
|
+
p status_code # => 2xx
|
|
741
|
+
p headers # => { ... }
|
|
742
|
+
p data # => nil
|
|
743
|
+
rescue Late::ApiError => e
|
|
744
|
+
puts "Error when calling WebhookEventsApi->on_webhook_test_with_http_info: #{e}"
|
|
745
|
+
end
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
### Parameters
|
|
749
|
+
|
|
750
|
+
| Name | Type | Description | Notes |
|
|
751
|
+
| ---- | ---- | ----------- | ----- |
|
|
752
|
+
| **webhook_payload_test** | [**WebhookPayloadTest**](WebhookPayloadTest.md) | | |
|
|
753
|
+
|
|
754
|
+
### Return type
|
|
755
|
+
|
|
756
|
+
nil (empty response body)
|
|
757
|
+
|
|
758
|
+
### Authorization
|
|
759
|
+
|
|
760
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
761
|
+
|
|
762
|
+
### HTTP request headers
|
|
763
|
+
|
|
764
|
+
- **Content-Type**: application/json
|
|
765
|
+
- **Accept**: Not defined
|
|
766
|
+
|