late-sdk 0.0.699 → 0.0.701
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 +2 -0
- data/docs/CommentAutomationsApi.md +1 -1
- data/docs/CreateCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/CreateCommentAutomationRequest.md +2 -0
- data/docs/GetCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/GetCommentAutomation200ResponseLogsInner.md +2 -0
- data/docs/GetInboxConversationMessages200ResponseMessagesInnerAttachmentsInner.md +3 -1
- data/docs/GetMessageAttachment200Response.md +22 -0
- data/docs/ListCommentAutomations200ResponseAutomationsInner.md +2 -0
- data/docs/MessagesApi.md +80 -0
- data/docs/UpdateCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/UpdateCommentAutomationRequest.md +2 -0
- data/lib/zernio-sdk/api/comment_automations_api.rb +2 -2
- data/lib/zernio-sdk/api/messages_api.rb +93 -0
- data/lib/zernio-sdk/models/create_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/create_comment_automation_request.rb +13 -1
- data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/get_comment_automation200_response_logs_inner.rb +23 -1
- data/lib/zernio-sdk/models/get_inbox_conversation_messages200_response_messages_inner_attachments_inner.rb +13 -1
- data/lib/zernio-sdk/models/get_message_attachment200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_comment_automations200_response_automations_inner.rb +11 -1
- data/lib/zernio-sdk/models/update_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/update_comment_automation_request.rb +11 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +91 -1
- data/spec/api/comment_automations_api_spec.rb +1 -1
- data/spec/api/messages_api_spec.rb +16 -0
- data/spec/models/create_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/create_comment_automation_request_spec.rb +6 -0
- data/spec/models/get_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +10 -0
- data/spec/models/get_inbox_conversation_messages200_response_messages_inner_attachments_inner_spec.rb +6 -0
- data/spec/models/get_message_attachment200_response_spec.rb +48 -0
- data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +6 -0
- data/spec/models/update_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/update_comment_automation_request_spec.rb +6 -0
- data/zernio-sdk-0.0.701.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.699.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a9fc572dc24c0eaabbe3af4d98be9e38e83598d92718ffc393207eb3a42d155
|
|
4
|
+
data.tar.gz: 4c22b60f5f193a785e446cabe43ae771d59e1c39fd69a81848d1e8068328a388
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 712b461f1cc5087ff8a2a43c61a23b692577715eaf384d8c5f93814f84ce7d9d54ca9552a635fc0ddb055ae3c76882b29b01a19a085566346a8e6a11fa92ec36
|
|
7
|
+
data.tar.gz: b6fa696109c46c545798e1588710a1dfdd8933f09aff95632f02143f3d5070812beac19602a8c666792ef4558ce85568821671319f64b9687c1a8d59d37cc1c7
|
data/README.md
CHANGED
|
@@ -364,6 +364,7 @@ Class | Method | HTTP request | Description
|
|
|
364
364
|
*Zernio::MessagesApi* | [**edit_inbox_message**](docs/MessagesApi.md#edit_inbox_message) | **PATCH** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Edit message
|
|
365
365
|
*Zernio::MessagesApi* | [**get_inbox_conversation**](docs/MessagesApi.md#get_inbox_conversation) | **GET** /v1/inbox/conversations/{conversationId} | Get conversation
|
|
366
366
|
*Zernio::MessagesApi* | [**get_inbox_conversation_messages**](docs/MessagesApi.md#get_inbox_conversation_messages) | **GET** /v1/inbox/conversations/{conversationId}/messages | List messages
|
|
367
|
+
*Zernio::MessagesApi* | [**get_message_attachment**](docs/MessagesApi.md#get_message_attachment) | **GET** /v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index} | Resolve message attachment
|
|
367
368
|
*Zernio::MessagesApi* | [**list_inbox_conversations**](docs/MessagesApi.md#list_inbox_conversations) | **GET** /v1/inbox/conversations | List conversations
|
|
368
369
|
*Zernio::MessagesApi* | [**mark_conversation_read**](docs/MessagesApi.md#mark_conversation_read) | **POST** /v1/inbox/conversations/{conversationId}/read | Mark a conversation as read
|
|
369
370
|
*Zernio::MessagesApi* | [**remove_message_reaction**](docs/MessagesApi.md#remove_message_reaction) | **DELETE** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Remove reaction
|
|
@@ -1226,6 +1227,7 @@ Class | Method | HTTP request | Description
|
|
|
1226
1227
|
- [Zernio::GetLinkedInSupplyForecastRequestCompetingBid](docs/GetLinkedInSupplyForecastRequestCompetingBid.md)
|
|
1227
1228
|
- [Zernio::GetMediaPresignedUrl200Response](docs/GetMediaPresignedUrl200Response.md)
|
|
1228
1229
|
- [Zernio::GetMediaPresignedUrlRequest](docs/GetMediaPresignedUrlRequest.md)
|
|
1230
|
+
- [Zernio::GetMessageAttachment200Response](docs/GetMessageAttachment200Response.md)
|
|
1229
1231
|
- [Zernio::GetMessengerMenu200Response](docs/GetMessengerMenu200Response.md)
|
|
1230
1232
|
- [Zernio::GetPendingOAuthData200Response](docs/GetPendingOAuthData200Response.md)
|
|
1231
1233
|
- [Zernio::GetPendingOAuthData200ResponseOrganizationsInner](docs/GetPendingOAuthData200ResponseOrganizationsInner.md)
|
|
@@ -18,7 +18,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
18
18
|
|
|
19
19
|
Create comment-to-DM automation
|
|
20
20
|
|
|
21
|
-
Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
|
|
21
|
+
Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Set `alsoMatchInDms: true` on a `comment` automation to also answer people who send a keyword as a direct message instead of commenting it. One automation then covers both doors, and each door is deduplicated separately (someone who already got the DM from their comment still gets it if they later DM the keyword). Requires at least one keyword. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
|
|
22
22
|
|
|
23
23
|
### Examples
|
|
24
24
|
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| **comment_reply_delay_seconds** | **Integer** | Seconds waited before the public reply is posted. Absent when it follows the DM immediately. | [optional] |
|
|
26
26
|
| **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
|
|
27
27
|
| **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
|
|
28
|
+
| **also_match_in_dms** | **Boolean** | Whether these keywords also fire on a plain inbound DM. | [optional] |
|
|
28
29
|
| **is_active** | **Boolean** | | [optional] |
|
|
29
30
|
| **stats** | [**CreateCommentAutomation200ResponseAutomationStats**](CreateCommentAutomation200ResponseAutomationStats.md) | | [optional] |
|
|
30
31
|
| **created_at** | **Time** | | [optional] |
|
|
@@ -56,6 +57,7 @@ instance = Zernio::CreateCommentAutomation200ResponseAutomation.new(
|
|
|
56
57
|
comment_reply_delay_seconds: null,
|
|
57
58
|
audience: null,
|
|
58
59
|
follow_gate: null,
|
|
60
|
+
also_match_in_dms: null,
|
|
59
61
|
is_active: null,
|
|
60
62
|
stats: null,
|
|
61
63
|
created_at: null
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| **click_tag** | **String** | Optional tag applied to a contact when they click a tracked link (requires linkTracking). Lets you segment clickers for broadcasts/sequences. | [optional] |
|
|
26
26
|
| **dm_delay_seconds** | **Integer** | Seconds to wait after the trigger before sending the DM. Omit or send 0 to reply immediately (the default). Max 86400 (24h). The trigger is still matched and deduplicated the moment the comment arrives, so a delay only moves when the response is sent. | [optional] |
|
|
27
27
|
| **comment_reply_delay_seconds** | **Integer** | Seconds to wait before posting the public comment reply. Omit or send 0 to post it right after the DM (the default). The reply never goes out before the DM, so a value below dmDelaySeconds is raised to it. Ignored when trigger=story_reply, which has no public reply. | [optional] |
|
|
28
|
+
| **also_match_in_dms** | **Boolean** | Also fire these keywords on a plain inbound DM, so the automation answers people who message the keyword instead of commenting it. Requires at least one keyword (an empty keyword list means 'match anything', which would answer every inbound message) and is rejected on story_reply automations, which already trigger on DMs. Dedup is per door: a contact who already received the DM from their comment can still receive it from a DM. | [optional][default to false] |
|
|
28
29
|
| **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
|
|
29
30
|
| **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
|
|
30
31
|
|
|
@@ -55,6 +56,7 @@ instance = Zernio::CreateCommentAutomationRequest.new(
|
|
|
55
56
|
click_tag: null,
|
|
56
57
|
dm_delay_seconds: null,
|
|
57
58
|
comment_reply_delay_seconds: null,
|
|
59
|
+
also_match_in_dms: null,
|
|
58
60
|
audience: null,
|
|
59
61
|
follow_gate: null
|
|
60
62
|
)
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
| **comment_reply_delay_seconds** | **Integer** | Seconds waited before the public reply is posted. Absent when it follows the DM immediately. | [optional] |
|
|
29
29
|
| **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
|
|
30
30
|
| **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
|
|
31
|
+
| **also_match_in_dms** | **Boolean** | Whether these keywords also fire on a plain inbound DM. | [optional] |
|
|
31
32
|
| **is_active** | **Boolean** | | [optional] |
|
|
32
33
|
| **stats** | [**CreateCommentAutomation200ResponseAutomationStats**](CreateCommentAutomation200ResponseAutomationStats.md) | | [optional] |
|
|
33
34
|
| **created_at** | **Time** | | [optional] |
|
|
@@ -63,6 +64,7 @@ instance = Zernio::GetCommentAutomation200ResponseAutomation.new(
|
|
|
63
64
|
comment_reply_delay_seconds: null,
|
|
64
65
|
audience: null,
|
|
65
66
|
follow_gate: null,
|
|
67
|
+
also_match_in_dms: null,
|
|
66
68
|
is_active: null,
|
|
67
69
|
stats: null,
|
|
68
70
|
created_at: null,
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| **commenter_id** | **String** | | [optional] |
|
|
10
10
|
| **commenter_name** | **String** | | [optional] |
|
|
11
11
|
| **comment_text** | **String** | | [optional] |
|
|
12
|
+
| **source** | **String** | Which door triggered this send. Absent on rows written before this field existed (all of those are comment-triggered). | [optional] |
|
|
12
13
|
| **status** | **String** | DM outcome. 'pending' = the automation has a dmDelaySeconds and the response is queued but not sent yet. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap. | [optional] |
|
|
13
14
|
| **audience_outcome** | **String** | How the audience rule resolved. Absent on automations without one. | [optional] |
|
|
14
15
|
| **commenter_is_follower** | **Boolean** | Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account). | [optional] |
|
|
@@ -30,6 +31,7 @@ instance = Zernio::GetCommentAutomation200ResponseLogsInner.new(
|
|
|
30
31
|
commenter_id: null,
|
|
31
32
|
commenter_name: null,
|
|
32
33
|
comment_text: null,
|
|
34
|
+
source: null,
|
|
33
35
|
status: null,
|
|
34
36
|
audience_outcome: null,
|
|
35
37
|
commenter_is_follower: null,
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | | [optional] |
|
|
8
8
|
| **type** | **String** | | [optional] |
|
|
9
|
-
| **url** | **String** |
|
|
9
|
+
| **url** | **String** | Direct media link. On Instagram and Facebook this is a signed Meta CDN url that EXPIRES: use it now, do not store it. Persist `refreshUrl` instead. | [optional] |
|
|
10
|
+
| **refresh_url** | **String** | Instagram and Facebook only. Endpoint that resolves this attachment to a working url every time, re-minting it from Meta when the stored one has expired. Safe to store and render indefinitely. | [optional] |
|
|
10
11
|
| **filename** | **String** | | [optional] |
|
|
11
12
|
| **preview_url** | **String** | | [optional] |
|
|
12
13
|
|
|
@@ -19,6 +20,7 @@ instance = Zernio::GetInboxConversationMessages200ResponseMessagesInnerAttachmen
|
|
|
19
20
|
id: null,
|
|
20
21
|
type: null,
|
|
21
22
|
url: null,
|
|
23
|
+
refresh_url: null,
|
|
22
24
|
filename: null,
|
|
23
25
|
preview_url: null
|
|
24
26
|
)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::GetMessageAttachment200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **status** | **String** | | [optional] |
|
|
8
|
+
| **url** | **String** | Live media url. Short-lived; re-request this endpoint rather than storing it. | [optional] |
|
|
9
|
+
| **refreshed** | **Boolean** | True when the stored url had expired and was re-minted from the platform. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::GetMessageAttachment200Response.new(
|
|
17
|
+
status: success,
|
|
18
|
+
url: null,
|
|
19
|
+
refreshed: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| **click_tag** | **String** | Tag applied to a contact when they click a tracked link. | [optional] |
|
|
26
26
|
| **dm_delay_seconds** | **Integer** | Seconds waited after the trigger before the DM is sent. Absent when the DM goes out immediately. | [optional] |
|
|
27
27
|
| **comment_reply_delay_seconds** | **Integer** | Seconds waited before the public reply is posted. Absent when it follows the DM immediately. | [optional] |
|
|
28
|
+
| **also_match_in_dms** | **Boolean** | Whether these keywords also fire on a plain inbound DM. | [optional] |
|
|
28
29
|
| **is_active** | **Boolean** | | [optional] |
|
|
29
30
|
| **stats** | [**ListCommentAutomations200ResponseAutomationsInnerStats**](ListCommentAutomations200ResponseAutomationsInnerStats.md) | | [optional] |
|
|
30
31
|
| **created_at** | **Time** | | [optional] |
|
|
@@ -56,6 +57,7 @@ instance = Zernio::ListCommentAutomations200ResponseAutomationsInner.new(
|
|
|
56
57
|
click_tag: null,
|
|
57
58
|
dm_delay_seconds: null,
|
|
58
59
|
comment_reply_delay_seconds: null,
|
|
60
|
+
also_match_in_dms: null,
|
|
59
61
|
is_active: null,
|
|
60
62
|
stats: null,
|
|
61
63
|
created_at: null
|
data/docs/MessagesApi.md
CHANGED
|
@@ -10,6 +10,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
10
10
|
| [**edit_inbox_message**](MessagesApi.md#edit_inbox_message) | **PATCH** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Edit message |
|
|
11
11
|
| [**get_inbox_conversation**](MessagesApi.md#get_inbox_conversation) | **GET** /v1/inbox/conversations/{conversationId} | Get conversation |
|
|
12
12
|
| [**get_inbox_conversation_messages**](MessagesApi.md#get_inbox_conversation_messages) | **GET** /v1/inbox/conversations/{conversationId}/messages | List messages |
|
|
13
|
+
| [**get_message_attachment**](MessagesApi.md#get_message_attachment) | **GET** /v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index} | Resolve message attachment |
|
|
13
14
|
| [**list_inbox_conversations**](MessagesApi.md#list_inbox_conversations) | **GET** /v1/inbox/conversations | List conversations |
|
|
14
15
|
| [**mark_conversation_read**](MessagesApi.md#mark_conversation_read) | **POST** /v1/inbox/conversations/{conversationId}/read | Mark a conversation as read |
|
|
15
16
|
| [**remove_message_reaction**](MessagesApi.md#remove_message_reaction) | **DELETE** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Remove reaction |
|
|
@@ -458,6 +459,85 @@ end
|
|
|
458
459
|
- **Accept**: application/json
|
|
459
460
|
|
|
460
461
|
|
|
462
|
+
## get_message_attachment
|
|
463
|
+
|
|
464
|
+
> <GetMessageAttachment200Response> get_message_attachment(conversation_id, message_id, index, account_id, opts)
|
|
465
|
+
|
|
466
|
+
Resolve message attachment
|
|
467
|
+
|
|
468
|
+
Resolve one attachment on a message to a media url that works right now. Instagram and Facebook sign DM media urls per request and expire them, so the `url` on a message is a snapshot: it works when you read the message and stops working later. This endpoint checks the stored url and, when it has gone stale, re-mints the message's media from Meta and persists it before answering. The message id never expires, so this URL is the one to store — it is returned on each attachment as `refreshUrl`. By default it responds `302` to the live media url, so it can be used directly as an `<img src>` on a browser session. API-key integrators should pass `?format=json` and read `url` off the body, since a browser cannot attach an Authorization header to an image request. Only Instagram and Facebook media can be re-minted. On other platforms the stored url is returned as-is when it still resolves, and `404` otherwise.
|
|
469
|
+
|
|
470
|
+
### Examples
|
|
471
|
+
|
|
472
|
+
```ruby
|
|
473
|
+
require 'time'
|
|
474
|
+
require 'zernio-sdk'
|
|
475
|
+
# setup authorization
|
|
476
|
+
Zernio.configure do |config|
|
|
477
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
478
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
479
|
+
end
|
|
480
|
+
|
|
481
|
+
api_instance = Zernio::MessagesApi.new
|
|
482
|
+
conversation_id = 'conversation_id_example' # String | The conversation ID (Zernio id or platform conversation id)
|
|
483
|
+
message_id = 'message_id_example' # String | The message id as returned by the list-messages endpoint (the platform message id)
|
|
484
|
+
index = 56 # Integer | Zero-based position of the attachment in the message's attachments array
|
|
485
|
+
account_id = 'account_id_example' # String | Social account ID
|
|
486
|
+
opts = {
|
|
487
|
+
format: 'redirect' # String | `redirect` (default) answers 302 to the media; `json` returns the url in the body
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
begin
|
|
491
|
+
# Resolve message attachment
|
|
492
|
+
result = api_instance.get_message_attachment(conversation_id, message_id, index, account_id, opts)
|
|
493
|
+
p result
|
|
494
|
+
rescue Zernio::ApiError => e
|
|
495
|
+
puts "Error when calling MessagesApi->get_message_attachment: #{e}"
|
|
496
|
+
end
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
#### Using the get_message_attachment_with_http_info variant
|
|
500
|
+
|
|
501
|
+
This returns an Array which contains the response data, status code and headers.
|
|
502
|
+
|
|
503
|
+
> <Array(<GetMessageAttachment200Response>, Integer, Hash)> get_message_attachment_with_http_info(conversation_id, message_id, index, account_id, opts)
|
|
504
|
+
|
|
505
|
+
```ruby
|
|
506
|
+
begin
|
|
507
|
+
# Resolve message attachment
|
|
508
|
+
data, status_code, headers = api_instance.get_message_attachment_with_http_info(conversation_id, message_id, index, account_id, opts)
|
|
509
|
+
p status_code # => 2xx
|
|
510
|
+
p headers # => { ... }
|
|
511
|
+
p data # => <GetMessageAttachment200Response>
|
|
512
|
+
rescue Zernio::ApiError => e
|
|
513
|
+
puts "Error when calling MessagesApi->get_message_attachment_with_http_info: #{e}"
|
|
514
|
+
end
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
### Parameters
|
|
518
|
+
|
|
519
|
+
| Name | Type | Description | Notes |
|
|
520
|
+
| ---- | ---- | ----------- | ----- |
|
|
521
|
+
| **conversation_id** | **String** | The conversation ID (Zernio id or platform conversation id) | |
|
|
522
|
+
| **message_id** | **String** | The message id as returned by the list-messages endpoint (the platform message id) | |
|
|
523
|
+
| **index** | **Integer** | Zero-based position of the attachment in the message's attachments array | |
|
|
524
|
+
| **account_id** | **String** | Social account ID | |
|
|
525
|
+
| **format** | **String** | `redirect` (default) answers 302 to the media; `json` returns the url in the body | [optional][default to 'redirect'] |
|
|
526
|
+
|
|
527
|
+
### Return type
|
|
528
|
+
|
|
529
|
+
[**GetMessageAttachment200Response**](GetMessageAttachment200Response.md)
|
|
530
|
+
|
|
531
|
+
### Authorization
|
|
532
|
+
|
|
533
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
534
|
+
|
|
535
|
+
### HTTP request headers
|
|
536
|
+
|
|
537
|
+
- **Content-Type**: Not defined
|
|
538
|
+
- **Accept**: application/json
|
|
539
|
+
|
|
540
|
+
|
|
461
541
|
## list_inbox_conversations
|
|
462
542
|
|
|
463
543
|
> <ListInboxConversations200Response> list_inbox_conversations(opts)
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
| **comment_reply_variations** | **Array<String>** | Alternate public replies rotated at random with commentReply. Omitted when none. | [optional] |
|
|
19
19
|
| **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
|
|
20
20
|
| **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
|
|
21
|
+
| **also_match_in_dms** | **Boolean** | Whether these keywords also fire on a plain inbound DM. | [optional] |
|
|
21
22
|
| **is_active** | **Boolean** | | [optional] |
|
|
22
23
|
| **updated_at** | **Time** | | [optional] |
|
|
23
24
|
|
|
@@ -41,6 +42,7 @@ instance = Zernio::UpdateCommentAutomation200ResponseAutomation.new(
|
|
|
41
42
|
comment_reply_variations: null,
|
|
42
43
|
audience: null,
|
|
43
44
|
follow_gate: null,
|
|
45
|
+
also_match_in_dms: null,
|
|
44
46
|
is_active: null,
|
|
45
47
|
updated_at: null
|
|
46
48
|
)
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
| **comment_reply_variations** | **Array<String>** | Alternate public replies for random rotation. Pass [] to clear. | [optional] |
|
|
19
19
|
| **link_tracking** | **Boolean** | Wrap link buttons in a tracked redirect to count clicks. Pass false to send links untouched. | [optional] |
|
|
20
20
|
| **click_tag** | **String** | Tag applied to a contact when they click a tracked link (requires linkTracking). Empty string clears it. | [optional] |
|
|
21
|
+
| **also_match_in_dms** | **Boolean** | Also fire these keywords on a plain inbound DM. Enabling it requires the automation to end up with at least one keyword (this request's keywords if you send them, otherwise the stored ones) and is rejected on story_reply automations. | [optional] |
|
|
21
22
|
| **dm_delay_seconds** | **Integer** | Seconds to wait after the trigger before sending the DM. Send 0 to clear the delay and reply immediately. | [optional] |
|
|
22
23
|
| **comment_reply_delay_seconds** | **Integer** | Seconds to wait before posting the public comment reply. Send 0 to clear it. The reply never goes out before the DM. | [optional] |
|
|
23
24
|
| **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
|
|
@@ -44,6 +45,7 @@ instance = Zernio::UpdateCommentAutomationRequest.new(
|
|
|
44
45
|
comment_reply_variations: null,
|
|
45
46
|
link_tracking: null,
|
|
46
47
|
click_tag: null,
|
|
48
|
+
also_match_in_dms: null,
|
|
47
49
|
dm_delay_seconds: null,
|
|
48
50
|
comment_reply_delay_seconds: null,
|
|
49
51
|
audience: null,
|
|
@@ -20,7 +20,7 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create comment-to-DM automation
|
|
23
|
-
# Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
|
|
23
|
+
# Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Set `alsoMatchInDms: true` on a `comment` automation to also answer people who send a keyword as a direct message instead of commenting it. One automation then covers both doors, and each door is deduplicated separately (someone who already got the DM from their comment still gets it if they later DM the keyword). Requires at least one keyword. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
|
|
24
24
|
# @param create_comment_automation_request [CreateCommentAutomationRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [CreateCommentAutomation200Response]
|
|
@@ -30,7 +30,7 @@ module Zernio
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create comment-to-DM automation
|
|
33
|
-
# Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
|
|
33
|
+
# Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Set `alsoMatchInDms: true` on a `comment` automation to also answer people who send a keyword as a direct message instead of commenting it. One automation then covers both doors, and each door is deduplicated separately (someone who already got the DM from their comment still gets it if they later DM the keyword). Requires at least one keyword. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
|
|
34
34
|
# @param create_comment_automation_request [CreateCommentAutomationRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(CreateCommentAutomation200Response, Integer, Hash)>] CreateCommentAutomation200Response data, response status code and response headers
|
|
@@ -484,6 +484,99 @@ module Zernio
|
|
|
484
484
|
return data, status_code, headers
|
|
485
485
|
end
|
|
486
486
|
|
|
487
|
+
# Resolve message attachment
|
|
488
|
+
# Resolve one attachment on a message to a media url that works right now. Instagram and Facebook sign DM media urls per request and expire them, so the `url` on a message is a snapshot: it works when you read the message and stops working later. This endpoint checks the stored url and, when it has gone stale, re-mints the message's media from Meta and persists it before answering. The message id never expires, so this URL is the one to store — it is returned on each attachment as `refreshUrl`. By default it responds `302` to the live media url, so it can be used directly as an `<img src>` on a browser session. API-key integrators should pass `?format=json` and read `url` off the body, since a browser cannot attach an Authorization header to an image request. Only Instagram and Facebook media can be re-minted. On other platforms the stored url is returned as-is when it still resolves, and `404` otherwise.
|
|
489
|
+
# @param conversation_id [String] The conversation ID (Zernio id or platform conversation id)
|
|
490
|
+
# @param message_id [String] The message id as returned by the list-messages endpoint (the platform message id)
|
|
491
|
+
# @param index [Integer] Zero-based position of the attachment in the message's attachments array
|
|
492
|
+
# @param account_id [String] Social account ID
|
|
493
|
+
# @param [Hash] opts the optional parameters
|
|
494
|
+
# @option opts [String] :format `redirect` (default) answers 302 to the media; `json` returns the url in the body (default to 'redirect')
|
|
495
|
+
# @return [GetMessageAttachment200Response]
|
|
496
|
+
def get_message_attachment(conversation_id, message_id, index, account_id, opts = {})
|
|
497
|
+
data, _status_code, _headers = get_message_attachment_with_http_info(conversation_id, message_id, index, account_id, opts)
|
|
498
|
+
data
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
# Resolve message attachment
|
|
502
|
+
# Resolve one attachment on a message to a media url that works right now. Instagram and Facebook sign DM media urls per request and expire them, so the `url` on a message is a snapshot: it works when you read the message and stops working later. This endpoint checks the stored url and, when it has gone stale, re-mints the message's media from Meta and persists it before answering. The message id never expires, so this URL is the one to store — it is returned on each attachment as `refreshUrl`. By default it responds `302` to the live media url, so it can be used directly as an `<img src>` on a browser session. API-key integrators should pass `?format=json` and read `url` off the body, since a browser cannot attach an Authorization header to an image request. Only Instagram and Facebook media can be re-minted. On other platforms the stored url is returned as-is when it still resolves, and `404` otherwise.
|
|
503
|
+
# @param conversation_id [String] The conversation ID (Zernio id or platform conversation id)
|
|
504
|
+
# @param message_id [String] The message id as returned by the list-messages endpoint (the platform message id)
|
|
505
|
+
# @param index [Integer] Zero-based position of the attachment in the message's attachments array
|
|
506
|
+
# @param account_id [String] Social account ID
|
|
507
|
+
# @param [Hash] opts the optional parameters
|
|
508
|
+
# @option opts [String] :format `redirect` (default) answers 302 to the media; `json` returns the url in the body (default to 'redirect')
|
|
509
|
+
# @return [Array<(GetMessageAttachment200Response, Integer, Hash)>] GetMessageAttachment200Response data, response status code and response headers
|
|
510
|
+
def get_message_attachment_with_http_info(conversation_id, message_id, index, account_id, opts = {})
|
|
511
|
+
if @api_client.config.debugging
|
|
512
|
+
@api_client.config.logger.debug 'Calling API: MessagesApi.get_message_attachment ...'
|
|
513
|
+
end
|
|
514
|
+
# verify the required parameter 'conversation_id' is set
|
|
515
|
+
if @api_client.config.client_side_validation && conversation_id.nil?
|
|
516
|
+
fail ArgumentError, "Missing the required parameter 'conversation_id' when calling MessagesApi.get_message_attachment"
|
|
517
|
+
end
|
|
518
|
+
# verify the required parameter 'message_id' is set
|
|
519
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
520
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MessagesApi.get_message_attachment"
|
|
521
|
+
end
|
|
522
|
+
# verify the required parameter 'index' is set
|
|
523
|
+
if @api_client.config.client_side_validation && index.nil?
|
|
524
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling MessagesApi.get_message_attachment"
|
|
525
|
+
end
|
|
526
|
+
if @api_client.config.client_side_validation && index < 0
|
|
527
|
+
fail ArgumentError, 'invalid value for "index" when calling MessagesApi.get_message_attachment, must be greater than or equal to 0.'
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
# verify the required parameter 'account_id' is set
|
|
531
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
532
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MessagesApi.get_message_attachment"
|
|
533
|
+
end
|
|
534
|
+
allowable_values = ["redirect", "json"]
|
|
535
|
+
if @api_client.config.client_side_validation && opts[:'format'] && !allowable_values.include?(opts[:'format'])
|
|
536
|
+
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
|
537
|
+
end
|
|
538
|
+
# resource path
|
|
539
|
+
local_var_path = '/v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index}'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'messageId' + '}', CGI.escape(message_id.to_s)).sub('{' + 'index' + '}', CGI.escape(index.to_s))
|
|
540
|
+
|
|
541
|
+
# query parameters
|
|
542
|
+
query_params = opts[:query_params] || {}
|
|
543
|
+
query_params[:'accountId'] = account_id
|
|
544
|
+
query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
|
|
545
|
+
|
|
546
|
+
# header parameters
|
|
547
|
+
header_params = opts[:header_params] || {}
|
|
548
|
+
# HTTP header 'Accept' (if needed)
|
|
549
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
550
|
+
|
|
551
|
+
# form parameters
|
|
552
|
+
form_params = opts[:form_params] || {}
|
|
553
|
+
|
|
554
|
+
# http body (model)
|
|
555
|
+
post_body = opts[:debug_body]
|
|
556
|
+
|
|
557
|
+
# return_type
|
|
558
|
+
return_type = opts[:debug_return_type] || 'GetMessageAttachment200Response'
|
|
559
|
+
|
|
560
|
+
# auth_names
|
|
561
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
562
|
+
|
|
563
|
+
new_options = opts.merge(
|
|
564
|
+
:operation => :"MessagesApi.get_message_attachment",
|
|
565
|
+
:header_params => header_params,
|
|
566
|
+
:query_params => query_params,
|
|
567
|
+
:form_params => form_params,
|
|
568
|
+
:body => post_body,
|
|
569
|
+
:auth_names => auth_names,
|
|
570
|
+
:return_type => return_type
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
574
|
+
if @api_client.config.debugging
|
|
575
|
+
@api_client.config.logger.debug "API called: MessagesApi#get_message_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
576
|
+
end
|
|
577
|
+
return data, status_code, headers
|
|
578
|
+
end
|
|
579
|
+
|
|
487
580
|
# List conversations
|
|
488
581
|
# Fetch conversations (DMs) from all connected messaging accounts in a single API call. Supports filtering by profile and platform. Results are aggregated and deduplicated. Supported platforms: Facebook, Instagram, Twitter/X, Bluesky, Reddit, Telegram. Twitter/X limitation: X has replaced traditional DMs with encrypted \"X Chat\" for many accounts. Messages sent or received through encrypted X Chat are not accessible via X's API (the /2/dm_events endpoint only returns legacy unencrypted DMs). This means some Twitter/X conversations may show only outgoing messages or appear empty. This is an X platform limitation that affects all third-party applications. See X's docs on encrypted messaging for more details. Instagram and Facebook pre-connect history: when one of these accounts is connected, Zernio replays the DM history the account already holds on Meta, so conversations that began before the account was connected appear here. Up to 500 conversations per account are replayed. The replay runs in the background and can finish after a listing you have already taken, and replayed conversations keep their original lastMessageAt, so they sort into date order rather than appearing at the top. If you mirror this endpoint into your own store, re-run the sweep rather than relying on a single pass at connect time. Replayed history emits no webhooks and is stored as already read, so it never affects unread counts. Threads that Meta refuses to serve are skipped, and an account whose Instagram \"connected tools\" message access is turned off is not replayed at all.
|
|
489
582
|
# @param [Hash] opts the optional parameters
|
|
@@ -65,6 +65,9 @@ module Zernio
|
|
|
65
65
|
|
|
66
66
|
attr_accessor :follow_gate
|
|
67
67
|
|
|
68
|
+
# Whether these keywords also fire on a plain inbound DM.
|
|
69
|
+
attr_accessor :also_match_in_dms
|
|
70
|
+
|
|
68
71
|
attr_accessor :is_active
|
|
69
72
|
|
|
70
73
|
attr_accessor :stats
|
|
@@ -117,6 +120,7 @@ module Zernio
|
|
|
117
120
|
:'comment_reply_delay_seconds' => :'commentReplyDelaySeconds',
|
|
118
121
|
:'audience' => :'audience',
|
|
119
122
|
:'follow_gate' => :'followGate',
|
|
123
|
+
:'also_match_in_dms' => :'alsoMatchInDms',
|
|
120
124
|
:'is_active' => :'isActive',
|
|
121
125
|
:'stats' => :'stats',
|
|
122
126
|
:'created_at' => :'createdAt'
|
|
@@ -157,6 +161,7 @@ module Zernio
|
|
|
157
161
|
:'comment_reply_delay_seconds' => :'Integer',
|
|
158
162
|
:'audience' => :'CommentAutomationAudience',
|
|
159
163
|
:'follow_gate' => :'CommentAutomationFollowGate',
|
|
164
|
+
:'also_match_in_dms' => :'Boolean',
|
|
160
165
|
:'is_active' => :'Boolean',
|
|
161
166
|
:'stats' => :'CreateCommentAutomation200ResponseAutomationStats',
|
|
162
167
|
:'created_at' => :'Time'
|
|
@@ -280,6 +285,10 @@ module Zernio
|
|
|
280
285
|
self.follow_gate = attributes[:'follow_gate']
|
|
281
286
|
end
|
|
282
287
|
|
|
288
|
+
if attributes.key?(:'also_match_in_dms')
|
|
289
|
+
self.also_match_in_dms = attributes[:'also_match_in_dms']
|
|
290
|
+
end
|
|
291
|
+
|
|
283
292
|
if attributes.key?(:'is_active')
|
|
284
293
|
self.is_active = attributes[:'is_active']
|
|
285
294
|
end
|
|
@@ -358,6 +367,7 @@ module Zernio
|
|
|
358
367
|
comment_reply_delay_seconds == o.comment_reply_delay_seconds &&
|
|
359
368
|
audience == o.audience &&
|
|
360
369
|
follow_gate == o.follow_gate &&
|
|
370
|
+
also_match_in_dms == o.also_match_in_dms &&
|
|
361
371
|
is_active == o.is_active &&
|
|
362
372
|
stats == o.stats &&
|
|
363
373
|
created_at == o.created_at
|
|
@@ -372,7 +382,7 @@ module Zernio
|
|
|
372
382
|
# Calculates hash code according to all attributes.
|
|
373
383
|
# @return [Integer] Hash code
|
|
374
384
|
def hash
|
|
375
|
-
[id, name, platform, trigger, platform_post_id, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, dm_delay_seconds, comment_reply_delay_seconds, audience, follow_gate, is_active, stats, created_at].hash
|
|
385
|
+
[id, name, platform, trigger, platform_post_id, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, dm_delay_seconds, comment_reply_delay_seconds, audience, follow_gate, also_match_in_dms, is_active, stats, created_at].hash
|
|
376
386
|
end
|
|
377
387
|
|
|
378
388
|
# Builds the object from hash
|
|
@@ -77,6 +77,9 @@ module Zernio
|
|
|
77
77
|
# Seconds to wait before posting the public comment reply. Omit or send 0 to post it right after the DM (the default). The reply never goes out before the DM, so a value below dmDelaySeconds is raised to it. Ignored when trigger=story_reply, which has no public reply.
|
|
78
78
|
attr_accessor :comment_reply_delay_seconds
|
|
79
79
|
|
|
80
|
+
# Also fire these keywords on a plain inbound DM, so the automation answers people who message the keyword instead of commenting it. Requires at least one keyword (an empty keyword list means 'match anything', which would answer every inbound message) and is rejected on story_reply automations, which already trigger on DMs. Dedup is per door: a contact who already received the DM from their comment can still receive it from a DM.
|
|
81
|
+
attr_accessor :also_match_in_dms
|
|
82
|
+
|
|
80
83
|
attr_accessor :audience
|
|
81
84
|
|
|
82
85
|
attr_accessor :follow_gate
|
|
@@ -127,6 +130,7 @@ module Zernio
|
|
|
127
130
|
:'click_tag' => :'clickTag',
|
|
128
131
|
:'dm_delay_seconds' => :'dmDelaySeconds',
|
|
129
132
|
:'comment_reply_delay_seconds' => :'commentReplyDelaySeconds',
|
|
133
|
+
:'also_match_in_dms' => :'alsoMatchInDms',
|
|
130
134
|
:'audience' => :'audience',
|
|
131
135
|
:'follow_gate' => :'followGate'
|
|
132
136
|
}
|
|
@@ -166,6 +170,7 @@ module Zernio
|
|
|
166
170
|
:'click_tag' => :'String',
|
|
167
171
|
:'dm_delay_seconds' => :'Integer',
|
|
168
172
|
:'comment_reply_delay_seconds' => :'Integer',
|
|
173
|
+
:'also_match_in_dms' => :'Boolean',
|
|
169
174
|
:'audience' => :'CommentAutomationAudience',
|
|
170
175
|
:'follow_gate' => :'CommentAutomationFollowGate'
|
|
171
176
|
}
|
|
@@ -302,6 +307,12 @@ module Zernio
|
|
|
302
307
|
self.comment_reply_delay_seconds = attributes[:'comment_reply_delay_seconds']
|
|
303
308
|
end
|
|
304
309
|
|
|
310
|
+
if attributes.key?(:'also_match_in_dms')
|
|
311
|
+
self.also_match_in_dms = attributes[:'also_match_in_dms']
|
|
312
|
+
else
|
|
313
|
+
self.also_match_in_dms = false
|
|
314
|
+
end
|
|
315
|
+
|
|
305
316
|
if attributes.key?(:'audience')
|
|
306
317
|
self.audience = attributes[:'audience']
|
|
307
318
|
end
|
|
@@ -549,6 +560,7 @@ module Zernio
|
|
|
549
560
|
click_tag == o.click_tag &&
|
|
550
561
|
dm_delay_seconds == o.dm_delay_seconds &&
|
|
551
562
|
comment_reply_delay_seconds == o.comment_reply_delay_seconds &&
|
|
563
|
+
also_match_in_dms == o.also_match_in_dms &&
|
|
552
564
|
audience == o.audience &&
|
|
553
565
|
follow_gate == o.follow_gate
|
|
554
566
|
end
|
|
@@ -562,7 +574,7 @@ module Zernio
|
|
|
562
574
|
# Calculates hash code according to all attributes.
|
|
563
575
|
# @return [Integer] Hash code
|
|
564
576
|
def hash
|
|
565
|
-
[profile_id, account_id, trigger, platform_post_id, post_id, post_title, name, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, dm_delay_seconds, comment_reply_delay_seconds, audience, follow_gate].hash
|
|
577
|
+
[profile_id, account_id, trigger, platform_post_id, post_id, post_title, name, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, dm_delay_seconds, comment_reply_delay_seconds, also_match_in_dms, audience, follow_gate].hash
|
|
566
578
|
end
|
|
567
579
|
|
|
568
580
|
# Builds the object from hash
|
|
@@ -71,6 +71,9 @@ module Zernio
|
|
|
71
71
|
|
|
72
72
|
attr_accessor :follow_gate
|
|
73
73
|
|
|
74
|
+
# Whether these keywords also fire on a plain inbound DM.
|
|
75
|
+
attr_accessor :also_match_in_dms
|
|
76
|
+
|
|
74
77
|
attr_accessor :is_active
|
|
75
78
|
|
|
76
79
|
attr_accessor :stats
|
|
@@ -128,6 +131,7 @@ module Zernio
|
|
|
128
131
|
:'comment_reply_delay_seconds' => :'commentReplyDelaySeconds',
|
|
129
132
|
:'audience' => :'audience',
|
|
130
133
|
:'follow_gate' => :'followGate',
|
|
134
|
+
:'also_match_in_dms' => :'alsoMatchInDms',
|
|
131
135
|
:'is_active' => :'isActive',
|
|
132
136
|
:'stats' => :'stats',
|
|
133
137
|
:'created_at' => :'createdAt',
|
|
@@ -172,6 +176,7 @@ module Zernio
|
|
|
172
176
|
:'comment_reply_delay_seconds' => :'Integer',
|
|
173
177
|
:'audience' => :'CommentAutomationAudience',
|
|
174
178
|
:'follow_gate' => :'CommentAutomationFollowGate',
|
|
179
|
+
:'also_match_in_dms' => :'Boolean',
|
|
175
180
|
:'is_active' => :'Boolean',
|
|
176
181
|
:'stats' => :'CreateCommentAutomation200ResponseAutomationStats',
|
|
177
182
|
:'created_at' => :'Time',
|
|
@@ -308,6 +313,10 @@ module Zernio
|
|
|
308
313
|
self.follow_gate = attributes[:'follow_gate']
|
|
309
314
|
end
|
|
310
315
|
|
|
316
|
+
if attributes.key?(:'also_match_in_dms')
|
|
317
|
+
self.also_match_in_dms = attributes[:'also_match_in_dms']
|
|
318
|
+
end
|
|
319
|
+
|
|
311
320
|
if attributes.key?(:'is_active')
|
|
312
321
|
self.is_active = attributes[:'is_active']
|
|
313
322
|
end
|
|
@@ -393,6 +402,7 @@ module Zernio
|
|
|
393
402
|
comment_reply_delay_seconds == o.comment_reply_delay_seconds &&
|
|
394
403
|
audience == o.audience &&
|
|
395
404
|
follow_gate == o.follow_gate &&
|
|
405
|
+
also_match_in_dms == o.also_match_in_dms &&
|
|
396
406
|
is_active == o.is_active &&
|
|
397
407
|
stats == o.stats &&
|
|
398
408
|
created_at == o.created_at &&
|
|
@@ -408,7 +418,7 @@ module Zernio
|
|
|
408
418
|
# Calculates hash code according to all attributes.
|
|
409
419
|
# @return [Integer] Hash code
|
|
410
420
|
def hash
|
|
411
|
-
[id, name, platform, trigger, account_id, platform_post_id, post_id, post_title, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, dm_delay_seconds, comment_reply_delay_seconds, audience, follow_gate, is_active, stats, created_at, updated_at].hash
|
|
421
|
+
[id, name, platform, trigger, account_id, platform_post_id, post_id, post_title, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, dm_delay_seconds, comment_reply_delay_seconds, audience, follow_gate, also_match_in_dms, is_active, stats, created_at, updated_at].hash
|
|
412
422
|
end
|
|
413
423
|
|
|
414
424
|
# Builds the object from hash
|