late-sdk 0.0.702 → 0.0.704
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/docs/CommentsApi.md +150 -2
- data/docs/GetMediaPresignedUrl200Response.md +2 -2
- data/docs/GetMediaPresignedUrlRequest.md +3 -1
- data/docs/LikeInboxCommentRequest.md +2 -0
- data/docs/LikePost200Response.md +26 -0
- data/docs/LikePostRequest.md +22 -0
- data/docs/MediaApi.md +1 -1
- data/docs/UnlikePost200Response.md +24 -0
- data/lib/zernio-sdk/api/comments_api.rb +151 -4
- data/lib/zernio-sdk/api/media_api.rb +2 -2
- data/lib/zernio-sdk/models/get_media_presigned_url200_response.rb +2 -2
- data/lib/zernio-sdk/models/get_media_presigned_url_request.rb +16 -4
- data/lib/zernio-sdk/models/like_inbox_comment_request.rb +45 -1
- data/lib/zernio-sdk/models/like_post200_response.rb +185 -0
- data/lib/zernio-sdk/models/like_post_request.rb +219 -0
- data/lib/zernio-sdk/models/unlike_post200_response.rb +175 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +134 -7
- data/spec/api/comments_api_spec.rb +29 -2
- data/spec/api/media_api_spec.rb +1 -1
- data/spec/models/get_media_presigned_url_request_spec.rb +6 -0
- data/spec/models/like_inbox_comment_request_spec.rb +10 -0
- data/spec/models/like_post200_response_spec.rb +60 -0
- data/spec/models/like_post_request_spec.rb +52 -0
- data/spec/models/unlike_post200_response_spec.rb +54 -0
- data/zernio-sdk-0.0.704.gem +0 -0
- metadata +15 -3
- data/zernio-sdk-0.0.702.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8033cfdff68231d32ec8c9db798374531537ff46cb81c51f6d7900bdea54886
|
|
4
|
+
data.tar.gz: 2086366f640ad979689c034e0528d53af8e2a71736606bb97261b074efa225a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eced51237fc8d49711360db02e0101e5250d80674cb493bc34744f41b9df594672b1d86e4ee423bb663c268af77172b61a5225704085b8a739ef4b00732e7c79
|
|
7
|
+
data.tar.gz: 52159290fd41539d661f485ef69bfc48cb4feb8ce93b58e160d04138fe4765a28189ec76af14f92ff0284e642ffa00124ed63b4744df3de7bae278da61b5732a
|
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'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'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,8 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **upload_url** | **String** | Presigned URL to PUT your file to (expires in 1 hour) | [optional] |
|
|
8
|
-
| **public_url** | **String** | Public URL where the file will be accessible after upload | [optional] |
|
|
9
|
-
| **key** | **String** | Storage key/path of the file | [optional] |
|
|
8
|
+
| **public_url** | **String** | Public URL where the file will be accessible after upload. Served from the temp/ prefix by default (expires 7 days after upload) or from media/ when permanent is true. | [optional] |
|
|
9
|
+
| **key** | **String** | Storage key/path of the file. Prefixed temp/ by default, media/ when permanent is true. | [optional] |
|
|
10
10
|
| **expires_in** | **Integer** | Seconds until the presigned uploadUrl expires (always 3600) | [optional] |
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| **filename** | **String** | Name of the file to upload | |
|
|
8
8
|
| **content_type** | **String** | MIME type of the file | |
|
|
9
9
|
| **size** | **Integer** | Optional file size in bytes for pre-validation (max 5GB) | [optional] |
|
|
10
|
+
| **permanent** | **Boolean** | Write the file to permanent storage instead of temporary storage. Temporary files auto-delete 7 days after upload; permanent files never expire. | [optional][default to false] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,7 +17,8 @@ require 'zernio-sdk'
|
|
|
16
17
|
instance = Zernio::GetMediaPresignedUrlRequest.new(
|
|
17
18
|
filename: my-video.mp4,
|
|
18
19
|
content_type: video/mp4,
|
|
19
|
-
size: 15234567
|
|
20
|
+
size: 15234567,
|
|
21
|
+
permanent: true
|
|
20
22
|
)
|
|
21
23
|
```
|
|
22
24
|
|
|
@@ -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
|
+
|
data/docs/MediaApi.md
CHANGED
|
@@ -13,7 +13,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
13
13
|
|
|
14
14
|
Get upload URL
|
|
15
15
|
|
|
16
|
-
Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
|
|
16
|
+
Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts. By default the file is written to temporary storage and auto-deletes 7 days after upload, so the publicUrl stops resolving once that window passes. Send `permanent: true` to write straight to permanent storage, which has no expiry: use it for anything that must stay reachable for longer, in particular cover and thumbnail images on posts scheduled more than a week out.
|
|
17
17
|
|
|
18
18
|
### Examples
|
|
19
19
|
|
|
@@ -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 `linkedin_reconnect_required`.
|
|
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'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 `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.
|
|
442
|
+
# @param post_id [String] Zernio post ID or the platform'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'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'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`.
|
|
1014
|
+
# @param post_id [String] Zernio post ID or the platform'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
|
|
@@ -20,7 +20,7 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get upload URL
|
|
23
|
-
# Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
|
|
23
|
+
# Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts. By default the file is written to temporary storage and auto-deletes 7 days after upload, so the publicUrl stops resolving once that window passes. Send `permanent: true` to write straight to permanent storage, which has no expiry: use it for anything that must stay reachable for longer, in particular cover and thumbnail images on posts scheduled more than a week out.
|
|
24
24
|
# @param get_media_presigned_url_request [GetMediaPresignedUrlRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [GetMediaPresignedUrl200Response]
|
|
@@ -30,7 +30,7 @@ module Zernio
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Get upload URL
|
|
33
|
-
# Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
|
|
33
|
+
# Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts. By default the file is written to temporary storage and auto-deletes 7 days after upload, so the publicUrl stops resolving once that window passes. Send `permanent: true` to write straight to permanent storage, which has no expiry: use it for anything that must stay reachable for longer, in particular cover and thumbnail images on posts scheduled more than a week out.
|
|
34
34
|
# @param get_media_presigned_url_request [GetMediaPresignedUrlRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(GetMediaPresignedUrl200Response, Integer, Hash)>] GetMediaPresignedUrl200Response data, response status code and response headers
|
|
@@ -18,10 +18,10 @@ module Zernio
|
|
|
18
18
|
# Presigned URL to PUT your file to (expires in 1 hour)
|
|
19
19
|
attr_accessor :upload_url
|
|
20
20
|
|
|
21
|
-
# Public URL where the file will be accessible after upload
|
|
21
|
+
# Public URL where the file will be accessible after upload. Served from the temp/ prefix by default (expires 7 days after upload) or from media/ when permanent is true.
|
|
22
22
|
attr_accessor :public_url
|
|
23
23
|
|
|
24
|
-
# Storage key/path of the file
|
|
24
|
+
# Storage key/path of the file. Prefixed temp/ by default, media/ when permanent is true.
|
|
25
25
|
attr_accessor :key
|
|
26
26
|
|
|
27
27
|
# Seconds until the presigned uploadUrl expires (always 3600)
|
|
@@ -24,6 +24,9 @@ module Zernio
|
|
|
24
24
|
# Optional file size in bytes for pre-validation (max 5GB)
|
|
25
25
|
attr_accessor :size
|
|
26
26
|
|
|
27
|
+
# Write the file to permanent storage instead of temporary storage. Temporary files auto-delete 7 days after upload; permanent files never expire.
|
|
28
|
+
attr_accessor :permanent
|
|
29
|
+
|
|
27
30
|
class EnumAttributeValidator
|
|
28
31
|
attr_reader :datatype
|
|
29
32
|
attr_reader :allowable_values
|
|
@@ -51,7 +54,8 @@ module Zernio
|
|
|
51
54
|
{
|
|
52
55
|
:'filename' => :'filename',
|
|
53
56
|
:'content_type' => :'contentType',
|
|
54
|
-
:'size' => :'size'
|
|
57
|
+
:'size' => :'size',
|
|
58
|
+
:'permanent' => :'permanent'
|
|
55
59
|
}
|
|
56
60
|
end
|
|
57
61
|
|
|
@@ -70,7 +74,8 @@ module Zernio
|
|
|
70
74
|
{
|
|
71
75
|
:'filename' => :'String',
|
|
72
76
|
:'content_type' => :'String',
|
|
73
|
-
:'size' => :'Integer'
|
|
77
|
+
:'size' => :'Integer',
|
|
78
|
+
:'permanent' => :'Boolean'
|
|
74
79
|
}
|
|
75
80
|
end
|
|
76
81
|
|
|
@@ -111,6 +116,12 @@ module Zernio
|
|
|
111
116
|
if attributes.key?(:'size')
|
|
112
117
|
self.size = attributes[:'size']
|
|
113
118
|
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'permanent')
|
|
121
|
+
self.permanent = attributes[:'permanent']
|
|
122
|
+
else
|
|
123
|
+
self.permanent = false
|
|
124
|
+
end
|
|
114
125
|
end
|
|
115
126
|
|
|
116
127
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -167,7 +178,8 @@ module Zernio
|
|
|
167
178
|
self.class == o.class &&
|
|
168
179
|
filename == o.filename &&
|
|
169
180
|
content_type == o.content_type &&
|
|
170
|
-
size == o.size
|
|
181
|
+
size == o.size &&
|
|
182
|
+
permanent == o.permanent
|
|
171
183
|
end
|
|
172
184
|
|
|
173
185
|
# @see the `==` method
|
|
@@ -179,7 +191,7 @@ module Zernio
|
|
|
179
191
|
# Calculates hash code according to all attributes.
|
|
180
192
|
# @return [Integer] Hash code
|
|
181
193
|
def hash
|
|
182
|
-
[filename, content_type, size].hash
|
|
194
|
+
[filename, content_type, size, permanent].hash
|
|
183
195
|
end
|
|
184
196
|
|
|
185
197
|
# Builds the object from hash
|