Class: Late::CommentsApi
- Inherits:
-
Object
- Object
- Late::CommentsApi
- Defined in:
- lib/late-sdk/api/comments_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_inbox_comment(post_id, account_id, comment_id, opts = {}) ⇒ DeleteInboxComment200Response
Delete comment Delete a comment on a post.
-
#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.
-
#get_inbox_post_comments(post_id, account_id, opts = {}) ⇒ GetInboxPostComments200Response
Get post comments Fetch comments for a specific post.
-
#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.
-
#hide_inbox_comment(post_id, comment_id, hide_inbox_comment_request, opts = {}) ⇒ HideInboxComment200Response
Hide comment Hide a comment on a post.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ CommentsApi
constructor
A new instance of CommentsApi.
-
#like_inbox_comment(post_id, comment_id, like_inbox_comment_request, opts = {}) ⇒ LikeInboxComment200Response
Like comment Like or upvote a comment on a post.
-
#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.
-
#list_inbox_comments(opts = {}) ⇒ ListInboxComments200Response
List commented posts Returns posts with comment counts from all connected accounts.
-
#list_inbox_comments_with_http_info(opts = {}) ⇒ Array<(ListInboxComments200Response, Integer, Hash)>
List commented posts Returns posts with comment counts from all connected accounts.
-
#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.
-
#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.
-
#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.
-
#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.
-
#unhide_inbox_comment(post_id, comment_id, account_id, opts = {}) ⇒ HideInboxComment200Response
Unhide comment Unhide a previously hidden comment.
-
#unhide_inbox_comment_with_http_info(post_id, comment_id, account_id, opts = {}) ⇒ Array<(HideInboxComment200Response, Integer, Hash)>
Unhide comment Unhide a previously hidden comment.
-
#unlike_inbox_comment(post_id, comment_id, account_id, opts = {}) ⇒ UnlikeInboxComment200Response
Unlike comment Remove a like from a comment.
-
#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.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CommentsApi
Returns a new instance of CommentsApi.
19 20 21 |
# File 'lib/late-sdk/api/comments_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/late-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.
29 30 31 32 |
# File 'lib/late-sdk/api/comments_api.rb', line 29 def delete_inbox_comment(post_id, account_id, comment_id, opts = {}) data, _status_code, _headers = delete_inbox_comment_with_http_info(post_id, account_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.
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/late-sdk/api/comments_api.rb', line 41 def delete_inbox_comment_with_http_info(post_id, account_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 && account_id.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'] = account_id 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'] = 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, ) 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 |
#get_inbox_post_comments(post_id, account_id, opts = {}) ⇒ GetInboxPostComments200Response
Get post comments Fetch comments for a specific post. Requires accountId query parameter.
109 110 111 112 |
# File 'lib/late-sdk/api/comments_api.rb', line 109 def get_inbox_post_comments(post_id, account_id, opts = {}) data, _status_code, _headers = get_inbox_post_comments_with_http_info(post_id, account_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.
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 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/late-sdk/api/comments_api.rb', line 124 def get_inbox_post_comments_with_http_info(post_id, account_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 && account_id.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'] = account_id 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'] = 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, ) 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.
196 197 198 199 |
# File 'lib/late-sdk/api/comments_api.rb', line 196 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.
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/late-sdk/api/comments_api.rb', line 208 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'] = 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, ) 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.
276 277 278 279 |
# File 'lib/late-sdk/api/comments_api.rb', line 276 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.
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/late-sdk/api/comments_api.rb', line 288 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'] = 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, ) 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.
362 363 364 365 |
# File 'lib/late-sdk/api/comments_api.rb', line 362 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.
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 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/late-sdk/api/comments_api.rb', line 380 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"] 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'] = 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, ) 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.
463 464 465 466 |
# File 'lib/late-sdk/api/comments_api.rb', line 463 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.
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 |
# File 'lib/late-sdk/api/comments_api.rb', line 474 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'] = 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, ) 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, text only.
538 539 540 541 |
# File 'lib/late-sdk/api/comments_api.rb', line 538 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, text only.
550 551 552 553 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/late-sdk/api/comments_api.rb', line 550 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'] = 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, ) 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 |
#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.
618 619 620 621 |
# File 'lib/late-sdk/api/comments_api.rb', line 618 def unhide_inbox_comment(post_id, comment_id, account_id, opts = {}) data, _status_code, _headers = unhide_inbox_comment_with_http_info(post_id, comment_id, account_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.
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 |
# File 'lib/late-sdk/api/comments_api.rb', line 630 def unhide_inbox_comment_with_http_info(post_id, comment_id, account_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 && account_id.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'] = account_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] || 'HideInboxComment200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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, ) 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.
695 696 697 698 |
# File 'lib/late-sdk/api/comments_api.rb', line 695 def unlike_inbox_comment(post_id, comment_id, account_id, opts = {}) data, _status_code, _headers = unlike_inbox_comment_with_http_info(post_id, comment_id, account_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.
708 709 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 |
# File 'lib/late-sdk/api/comments_api.rb', line 708 def unlike_inbox_comment_with_http_info(post_id, comment_id, account_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 && account_id.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'] = account_id 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'] = 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, ) 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 |