zernio-sdk 0.0.111 → 0.0.112

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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -0
  3. data/docs/CreateInboxConversation201Response.md +20 -0
  4. data/docs/CreateInboxConversation201ResponseData.md +26 -0
  5. data/docs/CreateInboxConversation400Response.md +20 -0
  6. data/docs/CreateInboxConversation422Response.md +20 -0
  7. data/docs/CreateInboxConversationRequest.md +26 -0
  8. data/docs/CreatePostRequest.md +2 -0
  9. data/docs/EditPost200Response.md +24 -0
  10. data/docs/EditPostRequest.md +20 -0
  11. data/docs/FacebookPlatformData.md +3 -1
  12. data/docs/MessagesApi.md +70 -0
  13. data/docs/PostsApi.md +72 -0
  14. data/docs/TwitterPlatformData.md +3 -1
  15. data/docs/UpdatePostRequest.md +2 -0
  16. data/lib/late-sdk/api/messages_api.rb +68 -0
  17. data/lib/late-sdk/api/posts_api.rb +74 -0
  18. data/lib/late-sdk/models/create_inbox_conversation201_response.rb +156 -0
  19. data/lib/late-sdk/models/create_inbox_conversation201_response_data.rb +188 -0
  20. data/lib/late-sdk/models/create_inbox_conversation400_response.rb +190 -0
  21. data/lib/late-sdk/models/create_inbox_conversation422_response.rb +190 -0
  22. data/lib/late-sdk/models/create_inbox_conversation_request.rb +207 -0
  23. data/lib/late-sdk/models/create_post_request.rb +11 -1
  24. data/lib/late-sdk/models/edit_post200_response.rb +176 -0
  25. data/lib/late-sdk/models/edit_post_request.rb +216 -0
  26. data/lib/late-sdk/models/facebook_platform_data.rb +14 -2
  27. data/lib/late-sdk/models/twitter_platform_data.rb +16 -4
  28. data/lib/late-sdk/models/update_post_request.rb +11 -1
  29. data/lib/late-sdk/version.rb +1 -1
  30. data/lib/late-sdk.rb +7 -0
  31. data/openapi.yaml +207 -1
  32. data/spec/api/messages_api_spec.rb +12 -0
  33. data/spec/api/posts_api_spec.rb +13 -0
  34. data/spec/models/create_inbox_conversation201_response_data_spec.rb +60 -0
  35. data/spec/models/create_inbox_conversation201_response_spec.rb +42 -0
  36. data/spec/models/create_inbox_conversation400_response_spec.rb +46 -0
  37. data/spec/models/create_inbox_conversation422_response_spec.rb +46 -0
  38. data/spec/models/create_inbox_conversation_request_spec.rb +60 -0
  39. data/spec/models/create_post_request_spec.rb +6 -0
  40. data/spec/models/edit_post200_response_spec.rb +54 -0
  41. data/spec/models/edit_post_request_spec.rb +46 -0
  42. data/spec/models/facebook_platform_data_spec.rb +6 -0
  43. data/spec/models/twitter_platform_data_spec.rb +6 -0
  44. data/spec/models/update_post_request_spec.rb +6 -0
  45. metadata +29 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02e043acb4f66b962dbdc4af760a59a8d905a88f49873a4cb681af9dc9cbdf7f
4
- data.tar.gz: aa6f741696ab09ebdb5a05627d499a2b8efdf37a6f03e0c93327a2463c1e42cf
3
+ metadata.gz: 4972a35710e44e65577178e61e30bcc1fd3ad2ab91104a5314758f88ec5c9c7c
4
+ data.tar.gz: 5545494af6109d84e21cd5acda6761b3bfca440d9698eb6a8fcd7df43f088355
5
5
  SHA512:
