Class: Zernio::CommentsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/zernio-sdk/api/comments_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CommentsApi

Returns a new instance of CommentsApi.



19
20
21
# File 'lib/zernio-sdk/api/comments_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/zernio-sdk/api/comments_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_inbox_comment(post_id, account_id, comment_id, opts = {}) ⇒ DeleteInboxComment200Response

Delete comment Delete a comment on a post. Supported by Facebook, Instagram, Bluesky, Reddit, YouTube, and LinkedIn. Requires accountId and commentId query parameters.

Parameters:

  • post_id (String)

    Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.

  • account_id (String)
  • comment_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



29
30
31
32
# File 'lib/zernio-sdk/api/comments_api.rb', line 29

def delete_inbox_comment(post_id, , comment_id, opts = {})
  data, _status_code, _headers = delete_inbox_comment_with_http_info(post_id, , comment_id, opts)
  data
end

#delete_inbox_comment_with_http_info(post_id, account_id, comment_id, opts = {}) ⇒ Array<(DeleteInboxComment200Response, Integer, Hash)>

Delete comment Delete a comment on a post. Supported by Facebook, Instagram, Bluesky, Reddit, YouTube, and LinkedIn. Requires accountId and commentId query parameters.

Parameters:

  • post_id (String)

    Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.

  • account_id (String)
  • comment_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/zernio-sdk/api/comments_api.rb', line 41

