late-sdk 0.0.702 → 0.0.703

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 880a6062d8925570e794bb86831ade06ec8cb72a8f22d861a753495277e1001a
4
- data.tar.gz: 538c64c6e155289ae76ade8fdee8d65afe01301e98c1073c56566830dedc41c8
3
+ metadata.gz: 4c6afbc7cc99a70fc926e3f9f1e3a2320ccbb58aec8ba374bec20a3ad3eca2bf
4
+ data.tar.gz: a63d8537fd1be39edbe26b86ed03164681c3c557de1305f37cd19384a2673ca4
5
5
  SHA512:
6
- metadata.gz: df9f1686b071fa3778fc2bbfa6fde1a6559c72584f20da7f41f6233acc85e07b140ff84c29561d151f695b105a60769c59034073f350d8ee29e868df9fc9544a
7
- data.tar.gz: dda3264a3e9cea0a96585c35677877ffbdf8d5db009df15908a5b0a1966f6e356e38a74e66d891e8c65a779991690d35e51f06ba5ec8dcb361375204742110c4
6
+ metadata.gz: 556fa4c7872c1e72b9d2857e8c42bd79beccd6871309a34c5e6fa695b54c401bf3b1bb90e291ba6dafd4d54eda68528ee994c32f5558a901de6ef456579b9b1a
7
+ data.tar.gz: 030dfe2e43b43f421f4751c72d15c54b0e56521956bf45671dc30d63771a5f77b929153673af5ec2f3fbb057b8d5648d5fcd7689ce7ff3e6eb1dbbaf53027f39
data/README.md CHANGED
@@ -211,12 +211,14 @@ Class | Method | HTTP request | Description
211
211
  *Zernio::CommentsApi* | [**get_inbox_post_comments**](docs/CommentsApi.md#get_inbox_post_comments) | **GET** /v1/inbox/comments/{postId} | Get post comments
212
212
  *Zernio::CommentsApi* | [**hide_inbox_comment**](docs/CommentsApi.md#hide_inbox_comment) | **POST** /v1/inbox/comments/{postId}/{commentId}/hide | Hide comment
213
213
  *Zernio::CommentsApi* | [**like_inbox_comment**](docs/CommentsApi.md#like_inbox_comment) | **POST** /v1/inbox/comments/{postId}/{commentId}/like | Like comment
214
+ *Zernio::CommentsApi* | [**like_post**](docs/CommentsApi.md#like_post) | **POST** /v1/inbox/posts/{postId}/like | Like post
214
215
  *Zernio::CommentsApi* | [**list_inbox_comments**](docs/CommentsApi.md#list_inbox_comments) | **GET** /v1/inbox/comments | List commented posts
215
216
  *Zernio::CommentsApi* | [**reply_to_inbox_post**](docs/CommentsApi.md#reply_to_inbox_post) | **POST** /v1/inbox/comments/{postId} | Reply to comment
216
217
  *Zernio::CommentsApi* | [**send_private_reply_to_comment**](docs/CommentsApi.md#send_private_reply_to_comment) | **POST** /v1/inbox/comments/{postId}/{commentId}/private-reply | Send private reply
217
218
  *Zernio::CommentsApi* | [**set_comment_moderation**](docs/CommentsApi.md#set_comment_moderation) | **POST** /v1/inbox/comments/{postId}/{commentId}/moderation | Set comment moderation status
218
219
  *Zernio::CommentsApi* | [**unhide_inbox_comment**](docs/CommentsApi.md#unhide_inbox_comment) | **DELETE** /v1/inbox/comments/{postId}/{commentId}/hide | Unhide comment
219
220
  *Zernio::CommentsApi* | [**unlike_inbox_comment**](docs/CommentsApi.md#unlike_inbox_comment) | **DELETE** /v1/inbox/comments/{postId}/{commentId}/like | Unlike comment
221
+ *Zernio::CommentsApi* | [**unlike_post**](docs/CommentsApi.md#unlike_post) | **DELETE** /v1/inbox/posts/{postId}/like | Unlike post
220
222
  *Zernio::ConnectApi* | [**assign_google_business_location**](docs/ConnectApi.md#assign_google_business_location) | **POST** /v1/accounts/{accountId}/gmb-locations/assign | Assign GBP location to another profile
221
223
  *Zernio::ConnectApi* | [**complete_telegram_connect**](docs/ConnectApi.md#complete_telegram_connect) | **PATCH** /v1/connect/telegram | Check Telegram status
222
224
  *Zernio::ConnectApi* | [**complete_whats_app_phone_selection**](docs/ConnectApi.md#complete_whats_app_phone_selection) | **POST** /v1/connect/whatsapp/select-phone-number | Complete number selection
@@ -1390,6 +1392,8 @@ Class | Method | HTTP request | Description
1390
1392
  - [Zernio::InstagramPlatformDataUserTagsInner](docs/InstagramPlatformDataUserTagsInner.md)
1391
1393
  - [Zernio::LikeInboxComment200Response](docs/LikeInboxComment200Response.md)
1392
1394
  - [Zernio::LikeInboxCommentRequest](docs/LikeInboxCommentRequest.md)
1395
+ - [Zernio::LikePost200Response](docs/LikePost200Response.md)
1396
+ - [Zernio::LikePostRequest](docs/LikePostRequest.md)
1393
1397
  - [Zernio::LinkedInAdsPlatformData](docs/LinkedInAdsPlatformData.md)
1394
1398
  - [Zernio::LinkedInAdsPlatformDataCarousel](docs/LinkedInAdsPlatformDataCarousel.md)
1395
1399
  - [Zernio::LinkedInAdsPlatformDataCarouselCardsInner](docs/LinkedInAdsPlatformDataCarouselCardsInner.md)
@@ -1902,6 +1906,7 @@ Class | Method | HTTP request | Description
1902
1906
  - [Zernio::UndoRetweet200Response](docs/UndoRetweet200Response.md)
1903
1907
  - [Zernio::UnfollowUser200Response](docs/UnfollowUser200Response.md)
1904
1908
  - [Zernio::UnlikeInboxComment200Response](docs/UnlikeInboxComment200Response.md)
1909
+ - [Zernio::UnlikePost200Response](docs/UnlikePost200Response.md)
1905
1910
  - [Zernio::UnpinDiscordMessage200Response](docs/UnpinDiscordMessage200Response.md)
1906
1911
  - [Zernio::UnpublishPost200Response](docs/UnpublishPost200Response.md)
1907
1912
  - [Zernio::UnpublishPostRequest](docs/UnpublishPostRequest.md)
data/docs/CommentsApi.md CHANGED
@@ -9,12 +9,14 @@ All URIs are relative to *https://zernio.com/api*
9
9
  | [**get_inbox_post_comments**](CommentsApi.md#get_inbox_post_comments) | **GET** /v1/inbox/comments/{postId} | Get post comments |
10
10
  | [**hide_inbox_comment**](CommentsApi.md#hide_inbox_comment) | **POST** /v1/inbox/comments/{postId}/{commentId}/hide | Hide comment |
11
11
  | [**like_inbox_comment**](CommentsApi.md#like_inbox_comment) | **POST** /v1/inbox/comments/{postId}/{commentId}/like | Like comment |
12
+ | [**like_post**](CommentsApi.md#like_post) | **POST** /v1/inbox/posts/{postId}/like | Like post |
12
13
  | [**list_inbox_comments**](CommentsApi.md#list_inbox_comments) | **GET** /v1/inbox/comments | List commented posts |
13
14
  | [**reply_to_inbox_post**](CommentsApi.md#reply_to_inbox_post) | **POST** /v1/inbox/comments/{postId} | Reply to comment |
14
15
  | [**send_private_reply_to_comment**](CommentsApi.md#send_private_reply_to_comment) | **POST** /v1/inbox/comments/{postId}/{commentId}/private-reply | Send private reply |
15
16
  | [**set_comment_moderation**](CommentsApi.md#set_comment_moderation) | **POST** /v1/inbox/comments/{postId}/{commentId}/moderation | Set comment moderation status |
16
17
  | [**unhide_inbox_comment**](CommentsApi.md#unhide_inbox_comment) | **DELETE** /v1/inbox/comments/{postId}/{commentId}/hide | Unhide comment |
17
18
  | [**unlike_inbox_comment**](CommentsApi.md#unlike_inbox_comment) | **DELETE** /v1/inbox/comments/{postId}/{commentId}/like | Unlike comment |
19
+ | [**unlike_post**](CommentsApi.md#unlike_post) | **DELETE** /v1/inbox/posts/{postId}/like | Unlike post |
18
20
 
19
21
 
20
22
  ## delete_inbox_comment
@@ -323,7 +325,7 @@ end
323
325
 
324
326
  Like comment
325
327
 
326
- 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.
328
+ Like or upvote a comment on a post. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit, LinkedIn. For Bluesky, the cid (content identifier) is required in the request body. For LinkedIn, pass the composite comment URN returned by the comments endpoints as commentId; an optional reactionType picks the reaction (defaults to LIKE), and accounts connected before the social-feed scopes were requested get a 403 with code `linkedin_reconnect_required`.
327
329
 
328
330
  ### Examples
329
331
 
@@ -390,6 +392,77 @@ end
390
392
  - **Accept**: application/json
391
393
 
392
394
 
395
+ ## like_post
396
+
397
+ > <LikePost200Response> like_post(post_id, like_post_request)
398
+
399
+ Like post
400
+
401
+ Like (or react to) a post as a connected account. Supported platforms: LinkedIn, Twitter/X, Facebook, YouTube, Bluesky. Instagram, Threads, TikTok and Pinterest expose no like endpoint in their APIs and return 400. Reddit returns 400 too, pointing at `POST /v1/accounts/{accountId}/reddit-vote`, which covers upvote, downvote and clear on both posts and comments. The account does not have to be the one that published the post, which is what makes executive engagement possible: pass an exec's `accountId` and the brand post's ID. `postId` accepts either a Zernio post ID or the platform's native post ID. A Zernio post ID resolves to the entry for `accountId`, falling back to the post's single entry on the same platform (two entries on that platform is a 400, so pass the native ID). LinkedIn requires the `w_member_social_feed` / `w_organization_social_feed` scopes, which are not retroactive: accounts connected before those were requested get a 403 with code `linkedin_reconnect_required` until the user reconnects the account. YouTube spends 50 quota units per call.
402
+
403
+ ### Examples
404
+
405
+ ```ruby
406
+ require 'time'
407
+ require 'zernio-sdk'
408
+ # setup authorization
409
+ Zernio.configure do |config|
410
+ # Configure Bearer authorization (JWT): bearerAuth
411
+ config.access_token = 'YOUR_BEARER_TOKEN'
412
+ end
413
+
414
+ api_instance = Zernio::CommentsApi.new
415
+ post_id = 'post_id_example' # String | Zernio post ID or the platform's native post ID
416
+ like_post_request = Zernio::LikePostRequest.new({account_id: 'account_id_example'}) # LikePostRequest |
417
+
418
+ begin
419
+ # Like post
420
+ result = api_instance.like_post(post_id, like_post_request)
421
+ p result
422
+ rescue Zernio::ApiError => e
423
+ puts "Error when calling CommentsApi->like_post: #{e}"
424
+ end
425
+ ```
426
+
427
+ #### Using the like_post_with_http_info variant
428
+
429
+ This returns an Array which contains the response data, status code and headers.
430
+
431
+ > <Array(<LikePost200Response>, Integer, Hash)> like_post_with_http_info(post_id, like_post_request)
432
+
433
+ ```ruby
434
+ begin
435
+ # Like post
436
+ data, status_code, headers = api_instance.like_post_with_http_info(post_id, like_post_request)
437
+ p status_code # => 2xx
438
+ p headers # => { ... }
439
+ p data # => <LikePost200Response>
440
+ rescue Zernio::ApiError => e
441
+ puts "Error when calling CommentsApi->like_post_with_http_info: #{e}"
442
+ end
443
+ ```
444
+
445
+ ### Parameters
446
+
447
+ | Name | Type | Description | Notes |
448
+ | ---- | ---- | ----------- | ----- |
449
+ | **post_id** | **String** | Zernio post ID or the platform&#39;s native post ID | |
450
+ | **like_post_request** | [**LikePostRequest**](LikePostRequest.md) | | |
451
+
452
+ ### Return type
453
+
454
+ [**LikePost200Response**](LikePost200Response.md)
455
+
456
+ ### Authorization
457
+
458
+ [bearerAuth](../README.md#bearerAuth)
459
+
460
+ ### HTTP request headers
461
+
462
+ - **Content-Type**: application/json
463
+ - **Accept**: application/json
464
+
465
+
393
466
  ## list_inbox_comments
394
467
 
395
468
  > <ListInboxComments200Response> list_inbox_comments(opts)
@@ -773,7 +846,7 @@ end
773
846
 
774
847
  Unlike comment
775
848
 
776
- Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit. For Bluesky, the likeUri query parameter is required.
849
+ Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit, LinkedIn. For Bluesky, the likeUri query parameter is required.
777
850
 
778
851
  ### Examples
779
852
 
@@ -843,3 +916,78 @@ end
843
916
  - **Content-Type**: Not defined
844
917
  - **Accept**: application/json
845
918
 
919
+
920
+ ## unlike_post
921
+
922
+ > <UnlikePost200Response> unlike_post(post_id, account_id, opts)
923
+
924
+ Unlike post
925
+
926
+ Remove this account's like from a post. Supported platforms: LinkedIn, Twitter/X, Facebook, YouTube, Bluesky. On YouTube this clears the rating. For Bluesky, `likeUri` (returned when the post was liked) is required. Reddit uses `POST /v1/accounts/{accountId}/reddit-vote` with `direction: 0`.
927
+
928
+ ### Examples
929
+
930
+ ```ruby
931
+ require 'time'
932
+ require 'zernio-sdk'
933
+ # setup authorization
934
+ Zernio.configure do |config|
935
+ # Configure Bearer authorization (JWT): bearerAuth
936
+ config.access_token = 'YOUR_BEARER_TOKEN'
937
+ end
938
+
939
+ api_instance = Zernio::CommentsApi.new
940
+ post_id = 'post_id_example' # String | Zernio post ID or the platform's native post ID
941
+ account_id = 'account_id_example' # String |
942
+ opts = {
943
+ like_uri: 'like_uri_example' # String | (Bluesky only) The like URI returned when liking
944
+ }
945
+
946
+ begin
947
+ # Unlike post
948
+ result = api_instance.unlike_post(post_id, account_id, opts)
949
+ p result
950
+ rescue Zernio::ApiError => e
951
+ puts "Error when calling CommentsApi->unlike_post: #{e}"
952
+ end
953
+ ```
954
+
955
+ #### Using the unlike_post_with_http_info variant
956
+
957
+ This returns an Array which contains the response data, status code and headers.
958
+
959
+ > <Array(<UnlikePost200Response>, Integer, Hash)> unlike_post_with_http_info(post_id, account_id, opts)
960
+
961
+ ```ruby
962
+ begin
963
+ # Unlike post
964
+ data, status_code, headers = api_instance.unlike_post_with_http_info(post_id, account_id, opts)
965
+ p status_code # => 2xx
966
+ p headers # => { ... }
967
+ p data # => <UnlikePost200Response>
968
+ rescue Zernio::ApiError => e
969
+ puts "Error when calling CommentsApi->unlike_post_with_http_info: #{e}"
970
+ end
971
+ ```
972
+
973
+ ### Parameters
974
+
975
+ | Name | Type | Description | Notes |
976
+ | ---- | ---- | ----------- | ----- |
977
+ | **post_id** | **String** | Zernio post ID or the platform&#39;s native post ID | |
978
+ | **account_id** | **String** | | |
979
+ | **like_uri** | **String** | (Bluesky only) The like URI returned when liking | [optional] |
980
+
981
+ ### Return type
982
+
983
+ [**UnlikePost200Response**](UnlikePost200Response.md)
984
+
985
+ ### Authorization
986
+
987
+ [bearerAuth](../README.md#bearerAuth)
988
+
989
+ ### HTTP request headers
990
+
991
+ - **Content-Type**: Not defined
992
+ - **Accept**: application/json
993
+
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **account_id** | **String** | The social account ID | |
8
+ | **reaction_type** | **String** | (LinkedIn only) Reaction to create. Defaults to LIKE; ignored on other platforms. | [optional] |
8
9
  | **cid** | **String** | (Bluesky only) Content identifier for the comment | [optional] |
9
10
 
10
11
  ## Example
@@ -14,6 +15,7 @@ require 'zernio-sdk'
14
15
 
15
16
  instance = Zernio::LikeInboxCommentRequest.new(
16
17
  account_id: null,
18
+ reaction_type: null,
17
19
  cid: null
18
20
  )
19
21
  ```
@@ -0,0 +1,26 @@
1
+ # Zernio::LikePost200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status** | **String** | | [optional] |
8
+ | **post_id** | **String** | The resolved native post ID | [optional] |
9
+ | **platform** | **String** | | [optional] |
10
+ | **liked** | **Boolean** | | [optional] |
11
+ | **like_uri** | **String** | (Bluesky only) URI to use for unliking | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'zernio-sdk'
17
+
18
+ instance = Zernio::LikePost200Response.new(
19
+ status: null,
20
+ post_id: null,
21
+ platform: null,
22
+ liked: null,
23
+ like_uri: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,22 @@
1
+ # Zernio::LikePostRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | The social account acting as the liker | |
8
+ | **reaction_type** | **String** | (LinkedIn only) Reaction to create. Defaults to LIKE; ignored on other platforms. | [optional] |
9
+ | **cid** | **String** | (Bluesky only) Content identifier of the post | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::LikePostRequest.new(
17
+ account_id: null,
18
+ reaction_type: null,
19
+ cid: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # Zernio::UnlikePost200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status** | **String** | | [optional] |
8
+ | **post_id** | **String** | The resolved native post ID | [optional] |
9
+ | **platform** | **String** | | [optional] |
10
+ | **liked** | **Boolean** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::UnlikePost200Response.new(
18
+ status: null,
19
+ post_id: null,
20
+ platform: null,
21
+ liked: null
22
+ )
23
+ ```
24
+
@@ -347,7 +347,7 @@ module Zernio
347
347
  end
348
348
 
349
349
  # Like comment
350
- # 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.
350
+ # Like or upvote a comment on a post. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit, LinkedIn. For Bluesky, the cid (content identifier) is required in the request body. For LinkedIn, pass the composite comment URN returned by the comments endpoints as commentId; an optional reactionType picks the reaction (defaults to LIKE), and accounts connected before the social-feed scopes were requested get a 403 with code `linkedin_reconnect_required`.
351
351
  # @param post_id [String]
352
352
  # @param comment_id [String]
353
353
  # @param like_inbox_comment_request [LikeInboxCommentRequest]
@@ -359,7 +359,7 @@ module Zernio
359
359
  end
360
360
 
361
361
  # Like comment
362
- # 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.
362
+ # Like or upvote a comment on a post. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit, LinkedIn. For Bluesky, the cid (content identifier) is required in the request body. For LinkedIn, pass the composite comment URN returned by the comments endpoints as commentId; an optional reactionType picks the reaction (defaults to LIKE), and accounts connected before the social-feed scopes were requested get a 403 with code &#x60;linkedin_reconnect_required&#x60;.
363
363
  # @param post_id [String]
364
364
  # @param comment_id [String]
365
365
  # @param like_inbox_comment_request [LikeInboxCommentRequest]
@@ -426,6 +426,80 @@ module Zernio
426
426
  return data, status_code, headers
427
427
  end
428
428
 
429
+ # Like post
430
+ # Like (or react to) a post as a connected account. Supported platforms: LinkedIn, Twitter/X, Facebook, YouTube, Bluesky. Instagram, Threads, TikTok and Pinterest expose no like endpoint in their APIs and return 400. Reddit returns 400 too, pointing at `POST /v1/accounts/{accountId}/reddit-vote`, which covers upvote, downvote and clear on both posts and comments. The account does not have to be the one that published the post, which is what makes executive engagement possible: pass an exec's `accountId` and the brand post's ID. `postId` accepts either a Zernio post ID or the platform's native post ID. A Zernio post ID resolves to the entry for `accountId`, falling back to the post's single entry on the same platform (two entries on that platform is a 400, so pass the native ID). LinkedIn requires the `w_member_social_feed` / `w_organization_social_feed` scopes, which are not retroactive: accounts connected before those were requested get a 403 with code `linkedin_reconnect_required` until the user reconnects the account. YouTube spends 50 quota units per call.
431
+ # @param post_id [String] Zernio post ID or the platform&#39;s native post ID
432
+ # @param like_post_request [LikePostRequest]
433
+ # @param [Hash] opts the optional parameters
434
+ # @return [LikePost200Response]
435
+ def like_post(post_id, like_post_request, opts = {})
436
+ data, _status_code, _headers = like_post_with_http_info(post_id, like_post_request, opts)
437
+ data
438
+ end
439
+
440
+ # Like post
441
+ # Like (or react to) a post as a connected account. Supported platforms: LinkedIn, Twitter/X, Facebook, YouTube, Bluesky. Instagram, Threads, TikTok and Pinterest expose no like endpoint in their APIs and return 400. Reddit returns 400 too, pointing at &#x60;POST /v1/accounts/{accountId}/reddit-vote&#x60;, which covers upvote, downvote and clear on both posts and comments. The account does not have to be the one that published the post, which is what makes executive engagement possible: pass an exec&#39;s &#x60;accountId&#x60; and the brand post&#39;s ID. &#x60;postId&#x60; accepts either a Zernio post ID or the platform&#39;s native post ID. A Zernio post ID resolves to the entry for &#x60;accountId&#x60;, falling back to the post&#39;s single entry on the same platform (two entries on that platform is a 400, so pass the native ID). LinkedIn requires the &#x60;w_member_social_feed&#x60; / &#x60;w_organization_social_feed&#x60; scopes, which are not retroactive: accounts connected before those were requested get a 403 with code &#x60;linkedin_reconnect_required&#x60; until the user reconnects the account. YouTube spends 50 quota units per call.
442
+ # @param post_id [String] Zernio post ID or the platform&#39;s native post ID
443
+ # @param like_post_request [LikePostRequest]
444
+ # @param [Hash] opts the optional parameters
445
+ # @return [Array<(LikePost200Response, Integer, Hash)>] LikePost200Response data, response status code and response headers
446
+ def like_post_with_http_info(post_id, like_post_request, opts = {})
447
+ if @api_client.config.debugging
448
+ @api_client.config.logger.debug 'Calling API: CommentsApi.like_post ...'
449
+ end
450
+ # verify the required parameter 'post_id' is set
451
+ if @api_client.config.client_side_validation && post_id.nil?
452
+ fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.like_post"
453
+ end
454
+ # verify the required parameter 'like_post_request' is set
455
+ if @api_client.config.client_side_validation && like_post_request.nil?
456
+ fail ArgumentError, "Missing the required parameter 'like_post_request' when calling CommentsApi.like_post"
457
+ end
458
+ # resource path
459
+ local_var_path = '/v1/inbox/posts/{postId}/like'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s))
460
+
461
+ # query parameters
462
+ query_params = opts[:query_params] || {}
463
+
464
+ # header parameters
465
+ header_params = opts[:header_params] || {}
466
+ # HTTP header 'Accept' (if needed)
467
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
468
+ # HTTP header 'Content-Type'
469
+ content_type = @api_client.select_header_content_type(['application/json'])
470
+ if !content_type.nil?
471
+ header_params['Content-Type'] = content_type
472
+ end
473
+
474
+ # form parameters
475
+ form_params = opts[:form_params] || {}
476
+
477
+ # http body (model)
478
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(like_post_request)
479
+
480
+ # return_type
481
+ return_type = opts[:debug_return_type] || 'LikePost200Response'
482
+
483
+ # auth_names
484
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
485
+
486
+ new_options = opts.merge(
487
+ :operation => :"CommentsApi.like_post",
488
+ :header_params => header_params,
489
+ :query_params => query_params,
490
+ :form_params => form_params,
491
+ :body => post_body,
492
+ :auth_names => auth_names,
493
+ :return_type => return_type
494
+ )
495
+
496
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
497
+ if @api_client.config.debugging
498
+ @api_client.config.logger.debug "API called: CommentsApi#like_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
499
+ end
500
+ return data, status_code, headers
501
+ end
502
+
429
503
  # List commented posts
430
504
  # 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. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook and Instagram only, since they are the platforms that support a server-side date window; on the others the listing stops at its first page.
431
505
  # @param [Hash] opts the optional parameters
@@ -845,7 +919,7 @@ module Zernio
845
919
  end
846
920
 
847
921
  # Unlike comment
848
- # Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit. For Bluesky, the likeUri query parameter is required.
922
+ # Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit, LinkedIn. For Bluesky, the likeUri query parameter is required.
849
923
  # @param post_id [String]
850
924
  # @param comment_id [String]
851
925
  # @param account_id [String]
@@ -858,7 +932,7 @@ module Zernio
858
932
  end
859
933
 
860
934
  # Unlike comment
861
- # Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit. For Bluesky, the likeUri query parameter is required.
935
+ # Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit, LinkedIn. For Bluesky, the likeUri query parameter is required.
862
936
  # @param post_id [String]
863
937
  # @param comment_id [String]
864
938
  # @param account_id [String]
@@ -922,5 +996,78 @@ module Zernio
922
996
  end
923
997
  return data, status_code, headers
924
998
  end
999
+
1000
+ # Unlike post
1001
+ # Remove this account's like from a post. Supported platforms: LinkedIn, Twitter/X, Facebook, YouTube, Bluesky. On YouTube this clears the rating. For Bluesky, `likeUri` (returned when the post was liked) is required. Reddit uses `POST /v1/accounts/{accountId}/reddit-vote` with `direction: 0`.
1002
+ # @param post_id [String] Zernio post ID or the platform&#39;s native post ID
1003
+ # @param account_id [String]
1004
+ # @param [Hash] opts the optional parameters
1005
+ # @option opts [String] :like_uri (Bluesky only) The like URI returned when liking
1006
+ # @return [UnlikePost200Response]
1007
+ def unlike_post(post_id, account_id, opts = {})
1008
+ data, _status_code, _headers = unlike_post_with_http_info(post_id, account_id, opts)
1009
+ data
1010
+ end
1011
+
1012
+ # Unlike post
1013
+ # Remove this account&#39;s like from a post. Supported platforms: LinkedIn, Twitter/X, Facebook, YouTube, Bluesky. On YouTube this clears the rating. For Bluesky, &#x60;likeUri&#x60; (returned when the post was liked) is required. Reddit uses &#x60;POST /v1/accounts/{accountId}/reddit-vote&#x60; with &#x60;direction: 0&#x60;.
1014
+ # @param post_id [String] Zernio post ID or the platform&#39;s native post ID
1015
+ # @param account_id [String]
1016
+ # @param [Hash] opts the optional parameters
1017
+ # @option opts [String] :like_uri (Bluesky only) The like URI returned when liking
1018
+ # @return [Array<(UnlikePost200Response, Integer, Hash)>] UnlikePost200Response data, response status code and response headers
1019
+ def unlike_post_with_http_info(post_id, account_id, opts = {})
1020
+ if @api_client.config.debugging
1021
+ @api_client.config.logger.debug 'Calling API: CommentsApi.unlike_post ...'
1022
+ end
1023
+ # verify the required parameter 'post_id' is set
1024
+ if @api_client.config.client_side_validation && post_id.nil?
1025
+ fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.unlike_post"
1026
+ end
1027
+ # verify the required parameter 'account_id' is set
1028
+ if @api_client.config.client_side_validation && account_id.nil?
1029
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling CommentsApi.unlike_post"
1030
+ end
1031
+ # resource path
1032
+ local_var_path = '/v1/inbox/posts/{postId}/like'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s))
1033
+
1034
+ # query parameters
1035
+ query_params = opts[:query_params] || {}
1036
+ query_params[:'accountId'] = account_id
1037
+ query_params[:'likeUri'] = opts[:'like_uri'] if !opts[:'like_uri'].nil?
1038
+
1039
+ # header parameters
1040
+ header_params = opts[:header_params] || {}
1041
+ # HTTP header 'Accept' (if needed)
1042
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1043
+
1044
+ # form parameters
1045
+ form_params = opts[:form_params] || {}
1046
+
1047
+ # http body (model)
1048
+ post_body = opts[:debug_body]
1049
+
1050
+ # return_type
1051
+ return_type = opts[:debug_return_type] || 'UnlikePost200Response'
1052
+
1053
+ # auth_names
1054
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1055
+
1056
+ new_options = opts.merge(
1057
+ :operation => :"CommentsApi.unlike_post",
1058
+ :header_params => header_params,
1059
+ :query_params => query_params,
1060
+ :form_params => form_params,
1061
+ :body => post_body,
1062
+ :auth_names => auth_names,
1063
+ :return_type => return_type
1064
+ )
1065
+
1066
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1067
+ if @api_client.config.debugging
1068
+ @api_client.config.logger.debug "API called: CommentsApi#unlike_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1069
+ end
1070
+ return data, status_code, headers
1071
+ end
925
1072
  end
926
1073
  end
@@ -18,13 +18,39 @@ module Zernio
18
18
  # The social account ID
19
19
  attr_accessor :account_id
20
20
 
21
+ # (LinkedIn only) Reaction to create. Defaults to LIKE; ignored on other platforms.
22
+ attr_accessor :reaction_type
23
+
21
24
  # (Bluesky only) Content identifier for the comment
22
25
  attr_accessor :cid
23
26
 
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
24
49
  # Attribute mapping from ruby-style variable name to JSON key.
25
50
  def self.attribute_map
26
51
  {
27
52
  :'account_id' => :'accountId',
53
+ :'reaction_type' => :'reactionType',
28
54
  :'cid' => :'cid'
29
55
  }
30
56
  end
@@ -43,6 +69,7 @@ module Zernio
43
69
  def self.openapi_types
44
70
  {
45
71
  :'account_id' => :'String',
72
+ :'reaction_type' => :'String',
46
73
  :'cid' => :'String'
47
74
  }
48
75
  end
@@ -75,6 +102,10 @@ module Zernio
75
102
  self.account_id = nil
76
103
  end
77
104
 
105
+ if attributes.key?(:'reaction_type')
106
+ self.reaction_type = attributes[:'reaction_type']
107
+ end
108
+
78
109
  if attributes.key?(:'cid')
79
110
  self.cid = attributes[:'cid']
80
111
  end
@@ -97,6 +128,8 @@ module Zernio
97
128
  def valid?
98
129
  warn '[DEPRECATED] the `valid?` method is obsolete'
99
130
  return false if @account_id.nil?
131
+ reaction_type_validator = EnumAttributeValidator.new('String', ["LIKE", "PRAISE", "EMPATHY", "INTEREST", "APPRECIATION", "ENTERTAINMENT"])
132
+ return false unless reaction_type_validator.valid?(@reaction_type)
100
133
  true
101
134
  end
102
135
 
@@ -110,12 +143,23 @@ module Zernio
110
143
  @account_id = account_id
111
144
  end
112
145
 
146
+ # Custom attribute writer method checking allowed values (enum).
147
+ # @param [Object] reaction_type Object to be assigned
148
+ def reaction_type=(reaction_type)
149
+ validator = EnumAttributeValidator.new('String', ["LIKE", "PRAISE", "EMPATHY", "INTEREST", "APPRECIATION", "ENTERTAINMENT"])
150
+ unless validator.valid?(reaction_type)
151
+ fail ArgumentError, "invalid value for \"reaction_type\", must be one of #{validator.allowable_values}."
152
+ end
153
+ @reaction_type = reaction_type
154
+ end
155
+
113
156
  # Checks equality by comparing each attribute.
114
157
  # @param [Object] Object to be compared
115
158
  def ==(o)
116
159
  return true if self.equal?(o)
117
160
  self.class == o.class &&
118
161
  account_id == o.account_id &&
162
+ reaction_type == o.reaction_type &&
119
163
  cid == o.cid
120
164
  end
121
165
 
@@ -128,7 +172,7 @@ module Zernio
128
172
  # Calculates hash code according to all attributes.
129
173
  # @return [Integer] Hash code
130
174
  def hash
131
- [account_id, cid].hash
175
+ [account_id, reaction_type, cid].hash
132
176
  end
133
177
 
134
178
  # Builds the object from hash