6
- metadata.gz: d1e48eea5866879f943b0a0109ad21a1c1052a17280ef6b5890a639cac551a38ab67029b90941529c6ea5222fb5755efa4b4b7765fcd96687b9751e5a5e6241f
7
- data.tar.gz: 20bc8b0ec6c57682bef7fd227e77062f51f41bc16d53af9efd9fb4fe7bc187fd7d6c8b62b10d7638e7223d903d39959400fa1610e2cdb368fa150ae7b3e895b0
6
+ metadata.gz: ce562d0d7991d5aeb054e78156bfcf806a9b82a408c283e110cfa5ce293721b1e1a0b9c711ca4bff707705cb1f1ab30d04768fccef6b05e65723af1c75c18994
7
+ data.tar.gz: 2b4e96a95d051fbca0c78bd7e11fdadcb20b4429fb889081b7c6455aa69c464449f79fdb0b3feea80655e3b0e04bf9c98d31d2da5b1a31c905e86e646b235023
data/README.md CHANGED
@@ -210,6 +210,7 @@ Class | Method | HTTP request | Description
210
210
  *Late::LogsApi* | [**list_posts_logs**](docs/LogsApi.md#list_posts_logs) | **GET** /v1/posts/logs | List publishing logs
211
211
  *Late::MediaApi* | [**get_media_presigned_url**](docs/MediaApi.md#get_media_presigned_url) | **POST** /v1/media/presign | Get presigned upload URL
212
212
  *Late::MessagesApi* | [**add_message_reaction**](docs/MessagesApi.md#add_message_reaction) | **POST** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Add reaction
213
+ *Late::MessagesApi* | [**create_inbox_conversation**](docs/MessagesApi.md#create_inbox_conversation) | **POST** /v1/inbox/conversations | Create conversation
213
214
  *Late::MessagesApi* | [**delete_inbox_message**](docs/MessagesApi.md#delete_inbox_message) | **DELETE** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Delete message
214
215
  *Late::MessagesApi* | [**edit_inbox_message**](docs/MessagesApi.md#edit_inbox_message) | **PATCH** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Edit message
215
216
  *Late::MessagesApi* | [**get_inbox_conversation**](docs/MessagesApi.md#get_inbox_conversation) | **GET** /v1/inbox/conversations/{conversationId} | Get conversation
@@ -223,6 +224,7 @@ Class | Method | HTTP request | Description
223
224
  *Late::PostsApi* | [**bulk_upload_posts**](docs/PostsApi.md#bulk_upload_posts) | **POST** /v1/posts/bulk-upload | Bulk upload from CSV
224
225
  *Late::PostsApi* | [**create_post**](docs/PostsApi.md#create_post) | **POST** /v1/posts | Create post
225
226
  *Late::PostsApi* | [**delete_post**](docs/PostsApi.md#delete_post) | **DELETE** /v1/posts/{postId} | Delete post
227
+ *Late::PostsApi* | [**edit_post**](docs/PostsApi.md#edit_post) | **POST** /v1/posts/{postId}/edit | Edit published post
226
228
  *Late::PostsApi* | [**get_post**](docs/PostsApi.md#get_post) | **GET** /v1/posts/{postId} | Get post
227
229
  *Late::PostsApi* | [**list_posts**](docs/PostsApi.md#list_posts) | **GET** /v1/posts | List posts
228
230
  *Late::PostsApi* | [**retry_post**](docs/PostsApi.md#retry_post) | **POST** /v1/posts/{postId}/retry | Retry failed post
@@ -428,6 +430,11 @@ Class | Method | HTTP request | Description
428
430
  - [Late::CreateGoogleBusinessMediaRequest](docs/CreateGoogleBusinessMediaRequest.md)
429
431
  - [Late::CreateGoogleBusinessPlaceAction200Response](docs/CreateGoogleBusinessPlaceAction200Response.md)
430
432
  - [Late::CreateGoogleBusinessPlaceActionRequest](docs/CreateGoogleBusinessPlaceActionRequest.md)
433
+ - [Late::CreateInboxConversation201Response](docs/CreateInboxConversation201Response.md)
434
+ - [Late::CreateInboxConversation201ResponseData](docs/CreateInboxConversation201ResponseData.md)
435
+ - [Late::CreateInboxConversation400Response](docs/CreateInboxConversation400Response.md)
436
+ - [Late::CreateInboxConversation422Response](docs/CreateInboxConversation422Response.md)
437
+ - [Late::CreateInboxConversationRequest](docs/CreateInboxConversationRequest.md)
431
438
  - [Late::CreateInviteToken201Response](docs/CreateInviteToken201Response.md)
432
439
  - [Late::CreateInviteTokenRequest](docs/CreateInviteTokenRequest.md)
433
440
  - [Late::CreatePost409Response](docs/CreatePost409Response.md)
@@ -480,6 +487,8 @@ Class | Method | HTTP request | Description
480
487
  - [Late::EditInboxMessageRequest](docs/EditInboxMessageRequest.md)
481
488
  - [Late::EditInboxMessageRequestReplyMarkup](docs/EditInboxMessageRequestReplyMarkup.md)
482
489
  - [Late::EditInboxMessageRequestReplyMarkupKeyboardInnerInner](docs/EditInboxMessageRequestReplyMarkupKeyboardInnerInner.md)
490
+ - [Late::EditPost200Response](docs/EditPost200Response.md)
491
+ - [Late::EditPostRequest](docs/EditPostRequest.md)
483
492
  - [Late::EnrollContacts200Response](docs/EnrollContacts200Response.md)
484
493
  - [Late::EnrollContactsRequest](docs/EnrollContactsRequest.md)
485
494
  - [Late::ErrorResponse](docs/ErrorResponse.md)
@@ -0,0 +1,20 @@
1
+ # Late::CreateInboxConversation201Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+ | **data** | [**CreateInboxConversation201ResponseData**](CreateInboxConversation201ResponseData.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::CreateInboxConversation201Response.new(
16
+ success: true,
17
+ data: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,26 @@
1
+ # Late::CreateInboxConversation201ResponseData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message_id** | **String** | Platform message ID (dm_event_id) | [optional] |
8
+ | **conversation_id** | **String** | Platform conversation ID (dm_conversation_id) | [optional] |
9
+ | **participant_id** | **String** | Twitter numeric user ID of the recipient | [optional] |
10
+ | **participant_name** | **String** | Display name of the recipient | [optional] |
11
+ | **participant_username** | **String** | Twitter username of the recipient | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'late-sdk'
17
+
18
+ instance = Late::CreateInboxConversation201ResponseData.new(
19
+ message_id: null,
20
+ conversation_id: null,
21
+ participant_id: null,
22
+ participant_name: null,
23
+ participant_username: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # Late::CreateInboxConversation400Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::CreateInboxConversation400Response.new(
16
+ error: null,
17
+ code: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Late::CreateInboxConversation422Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::CreateInboxConversation422Response.new(
16
+ error: null,
17
+ code: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,26 @@
1
+ # Late::CreateInboxConversationRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | The social account ID to send from | |
8
+ | **participant_id** | **String** | Twitter numeric user ID of the recipient. Provide either this or `participantUsername`. | [optional] |
9
+ | **participant_username** | **String** | Twitter username (with or without @) of the recipient. Resolved to a user ID via lookup. Provide either this or `participantId`. | [optional] |
10
+ | **message** | **String** | Text content of the message. At least one of `message` or attachment is required. | [optional] |
11
+ | **skip_dm_check** | **Boolean** | Skip the `receives_your_dm` eligibility check before sending. Use if you have already verified the recipient accepts DMs. | [optional][default to false] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'late-sdk'
17
+
18
+ instance = Late::CreateInboxConversationRequest.new(
19
+ account_id: null,
20
+ participant_id: null,
21
+ participant_username: null,
22
+ message: null,
23
+ skip_dm_check: null
24
+ )
25
+ ```
26
+
@@ -18,6 +18,7 @@
18
18
  | **crossposting_enabled** | **Boolean** | | [optional][default to true] |
19
19
  | **metadata** | **Hash<String, Object>** | | [optional] |
20
20
  | **tiktok_settings** | [**TikTokPlatformData**](TikTokPlatformData.md) | Root-level TikTok settings applied to all TikTok platforms. Merged into each platform's platformSpecificData, with platform-specific settings taking precedence. | [optional] |
21
+ | **facebook_settings** | [**FacebookPlatformData**](FacebookPlatformData.md) | Root-level Facebook settings applied to all Facebook platforms. Merged into each platform's platformSpecificData, with platform-specific settings taking precedence. | [optional] |
21
22
  | **recycling** | [**RecyclingConfig**](RecyclingConfig.md) | | [optional] |
22
23
  | **queued_from_profile** | **String** | Profile ID to schedule via queue. When provided without scheduledFor, the post is auto-assigned to the next available slot. Do not call /v1/queue/next-slot and use that time in scheduledFor, as that bypasses queue locking. | [optional] |
23
24
  | **queue_id** | **String** | Specific queue ID to use when scheduling via queue. Only used when queuedFromProfile is also provided. If omitted, uses the profile's default queue. | [optional] |
@@ -42,6 +43,7 @@ instance = Late::CreatePostRequest.new(
42
43
  crossposting_enabled: null,
43
44
  metadata: null,
44
45
  tiktok_settings: null,
46
+ facebook_settings: null,
45
47
  recycling: null,
46
48
  queued_from_profile: null,
47
49
  queue_id: null
@@ -0,0 +1,24 @@
1
+ # Late::EditPost200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+ | **id** | **String** | New tweet ID assigned by X after edit | [optional] |
9
+ | **url** | **String** | URL of the edited tweet | [optional] |
10
+ | **message** | **String** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'late-sdk'
16
+
17
+ instance = Late::EditPost200Response.new(
18
+ success: null,
19
+ id: null,
20
+ url: null,
21
+ message: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,20 @@
1
+ # Late::EditPostRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **platform** | **String** | The platform to edit the post on. Currently only twitter is supported. | |
8
+ | **content** | **String** | The new tweet text content | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::EditPostRequest.new(
16
+ platform: null,
17
+ content: null
18
+ )
19
+ ```
20
+
@@ -4,9 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **draft** | **Boolean** | When true, creates the post as an unpublished draft visible in Facebook Publishing Tools instead of publishing immediately. Supported for feed posts (text, link, image, video) and reels. Not supported for stories. Drafts expire after ~30 days. | [optional][default to false] |
7
8
  | **content_type** | **String** | Set to 'story' for Page Stories (24h ephemeral) or 'reel' for Reels (short vertical video). Defaults to feed post if omitted. | [optional] |
8
9
  | **title** | **String** | Reel title (only for contentType=reel). Separate from the caption/content field. | [optional] |
9
- | **first_comment** | **String** | Optional first comment to post immediately after publishing (feed posts only, not stories or reels) | [optional] |
10
+ | **first_comment** | **String** | Optional first comment to post immediately after publishing (feed posts only, not stories or reels). Skipped when draft is true. | [optional] |
10
11
  | **page_id** | **String** | Target Facebook Page ID for multi-page posting. If omitted, uses the default page. Use GET /v1/accounts/{id}/facebook-page to list pages. | [optional] |
11
12
 
12
13
  ## Example
@@ -15,6 +16,7 @@
15
16
  require 'late-sdk'
16
17
 
17
18
  instance = Late::FacebookPlatformData.new(
19
+ draft: null,
18
20
  content_type: null,
19
21
  title: null,
20
22
  first_comment: null,
data/docs/MessagesApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://zernio.com/api*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**add_message_reaction**](MessagesApi.md#add_message_reaction) | **POST** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Add reaction |
8
+ | [**create_inbox_conversation**](MessagesApi.md#create_inbox_conversation) | **POST** /v1/inbox/conversations | Create conversation |
8
9
  | [**delete_inbox_message**](MessagesApi.md#delete_inbox_message) | **DELETE** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Delete message |
9
10
  | [**edit_inbox_message**](MessagesApi.md#edit_inbox_message) | **PATCH** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Edit message |
10
11
  | [**get_inbox_conversation**](MessagesApi.md#get_inbox_conversation) | **GET** /v1/inbox/conversations/{conversationId} | Get conversation |
@@ -90,6 +91,75 @@ end
90
91
  - **Accept**: application/json
91
92
 
92
93
 
94
+ ## create_inbox_conversation
95
+
96
+ > <CreateInboxConversation201Response> create_inbox_conversation(create_inbox_conversation_request)
97
+
98
+ Create conversation
99
+
100
+ Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. **Currently supported platforms:** Twitter/X only. Other platforms will return `PLATFORM_NOT_SUPPORTED`. **DM eligibility:** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the `receives_your_dm` field). If not, a 422 error with code `DM_NOT_ALLOWED` is returned. You can skip this check with `skipDmCheck: true` if you have already verified eligibility. **X API tier requirement:** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits:** 200 requests per 15 minutes, 1,000 per 24 hours per user, 15,000 per 24 hours per app (shared across all DM endpoints).
101
+
102
+ ### Examples
103
+
104
+ ```ruby
105
+ require 'time'
106
+ require 'late-sdk'
107
+ # setup authorization
108
+ Late.configure do |config|
109
+ # Configure Bearer authorization (JWT): bearerAuth
110
+ config.access_token = 'YOUR_BEARER_TOKEN'
111
+ end
112
+
113
+ api_instance = Late::MessagesApi.new
114
+ create_inbox_conversation_request = Late::CreateInboxConversationRequest.new({account_id: 'account_id_example'}) # CreateInboxConversationRequest |
115
+
116
+ begin
117
+ # Create conversation
118
+ result = api_instance.create_inbox_conversation(create_inbox_conversation_request)
119
+ p result
120
+ rescue Late::ApiError => e
121
+ puts "Error when calling MessagesApi->create_inbox_conversation: #{e}"
122
+ end
123
+ ```
124
+
125
+ #### Using the create_inbox_conversation_with_http_info variant
126
+
127
+ This returns an Array which contains the response data, status code and headers.
128
+
129
+ > <Array(<CreateInboxConversation201Response>, Integer, Hash)> create_inbox_conversation_with_http_info(create_inbox_conversation_request)
130
+
131
+ ```ruby
132
+ begin
133
+ # Create conversation
134
+ data, status_code, headers = api_instance.create_inbox_conversation_with_http_info(create_inbox_conversation_request)
135
+ p status_code # => 2xx
136
+ p headers # => { ... }
137
+ p data # => <CreateInboxConversation201Response>
138
+ rescue Late::ApiError => e
139
+ puts "Error when calling MessagesApi->create_inbox_conversation_with_http_info: #{e}"
140
+ end
141
+ ```
142
+
143
+ ### Parameters
144
+
145
+ | Name | Type | Description | Notes |
146
+ | ---- | ---- | ----------- | ----- |
147
+ | **create_inbox_conversation_request** | [**CreateInboxConversationRequest**](CreateInboxConversationRequest.md) | | |
148
+
149
+ ### Return type
150
+
151
+ [**CreateInboxConversation201Response**](CreateInboxConversation201Response.md)
152
+
153
+ ### Authorization
154
+
155
+ [bearerAuth](../README.md#bearerAuth)
156
+
157
+ ### HTTP request headers
158
+
159
+ - **Content-Type**: application/json, multipart/form-data
160
+ - **Accept**: application/json
161
+
162
+
93
163
  ## delete_inbox_message
94
164
 
95
165
  > <UpdateYoutubeDefaultPlaylist200Response> delete_inbox_message(conversation_id, message_id, account_id)
data/docs/PostsApi.md CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://zernio.com/api*
7
7
  | [**bulk_upload_posts**](PostsApi.md#bulk_upload_posts) | **POST** /v1/posts/bulk-upload | Bulk upload from CSV |
8
8
  | [**create_post**](PostsApi.md#create_post) | **POST** /v1/posts | Create post |
9
9
  | [**delete_post**](PostsApi.md#delete_post) | **DELETE** /v1/posts/{postId} | Delete post |
10
+ | [**edit_post**](PostsApi.md#edit_post) | **POST** /v1/posts/{postId}/edit | Edit published post |
10
11
  | [**get_post**](PostsApi.md#get_post) | **GET** /v1/posts/{postId} | Get post |
11
12
  | [**list_posts**](PostsApi.md#list_posts) | **GET** /v1/posts | List posts |
12
13
  | [**retry_post**](PostsApi.md#retry_post) | **POST** /v1/posts/{postId}/retry | Retry failed post |
@@ -226,6 +227,77 @@ end
226
227
  - **Accept**: application/json
227
228
 
228
229
 
230
+ ## edit_post
231
+
232
+ > <EditPost200Response> edit_post(post_id, edit_post_request)
233
+
234
+ Edit published post
235
+
236
+ Edit a published post on a social media platform. Currently only supported for X (Twitter). **Requirements:** - Connected X account must have an active X Premium subscription - Must be within 1 hour of original publish time - Maximum 5 edits per tweet (enforced by X) - Text-only edits (media changes are not supported) The post record in Zernio is updated with the new content and edit history.
237
+
238
+ ### Examples
239
+
240
+ ```ruby
241
+ require 'time'
242
+ require 'late-sdk'
243
+ # setup authorization
244
+ Late.configure do |config|
245
+ # Configure Bearer authorization (JWT): bearerAuth
246
+ config.access_token = 'YOUR_BEARER_TOKEN'
247
+ end
248
+
249
+ api_instance = Late::PostsApi.new
250
+ post_id = 'post_id_example' # String |
251
+ edit_post_request = Late::EditPostRequest.new({platform: 'twitter', content: 'content_example'}) # EditPostRequest |
252
+
253
+ begin
254
+ # Edit published post
255
+ result = api_instance.edit_post(post_id, edit_post_request)
256
+ p result
257
+ rescue Late::ApiError => e
258
+ puts "Error when calling PostsApi->edit_post: #{e}"
259
+ end
260
+ ```
261
+
262
+ #### Using the edit_post_with_http_info variant
263
+
264
+ This returns an Array which contains the response data, status code and headers.
265
+
266
+ > <Array(<EditPost200Response>, Integer, Hash)> edit_post_with_http_info(post_id, edit_post_request)
267
+
268
+ ```ruby
269
+ begin
270
+ # Edit published post
271
+ data, status_code, headers = api_instance.edit_post_with_http_info(post_id, edit_post_request)
272
+ p status_code # => 2xx
273
+ p headers # => { ... }
274
+ p data # => <EditPost200Response>
275
+ rescue Late::ApiError => e
276
+ puts "Error when calling PostsApi->edit_post_with_http_info: #{e}"
277
+ end
278
+ ```
279
+
280
+ ### Parameters
281
+
282
+ | Name | Type | Description | Notes |
283
+ | ---- | ---- | ----------- | ----- |
284
+ | **post_id** | **String** | | |
285
+ | **edit_post_request** | [**EditPostRequest**](EditPostRequest.md) | | |
286
+
287
+ ### Return type
288
+
289
+ [**EditPost200Response**](EditPost200Response.md)
290
+
291
+ ### Authorization
292
+
293
+ [bearerAuth](../README.md#bearerAuth)
294
+
295
+ ### HTTP request headers
296
+
297
+ - **Content-Type**: application/json
298
+ - **Accept**: application/json
299
+
300
+
229
301
  ## get_post
230
302
 
231
303
  > <PostGetResponse> get_post(post_id)
@@ -8,6 +8,7 @@
8
8
  | **reply_settings** | **String** | Controls who can reply to the tweet. \&quot;following\&quot; allows only people you follow, \&quot;mentionedUsers\&quot; allows only mentioned users, \&quot;subscribers\&quot; allows only subscribers, \&quot;verified\&quot; allows only verified users. Omit for default (everyone can reply). For threads, applies to the first tweet only. Cannot be combined with replyToTweetId. | [optional] |
9
9
  | **thread_items** | [**Array&lt;TwitterPlatformDataThreadItemsInner&gt;**](TwitterPlatformDataThreadItemsInner.md) | Sequence of tweets in a thread. First item is the root tweet. | [optional] |
10
10
  | **poll** | [**TwitterPlatformDataPoll**](TwitterPlatformDataPoll.md) | | [optional] |
11
+ | **long_video** | **Boolean** | Enable long video uploads (over 140 seconds) using amplify_video media category. Requires the connected X account to have an active X Premium subscription. When true, videos are uploaded with the amplify_video category which supports longer durations (up to 10 minutes via API). When false or omitted, the standard tweet_video category is used (140 second limit). Note that not all Premium accounts have API long-video access, as X may require separate allowlisting. | [optional][default to false] |
11
12
 
12
13
  ## Example
13
14
 
@@ -18,7 +19,8 @@ instance = Late::TwitterPlatformData.new(
18
19
  reply_to_tweet_id: null,
19
20
  reply_settings: null,
20
21
  thread_items: null,
21
- poll: null
22
+ poll: null,
23
+ long_video: null
22
24
  )
23
25
  ```
24
26
 
@@ -7,6 +7,7 @@
7
7
  | **content** | **String** | | [optional] |
8
8
  | **scheduled_for** | **Time** | | [optional] |
9
9
  | **tiktok_settings** | [**TikTokPlatformData**](TikTokPlatformData.md) | Root-level TikTok settings applied to all TikTok platforms. Merged into each platform&#39;s platformSpecificData, with platform-specific settings taking precedence. | [optional] |
10
+ | **facebook_settings** | [**FacebookPlatformData**](FacebookPlatformData.md) | Root-level Facebook settings applied to all Facebook platforms. Merged into each platform&#39;s platformSpecificData, with platform-specific settings taking precedence. | [optional] |
10
11
  | **recycling** | [**RecyclingConfig**](RecyclingConfig.md) | | [optional] |
11
12
 
12
13
  ## Example
@@ -18,6 +19,7 @@ instance = Late::UpdatePostRequest.new(
18
19
  content: null,
19
20
  scheduled_for: null,
20
21
  tiktok_settings: null,
22
+ facebook_settings: null,
21
23
  recycling: null
22
24
  )
23
25
  ```
@@ -99,6 +99,74 @@ module Late
99
99
  return data, status_code, headers
100
100
  end
101
101
 
102
+ # Create conversation
103
+ # Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. **Currently supported platforms:** Twitter/X only. Other platforms will return `PLATFORM_NOT_SUPPORTED`. **DM eligibility:** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the `receives_your_dm` field). If not, a 422 error with code `DM_NOT_ALLOWED` is returned. You can skip this check with `skipDmCheck: true` if you have already verified eligibility. **X API tier requirement:** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits:** 200 requests per 15 minutes, 1,000 per 24 hours per user, 15,000 per 24 hours per app (shared across all DM endpoints).
104
+ # @param create_inbox_conversation_request [CreateInboxConversationRequest]
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [CreateInboxConversation201Response]
107
+ def create_inbox_conversation(create_inbox_conversation_request, opts = {})
108
+ data, _status_code, _headers = create_inbox_conversation_with_http_info(create_inbox_conversation_request, opts)
109
+ data
110
+ end
111
+
112
+ # Create conversation
113
+ # Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. **Currently supported platforms:** Twitter/X only. Other platforms will return &#x60;PLATFORM_NOT_SUPPORTED&#x60;. **DM eligibility:** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the &#x60;receives_your_dm&#x60; field). If not, a 422 error with code &#x60;DM_NOT_ALLOWED&#x60; is returned. You can skip this check with &#x60;skipDmCheck: true&#x60; if you have already verified eligibility. **X API tier requirement:** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits:** 200 requests per 15 minutes, 1,000 per 24 hours per user, 15,000 per 24 hours per app (shared across all DM endpoints).
114
+ # @param create_inbox_conversation_request [CreateInboxConversationRequest]
115
+ # @param [Hash] opts the optional parameters
116
+ # @return [Array<(CreateInboxConversation201Response, Integer, Hash)>] CreateInboxConversation201Response data, response status code and response headers
117
+ def create_inbox_conversation_with_http_info(create_inbox_conversation_request, opts = {})
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug 'Calling API: MessagesApi.create_inbox_conversation ...'
120
+ end
121
+ # verify the required parameter 'create_inbox_conversation_request' is set
122
+ if @api_client.config.client_side_validation && create_inbox_conversation_request.nil?
123
+ fail ArgumentError, "Missing the required parameter 'create_inbox_conversation_request' when calling MessagesApi.create_inbox_conversation"
124
+ end
125
+ # resource path
126
+ local_var_path = '/v1/inbox/conversations'
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # header parameters
132
+ header_params = opts[:header_params] || {}
133
+ # HTTP header 'Accept' (if needed)
134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
135
+ # HTTP header 'Content-Type'
136
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
137
+ if !content_type.nil?
138
+ header_params['Content-Type'] = content_type
139
+ end
140
+
141
+ # form parameters
142
+ form_params = opts[:form_params] || {}
143
+
144
+ # http body (model)
145
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_inbox_conversation_request)
146
+
147
+ # return_type
148
+ return_type = opts[:debug_return_type] || 'CreateInboxConversation201Response'
149
+
150
+ # auth_names
151
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
152
+
153
+ new_options = opts.merge(
154
+ :operation => :"MessagesApi.create_inbox_conversation",
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: MessagesApi#create_inbox_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
102
170
  # Delete message
103
171
  # Delete a message from a conversation. Platform support varies: - **Telegram**: Full delete (bot's own messages anytime, others if admin) - **X/Twitter**: Full delete (own DM events only) - **Bluesky**: Delete for self only (recipient still sees it) - **Reddit**: Delete from sender's view only - **Facebook, Instagram, WhatsApp**: Not supported (returns 400)
104
172
  # @param conversation_id [String] The conversation ID
@@ -218,6 +218,80 @@ module Late
218
218
  return data, status_code, headers
219
219
  end
220
220
 
221
+ # Edit published post
222
+ # Edit a published post on a social media platform. Currently only supported for X (Twitter). **Requirements:** - Connected X account must have an active X Premium subscription - Must be within 1 hour of original publish time - Maximum 5 edits per tweet (enforced by X) - Text-only edits (media changes are not supported) The post record in Zernio is updated with the new content and edit history.
223
+ # @param post_id [String]
224
+ # @param edit_post_request [EditPostRequest]
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [EditPost200Response]
227
+ def edit_post(post_id, edit_post_request, opts = {})
228
+ data, _status_code, _headers = edit_post_with_http_info(post_id, edit_post_request, opts)
229
+ data
230
+ end
231
+
232
+ # Edit published post
233
+ # Edit a published post on a social media platform. Currently only supported for X (Twitter). **Requirements:** - Connected X account must have an active X Premium subscription - Must be within 1 hour of original publish time - Maximum 5 edits per tweet (enforced by X) - Text-only edits (media changes are not supported) The post record in Zernio is updated with the new content and edit history.
234
+ # @param post_id [String]
235
+ # @param edit_post_request [EditPostRequest]
236
+ # @param [Hash] opts the optional parameters
237
+ # @return [Array<(EditPost200Response, Integer, Hash)>] EditPost200Response data, response status code and response headers
238
+ def edit_post_with_http_info(post_id, edit_post_request, opts = {})
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug 'Calling API: PostsApi.edit_post ...'
241
+ end
242
+ # verify the required parameter 'post_id' is set
243
+ if @api_client.config.client_side_validation && post_id.nil?
244
+ fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.edit_post"
245
+ end
246
+ # verify the required parameter 'edit_post_request' is set
247
+ if @api_client.config.client_side_validation && edit_post_request.nil?
248
+ fail ArgumentError, "Missing the required parameter 'edit_post_request' when calling PostsApi.edit_post"
249
+ end
250
+ # resource path
251
+ local_var_path = '/v1/posts/{postId}/edit'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s))
252
+
253
+ # query parameters
254
+ query_params = opts[:query_params] || {}
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ # HTTP header 'Accept' (if needed)
259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
260
+ # HTTP header 'Content-Type'
261
+ content_type = @api_client.select_header_content_type(['application/json'])
262
+ if !content_type.nil?
263
+ header_params['Content-Type'] = content_type
264
+ end
265
+
266
+ # form parameters
267
+ form_params = opts[:form_params] || {}
268
+
269
+ # http body (model)
270
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(edit_post_request)
271
+
272
+ # return_type
273
+ return_type = opts[:debug_return_type] || 'EditPost200Response'
274
+
275
+ # auth_names
276
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
277
+
278
+ new_options = opts.merge(
279
+ :operation => :"PostsApi.edit_post",
280
+ :header_params => header_params,
281
+ :query_params => query_params,
282
+ :form_params => form_params,
283
+ :body => post_body,
284
+ :auth_names => auth_names,
285
+ :return_type => return_type
286
+ )
287
+
288
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug "API called: PostsApi#edit_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
291
+ end
292
+ return data, status_code, headers
293
+ end
294
+
221
295
  # Get post
222
296
  # Fetch a single post by ID. For published posts, this returns platformPostUrl for each platform.
223
297
  # @param post_id [String]