late-sdk 0.0.67 → 0.0.69
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 +63 -0
- data/docs/AddBroadcastRecipientsRequest.md +20 -0
- data/docs/BroadcastsApi.md +699 -0
- data/docs/BulkCreateContactsRequest.md +24 -0
- data/docs/BulkCreateContactsRequestContactsInner.md +28 -0
- data/docs/CommentAutomationsApi.md +428 -0
- data/docs/ContactsApi.md +500 -0
- data/docs/CreateBroadcastRequest.md +32 -0
- data/docs/CreateBroadcastRequestMessage.md +20 -0
- data/docs/CreateBroadcastRequestMessageAttachmentsInner.md +22 -0
- data/docs/CreateBroadcastRequestSegmentFilters.md +20 -0
- data/docs/CreateBroadcastRequestTemplate.md +22 -0
- data/docs/CreateCommentAutomationRequest.md +36 -0
- data/docs/CreateContactRequest.md +38 -0
- data/docs/CreateCustomFieldRequest.md +26 -0
- data/docs/CreateSequenceRequest.md +32 -0
- data/docs/CreateSequenceRequestStepsInner.md +24 -0
- data/docs/CreateSequenceRequestStepsInnerMessage.md +18 -0
- data/docs/CustomFieldsApi.md +419 -0
- data/docs/EnrollContactsRequest.md +20 -0
- data/docs/ListCommentAutomations200Response.md +20 -0
- data/docs/ListCommentAutomations200ResponseAutomationsInner.md +42 -0
- data/docs/ListCommentAutomations200ResponseAutomationsInnerStats.md +24 -0
- data/docs/ScheduleBroadcastRequest.md +18 -0
- data/docs/SequencesApi.md +697 -0
- data/docs/SetContactFieldValueRequest.md +18 -0
- data/docs/TwitterPlatformData.md +3 -1
- data/docs/TwitterPlatformDataPoll.md +20 -0
- data/docs/UpdateCommentAutomationRequest.md +28 -0
- data/docs/UpdateContactRequest.md +32 -0
- data/docs/UpdateCustomFieldRequest.md +20 -0
- data/docs/WhatsAppApi.md +25 -25
- data/lib/late-sdk/api/broadcasts_api.rb +689 -0
- data/lib/late-sdk/api/comment_automations_api.rb +420 -0
- data/lib/late-sdk/api/contacts_api.rb +503 -0
- data/lib/late-sdk/api/custom_fields_api.rb +424 -0
- data/lib/late-sdk/api/sequences_api.rb +681 -0
- data/lib/late-sdk/api/whats_app_api.rb +50 -50
- data/lib/late-sdk/models/add_broadcast_recipients_request.rb +160 -0
- data/lib/late-sdk/models/bulk_create_contacts_request.rb +253 -0
- data/lib/late-sdk/models/bulk_create_contacts_request_contacts_inner.rb +228 -0
- data/lib/late-sdk/models/create_broadcast_request.rb +302 -0
- data/lib/late-sdk/models/create_broadcast_request_message.rb +158 -0
- data/lib/late-sdk/models/create_broadcast_request_message_attachments_inner.rb +165 -0
- data/lib/late-sdk/models/create_broadcast_request_segment_filters.rb +158 -0
- data/lib/late-sdk/models/create_broadcast_request_template.rb +168 -0
- data/lib/late-sdk/models/create_comment_automation_request.rb +359 -0
- data/lib/late-sdk/models/create_contact_request.rb +276 -0
- data/lib/late-sdk/models/create_custom_field_request.rb +262 -0
- data/lib/late-sdk/models/create_sequence_request.rb +308 -0
- data/lib/late-sdk/models/create_sequence_request_steps_inner.rb +208 -0
- data/lib/late-sdk/models/create_sequence_request_steps_inner_message.rb +147 -0
- data/lib/late-sdk/models/enroll_contacts_request.rb +178 -0
- data/lib/late-sdk/models/list_comment_automations200_response.rb +158 -0
- data/lib/late-sdk/models/list_comment_automations200_response_automations_inner.rb +303 -0
- data/lib/late-sdk/models/list_comment_automations200_response_automations_inner_stats.rb +174 -0
- data/lib/late-sdk/models/schedule_broadcast_request.rb +164 -0
- data/lib/late-sdk/models/set_contact_field_value_request.rb +150 -0
- data/lib/late-sdk/models/twitter_platform_data.rb +13 -4
- data/lib/late-sdk/models/twitter_platform_data_poll.rb +231 -0
- data/lib/late-sdk/models/update_comment_automation_request.rb +228 -0
- data/lib/late-sdk/models/update_contact_request.rb +212 -0
- data/lib/late-sdk/models/update_custom_field_request.rb +158 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +29 -0
- data/openapi.yaml +830 -13
- data/spec/api/broadcasts_api_spec.rb +154 -0
- data/spec/api/comment_automations_api_spec.rb +108 -0
- data/spec/api/contacts_api_spec.rb +122 -0
- data/spec/api/custom_fields_api_spec.rb +105 -0
- data/spec/api/sequences_api_spec.rb +153 -0
- data/spec/api/whats_app_api_spec.rb +25 -25
- data/spec/models/add_broadcast_recipients_request_spec.rb +42 -0
- data/spec/models/bulk_create_contacts_request_contacts_inner_spec.rb +66 -0
- data/spec/models/bulk_create_contacts_request_spec.rb +54 -0
- data/spec/models/create_broadcast_request_message_attachments_inner_spec.rb +48 -0
- data/spec/models/create_broadcast_request_message_spec.rb +42 -0
- data/spec/models/create_broadcast_request_segment_filters_spec.rb +42 -0
- data/spec/models/create_broadcast_request_spec.rb +82 -0
- data/spec/models/create_broadcast_request_template_spec.rb +48 -0
- data/spec/models/create_comment_automation_request_spec.rb +94 -0
- data/spec/models/create_contact_request_spec.rb +96 -0
- data/spec/models/create_custom_field_request_spec.rb +64 -0
- data/spec/models/create_sequence_request_spec.rb +82 -0
- data/spec/models/create_sequence_request_steps_inner_message_spec.rb +36 -0
- data/spec/models/create_sequence_request_steps_inner_spec.rb +54 -0
- data/spec/models/enroll_contacts_request_spec.rb +42 -0
- data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +116 -0
- data/spec/models/list_comment_automations200_response_automations_inner_stats_spec.rb +54 -0
- data/spec/models/list_comment_automations200_response_spec.rb +42 -0
- data/spec/models/schedule_broadcast_request_spec.rb +36 -0
- data/spec/models/set_contact_field_value_request_spec.rb +36 -0
- data/spec/models/twitter_platform_data_poll_spec.rb +42 -0
- data/spec/models/twitter_platform_data_spec.rb +6 -0
- data/spec/models/update_comment_automation_request_spec.rb +70 -0
- data/spec/models/update_contact_request_spec.rb +78 -0
- data/spec/models/update_custom_field_request_spec.rb +42 -0
- data/zernio-sdk-0.0.69.gem +0 -0
- metadata +118 -2
- data/zernio-sdk-0.0.67.gem +0 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Late
|
|
16
|
+
class CommentAutomationsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a comment-to-DM automation
|
|
23
|
+
# Create a keyword-triggered DM automation on an Instagram or Facebook post. When someone comments a matching keyword, they automatically receive a DM. Only one active automation per post is allowed.
|
|
24
|
+
# @param create_comment_automation_request [CreateCommentAutomationRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [nil]
|
|
27
|
+
def create_comment_automation(create_comment_automation_request, opts = {})
|
|
28
|
+
create_comment_automation_with_http_info(create_comment_automation_request, opts)
|
|
29
|
+
nil
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a comment-to-DM automation
|
|
33
|
+
# Create a keyword-triggered DM automation on an Instagram or Facebook post. When someone comments a matching keyword, they automatically receive a DM. Only one active automation per post is allowed.
|
|
34
|
+
# @param create_comment_automation_request [CreateCommentAutomationRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
+
def create_comment_automation_with_http_info(create_comment_automation_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: CommentAutomationsApi.create_comment_automation ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_comment_automation_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_comment_automation_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_comment_automation_request' when calling CommentAutomationsApi.create_comment_automation"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v1/comment-automations'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_comment_automation_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type]
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"CommentAutomationsApi.create_comment_automation",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: CommentAutomationsApi#create_comment_automation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Delete automation and all logs
|
|
91
|
+
# @param automation_id [String]
|
|
92
|
+
# @param [Hash] opts the optional parameters
|
|
93
|
+
# @return [nil]
|
|
94
|
+
def delete_comment_automation(automation_id, opts = {})
|
|
95
|
+
delete_comment_automation_with_http_info(automation_id, opts)
|
|
96
|
+
nil
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Delete automation and all logs
|
|
100
|
+
# @param automation_id [String]
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
103
|
+
def delete_comment_automation_with_http_info(automation_id, opts = {})
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug 'Calling API: CommentAutomationsApi.delete_comment_automation ...'
|
|
106
|
+
end
|
|
107
|
+
# verify the required parameter 'automation_id' is set
|
|
108
|
+
if @api_client.config.client_side_validation && automation_id.nil?
|
|
109
|
+
fail ArgumentError, "Missing the required parameter 'automation_id' when calling CommentAutomationsApi.delete_comment_automation"
|
|
110
|
+
end
|
|
111
|
+
# resource path
|
|
112
|
+
local_var_path = '/v1/comment-automations/{automationId}'.sub('{' + 'automationId' + '}', CGI.escape(automation_id.to_s))
|
|
113
|
+
|
|
114
|
+
# query parameters
|
|
115
|
+
query_params = opts[:query_params] || {}
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:debug_body]
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:debug_return_type]
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:operation => :"CommentAutomationsApi.delete_comment_automation",
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: CommentAutomationsApi#delete_comment_automation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
return data, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Get automation details with recent logs
|
|
152
|
+
# @param automation_id [String]
|
|
153
|
+
# @param [Hash] opts the optional parameters
|
|
154
|
+
# @return [nil]
|
|
155
|
+
def get_comment_automation(automation_id, opts = {})
|
|
156
|
+
get_comment_automation_with_http_info(automation_id, opts)
|
|
157
|
+
nil
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Get automation details with recent logs
|
|
161
|
+
# @param automation_id [String]
|
|
162
|
+
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
164
|
+
def get_comment_automation_with_http_info(automation_id, opts = {})
|
|
165
|
+
if @api_client.config.debugging
|
|
166
|
+
@api_client.config.logger.debug 'Calling API: CommentAutomationsApi.get_comment_automation ...'
|
|
167
|
+
end
|
|
168
|
+
# verify the required parameter 'automation_id' is set
|
|
169
|
+
if @api_client.config.client_side_validation && automation_id.nil?
|
|
170
|
+
fail ArgumentError, "Missing the required parameter 'automation_id' when calling CommentAutomationsApi.get_comment_automation"
|
|
171
|
+
end
|
|
172
|
+
# resource path
|
|
173
|
+
local_var_path = '/v1/comment-automations/{automationId}'.sub('{' + 'automationId' + '}', CGI.escape(automation_id.to_s))
|
|
174
|
+
|
|
175
|
+
# query parameters
|
|
176
|
+
query_params = opts[:query_params] || {}
|
|
177
|
+
|
|
178
|
+
# header parameters
|
|
179
|
+
header_params = opts[:header_params] || {}
|
|
180
|
+
# HTTP header 'Accept' (if needed)
|
|
181
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
182
|
+
|
|
183
|
+
# form parameters
|
|
184
|
+
form_params = opts[:form_params] || {}
|
|
185
|
+
|
|
186
|
+
# http body (model)
|
|
187
|
+
post_body = opts[:debug_body]
|
|
188
|
+
|
|
189
|
+
# return_type
|
|
190
|
+
return_type = opts[:debug_return_type]
|
|
191
|
+
|
|
192
|
+
# auth_names
|
|
193
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
194
|
+
|
|
195
|
+
new_options = opts.merge(
|
|
196
|
+
:operation => :"CommentAutomationsApi.get_comment_automation",
|
|
197
|
+
:header_params => header_params,
|
|
198
|
+
:query_params => query_params,
|
|
199
|
+
:form_params => form_params,
|
|
200
|
+
:body => post_body,
|
|
201
|
+
:auth_names => auth_names,
|
|
202
|
+
:return_type => return_type
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
206
|
+
if @api_client.config.debugging
|
|
207
|
+
@api_client.config.logger.debug "API called: CommentAutomationsApi#get_comment_automation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
208
|
+
end
|
|
209
|
+
return data, status_code, headers
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# List trigger logs for an automation
|
|
213
|
+
# Paginated list of every comment that triggered this automation, with send status and commenter info.
|
|
214
|
+
# @param automation_id [String]
|
|
215
|
+
# @param [Hash] opts the optional parameters
|
|
216
|
+
# @option opts [String] :status Filter by result status
|
|
217
|
+
# @option opts [Integer] :limit (default to 50)
|
|
218
|
+
# @option opts [Integer] :skip (default to 0)
|
|
219
|
+
# @return [nil]
|
|
220
|
+
def list_comment_automation_logs(automation_id, opts = {})
|
|
221
|
+
list_comment_automation_logs_with_http_info(automation_id, opts)
|
|
222
|
+
nil
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# List trigger logs for an automation
|
|
226
|
+
# Paginated list of every comment that triggered this automation, with send status and commenter info.
|
|
227
|
+
# @param automation_id [String]
|
|
228
|
+
# @param [Hash] opts the optional parameters
|
|
229
|
+
# @option opts [String] :status Filter by result status
|
|
230
|
+
# @option opts [Integer] :limit (default to 50)
|
|
231
|
+
# @option opts [Integer] :skip (default to 0)
|
|
232
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
233
|
+
def list_comment_automation_logs_with_http_info(automation_id, opts = {})
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug 'Calling API: CommentAutomationsApi.list_comment_automation_logs ...'
|
|
236
|
+
end
|
|
237
|
+
# verify the required parameter 'automation_id' is set
|
|
238
|
+
if @api_client.config.client_side_validation && automation_id.nil?
|
|
239
|
+
fail ArgumentError, "Missing the required parameter 'automation_id' when calling CommentAutomationsApi.list_comment_automation_logs"
|
|
240
|
+
end
|
|
241
|
+
allowable_values = ["sent", "failed", "skipped"]
|
|
242
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
243
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
244
|
+
end
|
|
245
|
+
# resource path
|
|
246
|
+
local_var_path = '/v1/comment-automations/{automationId}/logs'.sub('{' + 'automationId' + '}', CGI.escape(automation_id.to_s))
|
|
247
|
+
|
|
248
|
+
# query parameters
|
|
249
|
+
query_params = opts[:query_params] || {}
|
|
250
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
251
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
252
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
|
253
|
+
|
|
254
|
+
# header parameters
|
|
255
|
+
header_params = opts[:header_params] || {}
|
|
256
|
+
# HTTP header 'Accept' (if needed)
|
|
257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
258
|
+
|
|
259
|
+
# form parameters
|
|
260
|
+
form_params = opts[:form_params] || {}
|
|
261
|
+
|
|
262
|
+
# http body (model)
|
|
263
|
+
post_body = opts[:debug_body]
|
|
264
|
+
|
|
265
|
+
# return_type
|
|
266
|
+
return_type = opts[:debug_return_type]
|
|
267
|
+
|
|
268
|
+
# auth_names
|
|
269
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
270
|
+
|
|
271
|
+
new_options = opts.merge(
|
|
272
|
+
:operation => :"CommentAutomationsApi.list_comment_automation_logs",
|
|
273
|
+
:header_params => header_params,
|
|
274
|
+
:query_params => query_params,
|
|
275
|
+
:form_params => form_params,
|
|
276
|
+
:body => post_body,
|
|
277
|
+
:auth_names => auth_names,
|
|
278
|
+
:return_type => return_type
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
282
|
+
if @api_client.config.debugging
|
|
283
|
+
@api_client.config.logger.debug "API called: CommentAutomationsApi#list_comment_automation_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
284
|
+
end
|
|
285
|
+
return data, status_code, headers
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# List comment-to-DM automations
|
|
289
|
+
# List all comment-to-DM automations for a profile. Returns automations with their stats.
|
|
290
|
+
# @param profile_id [String] Profile ID
|
|
291
|
+
# @param [Hash] opts the optional parameters
|
|
292
|
+
# @return [ListCommentAutomations200Response]
|
|
293
|
+
def list_comment_automations(profile_id, opts = {})
|
|
294
|
+
data, _status_code, _headers = list_comment_automations_with_http_info(profile_id, opts)
|
|
295
|
+
data
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# List comment-to-DM automations
|
|
299
|
+
# List all comment-to-DM automations for a profile. Returns automations with their stats.
|
|
300
|
+
# @param profile_id [String] Profile ID
|
|
301
|
+
# @param [Hash] opts the optional parameters
|
|
302
|
+
# @return [Array<(ListCommentAutomations200Response, Integer, Hash)>] ListCommentAutomations200Response data, response status code and response headers
|
|
303
|
+
def list_comment_automations_with_http_info(profile_id, opts = {})
|
|
304
|
+
if @api_client.config.debugging
|
|
305
|
+
@api_client.config.logger.debug 'Calling API: CommentAutomationsApi.list_comment_automations ...'
|
|
306
|
+
end
|
|
307
|
+
# verify the required parameter 'profile_id' is set
|
|
308
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
|
309
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling CommentAutomationsApi.list_comment_automations"
|
|
310
|
+
end
|
|
311
|
+
# resource path
|
|
312
|
+
local_var_path = '/v1/comment-automations'
|
|
313
|
+
|
|
314
|
+
# query parameters
|
|
315
|
+
query_params = opts[:query_params] || {}
|
|
316
|
+
query_params[:'profileId'] = profile_id
|
|
317
|
+
|
|
318
|
+
# header parameters
|
|
319
|
+
header_params = opts[:header_params] || {}
|
|
320
|
+
# HTTP header 'Accept' (if needed)
|
|
321
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
322
|
+
|
|
323
|
+
# form parameters
|
|
324
|
+
form_params = opts[:form_params] || {}
|
|
325
|
+
|
|
326
|
+
# http body (model)
|
|
327
|
+
post_body = opts[:debug_body]
|
|
328
|
+
|
|
329
|
+
# return_type
|
|
330
|
+
return_type = opts[:debug_return_type] || 'ListCommentAutomations200Response'
|
|
331
|
+
|
|
332
|
+
# auth_names
|
|
333
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
334
|
+
|
|
335
|
+
new_options = opts.merge(
|
|
336
|
+
:operation => :"CommentAutomationsApi.list_comment_automations",
|
|
337
|
+
:header_params => header_params,
|
|
338
|
+
:query_params => query_params,
|
|
339
|
+
:form_params => form_params,
|
|
340
|
+
:body => post_body,
|
|
341
|
+
:auth_names => auth_names,
|
|
342
|
+
:return_type => return_type
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
346
|
+
if @api_client.config.debugging
|
|
347
|
+
@api_client.config.logger.debug "API called: CommentAutomationsApi#list_comment_automations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
348
|
+
end
|
|
349
|
+
return data, status_code, headers
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Update automation settings
|
|
353
|
+
# @param automation_id [String]
|
|
354
|
+
# @param [Hash] opts the optional parameters
|
|
355
|
+
# @option opts [UpdateCommentAutomationRequest] :update_comment_automation_request
|
|
356
|
+
# @return [nil]
|
|
357
|
+
def update_comment_automation(automation_id, opts = {})
|
|
358
|
+
update_comment_automation_with_http_info(automation_id, opts)
|
|
359
|
+
nil
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Update automation settings
|
|
363
|
+
# @param automation_id [String]
|
|
364
|
+
# @param [Hash] opts the optional parameters
|
|
365
|
+
# @option opts [UpdateCommentAutomationRequest] :update_comment_automation_request
|
|
366
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
367
|
+
def update_comment_automation_with_http_info(automation_id, opts = {})
|
|
368
|
+
if @api_client.config.debugging
|
|
369
|
+
@api_client.config.logger.debug 'Calling API: CommentAutomationsApi.update_comment_automation ...'
|
|
370
|
+
end
|
|
371
|
+
# verify the required parameter 'automation_id' is set
|
|
372
|
+
if @api_client.config.client_side_validation && automation_id.nil?
|
|
373
|
+
fail ArgumentError, "Missing the required parameter 'automation_id' when calling CommentAutomationsApi.update_comment_automation"
|
|
374
|
+
end
|
|
375
|
+
# resource path
|
|
376
|
+
local_var_path = '/v1/comment-automations/{automationId}'.sub('{' + 'automationId' + '}', CGI.escape(automation_id.to_s))
|
|
377
|
+
|
|
378
|
+
# query parameters
|
|
379
|
+
query_params = opts[:query_params] || {}
|
|
380
|
+
|
|
381
|
+
# header parameters
|
|
382
|
+
header_params = opts[:header_params] || {}
|
|
383
|
+
# HTTP header 'Accept' (if needed)
|
|
384
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
385
|
+
# HTTP header 'Content-Type'
|
|
386
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
387
|
+
if !content_type.nil?
|
|
388
|
+
header_params['Content-Type'] = content_type
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# form parameters
|
|
392
|
+
form_params = opts[:form_params] || {}
|
|
393
|
+
|
|
394
|
+
# http body (model)
|
|
395
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_comment_automation_request'])
|
|
396
|
+
|
|
397
|
+
# return_type
|
|
398
|
+
return_type = opts[:debug_return_type]
|
|
399
|
+
|
|
400
|
+
# auth_names
|
|
401
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
402
|
+
|
|
403
|
+
new_options = opts.merge(
|
|
404
|
+
:operation => :"CommentAutomationsApi.update_comment_automation",
|
|
405
|
+
:header_params => header_params,
|
|
406
|
+
:query_params => query_params,
|
|
407
|
+
:form_params => form_params,
|
|
408
|
+
:body => post_body,
|
|
409
|
+
:auth_names => auth_names,
|
|
410
|
+
:return_type => return_type
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
414
|
+
if @api_client.config.debugging
|
|
415
|
+
@api_client.config.logger.debug "API called: CommentAutomationsApi#update_comment_automation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
416
|
+
end
|
|
417
|
+
return data, status_code, headers
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
end
|