def delete_inbox_comment_with_http_info(post_id, , comment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.delete_inbox_comment ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.delete_inbox_comment"
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling CommentsApi.delete_inbox_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.delete_inbox_comment"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = 
  query_params[:'commentId'] = comment_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteInboxComment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.delete_inbox_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#delete_inbox_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#edit_inbox_comment(post_id, comment_id, edit_inbox_comment_request, opts = {}) ⇒ EditInboxComment200Response

Edit comment Edit the body of a comment the connected account posted. Supported on Reddit only. Reddit keeps the same comment id after an edit. Reddit exposes no API to edit a post title, and a link post has no editable body. To edit a published post's body, use POST /v1/posts/{postId}/edit.

Parameters:

  • post_id (String)
  • comment_id (String)
  • edit_inbox_comment_request (EditInboxCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



106
107
108
109
# File 'lib/zernio-sdk/api/comments_api.rb', line 106

def edit_inbox_comment(post_id, comment_id, edit_inbox_comment_request, opts = {})
  data, _status_code, _headers = edit_inbox_comment_with_http_info(post_id, comment_id, edit_inbox_comment_request, opts)
  data
end

#edit_inbox_comment_with_http_info(post_id, comment_id, edit_inbox_comment_request, opts = {}) ⇒ Array<(EditInboxComment200Response, Integer, Hash)>

Edit comment Edit the body of a comment the connected account posted. Supported on Reddit only. Reddit keeps the same comment id after an edit. Reddit exposes no API to edit a post title, and a link post has no editable body. To edit a published post's body, use `POST /v1/posts/postId/edit`.

Parameters:

  • post_id (String)
  • comment_id (String)
  • edit_inbox_comment_request (EditInboxCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(EditInboxComment200Response, Integer, Hash)>)

    EditInboxComment200Response data, response status code and response headers



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/zernio-sdk/api/comments_api.rb', line 118

def edit_inbox_comment_with_http_info(post_id, comment_id, edit_inbox_comment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.edit_inbox_comment ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.edit_inbox_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.edit_inbox_comment"
  end
  # verify the required parameter 'edit_inbox_comment_request' is set
  if @api_client.config.client_side_validation && edit_inbox_comment_request.nil?
    fail ArgumentError, "Missing the required parameter 'edit_inbox_comment_request' when calling CommentsApi.edit_inbox_comment"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}/{commentId}'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(edit_inbox_comment_request)

  # return_type
  return_type = opts[:debug_return_type] || 'EditInboxComment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.edit_inbox_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#edit_inbox_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_post_comments(post_id, account_id, opts = {}) ⇒ GetInboxPostComments200Response

Get post comments Fetch comments for a specific post. Requires accountId query parameter.

Parameters:

  • post_id (String)

    Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID.

  • account_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :subreddit (String) — default: Reddit only

    Subreddit name

  • :limit (Integer)

    Maximum number of comments to return (default to 25)

  • :cursor (String)

    Pagination cursor

  • :comment_id (String) — default: Reddit only

    Get replies to a specific comment

Returns:



189
190
191
192
# File 'lib/zernio-sdk/api/comments_api.rb', line 189

def get_inbox_post_comments(post_id, , opts = {})
  data, _status_code, _headers = get_inbox_post_comments_with_http_info(post_id, , opts)
  data
end

#get_inbox_post_comments_with_http_info(post_id, account_id, opts = {}) ⇒ Array<(GetInboxPostComments200Response, Integer, Hash)>

Get post comments Fetch comments for a specific post. Requires accountId query parameter.

Parameters:

  • post_id (String)

    Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID.

  • account_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :subreddit (String) — default: Reddit only

    Subreddit name

  • :limit (Integer)

    Maximum number of comments to return (default to 25)

  • :cursor (String)

    Pagination cursor

  • :comment_id (String) — default: Reddit only

    Get replies to a specific comment

Returns:



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/zernio-sdk/api/comments_api.rb', line 204

def get_inbox_post_comments_with_http_info(post_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.get_inbox_post_comments ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.get_inbox_post_comments"
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling CommentsApi.get_inbox_post_comments"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CommentsApi.get_inbox_post_comments, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CommentsApi.get_inbox_post_comments, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/inbox/comments/{postId}'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = 
  query_params[:'subreddit'] = opts[:'subreddit'] if !opts[:'subreddit'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'commentId'] = opts[:'comment_id'] if !opts[:'comment_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetInboxPostComments200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.get_inbox_post_comments",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#get_inbox_post_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#hide_inbox_comment(post_id, comment_id, hide_inbox_comment_request, opts = {}) ⇒ HideInboxComment200Response

Hide comment Hide a comment on a post. Supported by Facebook, Instagram, Threads, and X/Twitter. Hidden comments are only visible to the commenter and page admin. For X/Twitter, the reply must belong to a conversation started by the authenticated user.

Parameters:

  • post_id (String)
  • comment_id (String)
  • hide_inbox_comment_request (HideInboxCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



276
277
278
279
# File 'lib/zernio-sdk/api/comments_api.rb', line 276

def hide_inbox_comment(post_id, comment_id, hide_inbox_comment_request, opts = {})
  data, _status_code, _headers = hide_inbox_comment_with_http_info(post_id, comment_id, hide_inbox_comment_request, opts)
  data
end

#hide_inbox_comment_with_http_info(post_id, comment_id, hide_inbox_comment_request, opts = {}) ⇒ Array<(HideInboxComment200Response, Integer, Hash)>

Hide comment Hide a comment on a post. Supported by Facebook, Instagram, Threads, and X/Twitter. Hidden comments are only visible to the commenter and page admin. For X/Twitter, the reply must belong to a conversation started by the authenticated user.

Parameters:

  • post_id (String)
  • comment_id (String)
  • hide_inbox_comment_request (HideInboxCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(HideInboxComment200Response, Integer, Hash)>)

    HideInboxComment200Response data, response status code and response headers



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/zernio-sdk/api/comments_api.rb', line 288

def hide_inbox_comment_with_http_info(post_id, comment_id, hide_inbox_comment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.hide_inbox_comment ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.hide_inbox_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.hide_inbox_comment"
  end
  # verify the required parameter 'hide_inbox_comment_request' is set
  if @api_client.config.client_side_validation && hide_inbox_comment_request.nil?
    fail ArgumentError, "Missing the required parameter 'hide_inbox_comment_request' when calling CommentsApi.hide_inbox_comment"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}/{commentId}/hide'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(hide_inbox_comment_request)

  # return_type
  return_type = opts[:debug_return_type] || 'HideInboxComment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.hide_inbox_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#hide_inbox_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#like_inbox_comment(post_id, comment_id, like_inbox_comment_request, opts = {}) ⇒ LikeInboxComment200Response

Like comment Like or upvote a comment on a post. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit. For Bluesky, the cid (content identifier) is required in the request body.

Parameters:

  • post_id (String)
  • comment_id (String)
  • like_inbox_comment_request (LikeInboxCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



356
357
358
359
# File 'lib/zernio-sdk/api/comments_api.rb', line 356

def like_inbox_comment(post_id, comment_id, like_inbox_comment_request, opts = {})
  data, _status_code, _headers = like_inbox_comment_with_http_info(post_id, comment_id, like_inbox_comment_request, opts)
  data
end

#like_inbox_comment_with_http_info(post_id, comment_id, like_inbox_comment_request, opts = {}) ⇒ Array<(LikeInboxComment200Response, Integer, Hash)>

Like comment Like or upvote a comment on a post. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit. For Bluesky, the cid (content identifier) is required in the request body.

Parameters:

  • post_id (String)
  • comment_id (String)
  • like_inbox_comment_request (LikeInboxCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LikeInboxComment200Response, Integer, Hash)>)

    LikeInboxComment200Response data, response status code and response headers



368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/zernio-sdk/api/comments_api.rb', line 368

def like_inbox_comment_with_http_info(post_id, comment_id, like_inbox_comment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.like_inbox_comment ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.like_inbox_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.like_inbox_comment"
  end
  # verify the required parameter 'like_inbox_comment_request' is set
  if @api_client.config.client_side_validation && like_inbox_comment_request.nil?
    fail ArgumentError, "Missing the required parameter 'like_inbox_comment_request' when calling CommentsApi.like_inbox_comment"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}/{commentId}/like'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(like_inbox_comment_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LikeInboxComment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.like_inbox_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#like_inbox_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_inbox_comments(opts = {}) ⇒ ListInboxComments200Response

List commented posts Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged isAd: true with adId and placement (id is {adId}:{placement}). Use ?platform=metaads to return only ad rows; passing facebook/instagram returns organic posts only (no ads); omitting platform returns both. Fetch a row's thread from GET /v1/ads/adId/comments?placement=placement. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :profile_id (String)

    Filter by profile ID

  • :platform (String)

    Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.

  • :min_comments (Integer)

    Minimum comment count

  • :since (Time)

    Posts created after this date

  • :sort_by (String)

    Sort field (default to 'date')

  • :sort_order (String)

    Sort order (default to 'desc')

  • :limit (Integer) — default: default to 50
  • :cursor (String)
  • :account_id (String)

    Filter by specific social account ID

Returns:



442
443
444
445
# File 'lib/zernio-sdk/api/comments_api.rb', line 442

def list_inbox_comments(opts = {})
  data, _status_code, _headers = list_inbox_comments_with_http_info(opts)
  data
end

#list_inbox_comments_with_http_info(opts = {}) ⇒ Array<(ListInboxComments200Response, Integer, Hash)>

List commented posts Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `adId:placement`). Use `?platform=metaads` to return only ad rows; passing `facebook`/`instagram` returns organic posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/adId/comments?placement=placement. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :profile_id (String)

    Filter by profile ID

  • :platform (String)

    Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.

  • :min_comments (Integer)

    Minimum comment count

  • :since (Time)

    Posts created after this date

  • :sort_by (String)

    Sort field (default to 'date')

  • :sort_order (String)

    Sort order (default to 'desc')

  • :limit (Integer) — default: default to 50
  • :cursor (String)
  • :account_id (String)

    Filter by specific social account ID

Returns:



460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'lib/zernio-sdk/api/comments_api.rb', line 460

def list_inbox_comments_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.list_inbox_comments ...'
  end
  allowable_values = ["facebook", "instagram", "twitter", "bluesky", "threads", "youtube", "linkedin", "reddit", "metaads"]
  if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
    fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'min_comments'].nil? && opts[:'min_comments'] < 0
    fail ArgumentError, 'invalid value for "opts[:"min_comments"]" when calling CommentsApi.list_inbox_comments, must be greater than or equal to 0.'
  end

  allowable_values = ["date", "comments"]
  if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
    fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
  end
  allowable_values = ["asc", "desc"]
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
    fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CommentsApi.list_inbox_comments, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CommentsApi.list_inbox_comments, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/inbox/comments'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
  query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
  query_params[:'minComments'] = opts[:'min_comments'] if !opts[:'min_comments'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListInboxComments200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.list_inbox_comments",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#list_inbox_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reply_to_inbox_post(post_id, reply_to_inbox_post_request, opts = {}) ⇒ ReplyToInboxPost200Response

Reply to comment Post a reply to a post or specific comment. Requires accountId in request body.

Parameters:

  • post_id (String)

    Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.

  • reply_to_inbox_post_request (ReplyToInboxPostRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



543
544
545
546
# File 'lib/zernio-sdk/api/comments_api.rb', line 543

def reply_to_inbox_post(post_id, reply_to_inbox_post_request, opts = {})
  data, _status_code, _headers = reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request, opts)
  data
end

#reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request, opts = {}) ⇒ Array<(ReplyToInboxPost200Response, Integer, Hash)>

Reply to comment Post a reply to a post or specific comment. Requires accountId in request body.

Parameters:

  • post_id (String)

    Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.

  • reply_to_inbox_post_request (ReplyToInboxPostRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ReplyToInboxPost200Response, Integer, Hash)>)

    ReplyToInboxPost200Response data, response status code and response headers



554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# File 'lib/zernio-sdk/api/comments_api.rb', line 554

def reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.reply_to_inbox_post ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.reply_to_inbox_post"
  end
  # verify the required parameter 'reply_to_inbox_post_request' is set
  if @api_client.config.client_side_validation && reply_to_inbox_post_request.nil?
    fail ArgumentError, "Missing the required parameter 'reply_to_inbox_post_request' when calling CommentsApi.reply_to_inbox_post"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(reply_to_inbox_post_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ReplyToInboxPost200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.reply_to_inbox_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#reply_to_inbox_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_private_reply_to_comment(post_id, comment_id, send_private_reply_to_comment_request, opts = {}) ⇒ SendPrivateReplyToComment200Response

Send private reply Send a private message to the author of a comment. Supported on Instagram and Facebook only. One reply per comment, must be sent within 7 days. Optionally attach interactive elements: quickReplies (chips above the keyboard, max 13) or buttons (1-3 inline postback/url buttons rendered in the same bubble via Meta's button_template). Buttons are recommended for cold reach since chips do not render in the Instagram Message Requests folder. quickReplies and buttons are mutually exclusive.

Parameters:

  • post_id (String)

    The media/post ID (Instagram media ID or Facebook post ID)

  • comment_id (String)

    The comment ID to send a private reply to

  • send_private_reply_to_comment_request (SendPrivateReplyToCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



618
619
620
621
# File 'lib/zernio-sdk/api/comments_api.rb', line 618

def send_private_reply_to_comment(post_id, comment_id, send_private_reply_to_comment_request, opts = {})
  data, _status_code, _headers = send_private_reply_to_comment_with_http_info(post_id, comment_id, send_private_reply_to_comment_request, opts)
  data
end

#send_private_reply_to_comment_with_http_info(post_id, comment_id, send_private_reply_to_comment_request, opts = {}) ⇒ Array<(SendPrivateReplyToComment200Response, Integer, Hash)>

Send private reply Send a private message to the author of a comment. Supported on Instagram and Facebook only. One reply per comment, must be sent within 7 days. Optionally attach interactive elements: `quickReplies` (chips above the keyboard, max 13) or `buttons` (1-3 inline postback/url buttons rendered in the same bubble via Meta's button_template). Buttons are recommended for cold reach since chips do not render in the Instagram Message Requests folder. `quickReplies` and `buttons` are mutually exclusive.

Parameters:

  • post_id (String)

    The media/post ID (Instagram media ID or Facebook post ID)

  • comment_id (String)

    The comment ID to send a private reply to

  • send_private_reply_to_comment_request (SendPrivateReplyToCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
# File 'lib/zernio-sdk/api/comments_api.rb', line 630

def send_private_reply_to_comment_with_http_info(post_id, comment_id, send_private_reply_to_comment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.send_private_reply_to_comment ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.send_private_reply_to_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.send_private_reply_to_comment"
  end
  # verify the required parameter 'send_private_reply_to_comment_request' is set
  if @api_client.config.client_side_validation && send_private_reply_to_comment_request.nil?
    fail ArgumentError, "Missing the required parameter 'send_private_reply_to_comment_request' when calling CommentsApi.send_private_reply_to_comment"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}/{commentId}/private-reply'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(send_private_reply_to_comment_request)

  # return_type
  return_type = opts[:debug_return_type] || 'SendPrivateReplyToComment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.send_private_reply_to_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#send_private_reply_to_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_comment_moderation(post_id, comment_id, set_comment_moderation_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response

Set comment moderation status Set a comment's moderation status. Supported on YouTube only. Use this to work a moderation queue: approve a held comment (published), reject it (rejected), or send it back for review (heldForReview). The request must be authorized by the owner of the channel or video the comment belongs to. You cannot moderate comments on videos you do not own. This is distinct from POST /v1/inbox/comments/{postId}/{commentId}/hide, which covers Facebook, Instagram, Threads, and X/Twitter and does not apply to YouTube.

Parameters:

  • post_id (String)
  • comment_id (String)
  • set_comment_moderation_request (SetCommentModerationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



698
699
700
701
# File 'lib/zernio-sdk/api/comments_api.rb', line 698

def set_comment_moderation(post_id, comment_id, set_comment_moderation_request, opts = {})
  data, _status_code, _headers = set_comment_moderation_with_http_info(post_id, comment_id, set_comment_moderation_request, opts)
  data
end

#set_comment_moderation_with_http_info(post_id, comment_id, set_comment_moderation_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>

Set comment moderation status Set a comment's moderation status. Supported on YouTube only. Use this to work a moderation queue: approve a held comment (`published`), reject it (`rejected`), or send it back for review (`heldForReview`). The request must be authorized by the owner of the channel or video the comment belongs to. You cannot moderate comments on videos you do not own. This is distinct from `POST /v1/inbox/comments/postId/commentId/hide`, which covers Facebook, Instagram, Threads, and X/Twitter and does not apply to YouTube.

Parameters:

  • post_id (String)
  • comment_id (String)
  • set_comment_moderation_request (SetCommentModerationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
# File 'lib/zernio-sdk/api/comments_api.rb', line 710

def set_comment_moderation_with_http_info(post_id, comment_id, set_comment_moderation_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.set_comment_moderation ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.set_comment_moderation"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.set_comment_moderation"
  end
  # verify the required parameter 'set_comment_moderation_request' is set
  if @api_client.config.client_side_validation && set_comment_moderation_request.nil?
    fail ArgumentError, "Missing the required parameter 'set_comment_moderation_request' when calling CommentsApi.set_comment_moderation"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}/{commentId}/moderation'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(set_comment_moderation_request)

  # return_type
  return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.set_comment_moderation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#set_comment_moderation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unhide_inbox_comment(post_id, comment_id, account_id, opts = {}) ⇒ HideInboxComment200Response

Unhide comment Unhide a previously hidden comment. Supported by Facebook, Instagram, Threads, and X/Twitter.

Parameters:

  • post_id (String)
  • comment_id (String)
  • account_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



778
779
780
781
# File 'lib/zernio-sdk/api/comments_api.rb', line 778

def unhide_inbox_comment(post_id, comment_id, , opts = {})
  data, _status_code, _headers = unhide_inbox_comment_with_http_info(post_id, comment_id, , opts)
  data
end

#unhide_inbox_comment_with_http_info(post_id, comment_id, account_id, opts = {}) ⇒ Array<(HideInboxComment200Response, Integer, Hash)>

Unhide comment Unhide a previously hidden comment. Supported by Facebook, Instagram, Threads, and X/Twitter.

Parameters:

  • post_id (String)
  • comment_id (String)
  • account_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(HideInboxComment200Response, Integer, Hash)>)

    HideInboxComment200Response data, response status code and response headers



790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
# File 'lib/zernio-sdk/api/comments_api.rb', line 790

def unhide_inbox_comment_with_http_info(post_id, comment_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.unhide_inbox_comment ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.unhide_inbox_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.unhide_inbox_comment"
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling CommentsApi.unhide_inbox_comment"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}/{commentId}/hide'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = 

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'HideInboxComment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.unhide_inbox_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#unhide_inbox_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unlike_inbox_comment(post_id, comment_id, account_id, opts = {}) ⇒ UnlikeInboxComment200Response

Unlike comment Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit. For Bluesky, the likeUri query parameter is required.

Parameters:

  • post_id (String)
  • comment_id (String)
  • account_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :like_uri (String) — default: Bluesky only

    The like URI returned when liking

Returns:



855
856
857
858
# File 'lib/zernio-sdk/api/comments_api.rb', line 855

def unlike_inbox_comment(post_id, comment_id, , opts = {})
  data, _status_code, _headers = unlike_inbox_comment_with_http_info(post_id, comment_id, , opts)
  data
end

#unlike_inbox_comment_with_http_info(post_id, comment_id, account_id, opts = {}) ⇒ Array<(UnlikeInboxComment200Response, Integer, Hash)>

Unlike comment Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit. For Bluesky, the likeUri query parameter is required.

Parameters:

  • post_id (String)
  • comment_id (String)
  • account_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :like_uri (String) — default: Bluesky only

    The like URI returned when liking

Returns:



868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'lib/zernio-sdk/api/comments_api.rb', line 868

def unlike_inbox_comment_with_http_info(post_id, comment_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentsApi.unlike_inbox_comment ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.unlike_inbox_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.unlike_inbox_comment"
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling CommentsApi.unlike_inbox_comment"
  end
  # resource path
  local_var_path = '/v1/inbox/comments/{postId}/{commentId}/like'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = 
  query_params[:'likeUri'] = opts[:'like_uri'] if !opts[:'like_uri'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'UnlikeInboxComment200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"CommentsApi.unlike_inbox_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentsApi#unlike_inbox_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end