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
|
@@ -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
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class LikePost200Response < ApiModelBase
|
|
18
|
+
attr_accessor :status
|
|
19
|
+
|
|
20
|
+
# The resolved native post ID
|
|
21
|
+
attr_accessor :post_id
|
|
22
|
+
|
|
23
|
+
attr_accessor :platform
|
|
24
|
+
|
|
25
|
+
attr_accessor :liked
|
|
26
|
+
|
|
27
|
+
# (Bluesky only) URI to use for unliking
|
|
28
|
+
attr_accessor :like_uri
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'status' => :'status',
|
|
34
|
+
:'post_id' => :'postId',
|
|
35
|
+
:'platform' => :'platform',
|
|
36
|
+
:'liked' => :'liked',
|
|
37
|
+
:'like_uri' => :'likeUri'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'status' => :'String',
|
|
55
|
+
:'post_id' => :'String',
|
|
56
|
+
:'platform' => :'String',
|
|
57
|
+
:'liked' => :'Boolean',
|
|
58
|
+
:'like_uri' => :'String'
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# List of attributes with nullable: true
|
|
63
|
+
def self.openapi_nullable
|
|
64
|
+
Set.new([
|
|
65
|
+
])
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Initializes the object
|
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
if (!attributes.is_a?(Hash))
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::LikePost200Response` initialize method"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::LikePost200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'status')
|
|
85
|
+
self.status = attributes[:'status']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'post_id')
|
|
89
|
+
self.post_id = attributes[:'post_id']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'platform')
|
|
93
|
+
self.platform = attributes[:'platform']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'liked')
|
|
97
|
+
self.liked = attributes[:'liked']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'like_uri')
|
|
101
|
+
self.like_uri = attributes[:'like_uri']
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
invalid_properties
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Check to see if the all the properties in the model are valid
|
|
114
|
+
# @return true if the model is valid
|
|
115
|
+
def valid?
|
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Checks equality by comparing each attribute.
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
status == o.status &&
|
|
126
|
+
post_id == o.post_id &&
|
|
127
|
+
platform == o.platform &&
|
|
128
|
+
liked == o.liked &&
|
|
129
|
+
like_uri == o.like_uri
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# @see the `==` method
|
|
133
|
+
# @param [Object] Object to be compared
|
|
134
|
+
def eql?(o)
|
|
135
|
+
self == o
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Calculates hash code according to all attributes.
|
|
139
|
+
# @return [Integer] Hash code
|
|
140
|
+
def hash
|
|
141
|
+
[status, post_id, platform, liked, like_uri].hash
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Builds the object from hash
|
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
146
|
+
# @return [Object] Returns the model itself
|
|
147
|
+
def self.build_from_hash(attributes)
|
|
148
|
+
return nil unless attributes.is_a?(Hash)
|
|
149
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
150
|
+
transformed_hash = {}
|
|
151
|
+
openapi_types.each_pair do |key, type|
|
|
152
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
153
|
+
transformed_hash["#{key}"] = nil
|
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
155
|
+
# check to ensure the input is an array given that the attribute
|
|
156
|
+
# is documented as an array but the input is not
|
|
157
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
158
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
159
|
+
end
|
|
160
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
new(transformed_hash)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Returns the object in the form of hash
|
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
|
169
|
+
def to_hash
|
|
170
|
+
hash = {}
|
|
171
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
172
|
+
value = self.send(attr)
|
|
173
|
+
if value.nil?
|
|
174
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
175
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
hash[param] = _to_hash(value)
|
|
179
|
+
end
|
|
180
|
+
hash
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
end
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class LikePostRequest < ApiModelBase
|
|
18
|
+
# The social account acting as the liker
|
|
19
|
+
attr_accessor :account_id
|
|
20
|
+
|
|
21
|
+
# (LinkedIn only) Reaction to create. Defaults to LIKE; ignored on other platforms.
|
|
22
|
+
attr_accessor :reaction_type
|
|
23
|
+
|
|
24
|
+
# (Bluesky only) Content identifier of the post
|
|
25
|
+
attr_accessor :cid
|
|
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
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'account_id' => :'accountId',
|
|
53
|
+
:'reaction_type' => :'reactionType',
|
|
54
|
+
:'cid' => :'cid'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns all the JSON keys this model knows about
|
|
64
|
+
def self.acceptable_attributes
|
|
65
|
+
acceptable_attribute_map.values
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute type mapping.
|
|
69
|
+
def self.openapi_types
|
|
70
|
+
{
|
|
71
|
+
:'account_id' => :'String',
|
|
72
|
+
:'reaction_type' => :'String',
|
|
73
|
+
:'cid' => :'String'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# List of attributes with nullable: true
|
|
78
|
+
def self.openapi_nullable
|
|
79
|
+
Set.new([
|
|
80
|
+
])
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Initializes the object
|
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
85
|
+
def initialize(attributes = {})
|
|
86
|
+
if (!attributes.is_a?(Hash))
|
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::LikePostRequest` initialize method"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
93
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::LikePostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
95
|
+
end
|
|
96
|
+
h[k.to_sym] = v
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'account_id')
|
|
100
|
+
self.account_id = attributes[:'account_id']
|
|
101
|
+
else
|
|
102
|
+
self.account_id = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'reaction_type')
|
|
106
|
+
self.reaction_type = attributes[:'reaction_type']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'cid')
|
|
110
|
+
self.cid = attributes[:'cid']
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
115
|
+
# @return Array for valid properties with the reasons
|
|
116
|
+
def list_invalid_properties
|
|
117
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
118
|
+
invalid_properties = Array.new
|
|
119
|
+
if @account_id.nil?
|
|
120
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
invalid_properties
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Check to see if the all the properties in the model are valid
|
|
127
|
+
# @return true if the model is valid
|
|
128
|
+
def valid?
|
|
129
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
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)
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method with validation
|
|
137
|
+
# @param [Object] account_id Value to be assigned
|
|
138
|
+
def account_id=(account_id)
|
|
139
|
+
if account_id.nil?
|
|
140
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
@account_id = account_id
|
|
144
|
+
end
|
|
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
|
+
|
|
156
|
+
# Checks equality by comparing each attribute.
|
|
157
|
+
# @param [Object] Object to be compared
|
|
158
|
+
def ==(o)
|
|
159
|
+
return true if self.equal?(o)
|
|
160
|
+
self.class == o.class &&
|
|
161
|
+
account_id == o.account_id &&
|
|
162
|
+
reaction_type == o.reaction_type &&
|
|
163
|
+
cid == o.cid
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @see the `==` method
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def eql?(o)
|
|
169
|
+
self == o
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Calculates hash code according to all attributes.
|
|
173
|
+
# @return [Integer] Hash code
|
|
174
|
+
def hash
|
|
175
|
+
[account_id, reaction_type, cid].hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def self.build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
184
|
+
transformed_hash = {}
|
|
185
|
+
openapi_types.each_pair do |key, type|
|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = nil
|
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
new(transformed_hash)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the object in the form of hash
|
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
|
203
|
+
def to_hash
|
|
204
|
+
hash = {}
|
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class UnlikePost200Response < ApiModelBase
|
|
18
|
+
attr_accessor :status
|
|
19
|
+
|
|
20
|
+
# The resolved native post ID
|
|
21
|
+
attr_accessor :post_id
|
|
22
|
+
|
|
23
|
+
attr_accessor :platform
|
|
24
|
+
|
|
25
|
+
attr_accessor :liked
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'status' => :'status',
|
|
31
|
+
:'post_id' => :'postId',
|
|
32
|
+
:'platform' => :'platform',
|
|
33
|
+
:'liked' => :'liked'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'status' => :'String',
|
|
51
|
+
:'post_id' => :'String',
|
|
52
|
+
:'platform' => :'String',
|
|
53
|
+
:'liked' => :'Boolean'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UnlikePost200Response` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UnlikePost200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'status')
|
|
80
|
+
self.status = attributes[:'status']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'post_id')
|
|
84
|
+
self.post_id = attributes[:'post_id']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'platform')
|
|
88
|
+
self.platform = attributes[:'platform']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'liked')
|
|
92
|
+
self.liked = attributes[:'liked']
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
97
|
+
# @return Array for valid properties with the reasons
|
|
98
|
+
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
invalid_properties
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Check to see if the all the properties in the model are valid
|
|
105
|
+
# @return true if the model is valid
|
|
106
|
+
def valid?
|
|
107
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Checks equality by comparing each attribute.
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def ==(o)
|
|
114
|
+
return true if self.equal?(o)
|
|
115
|
+
self.class == o.class &&
|
|
116
|
+
status == o.status &&
|
|
117
|
+
post_id == o.post_id &&
|
|
118
|
+
platform == o.platform &&
|
|
119
|
+
liked == o.liked
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see the `==` method
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def eql?(o)
|
|
125
|
+
self == o
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Calculates hash code according to all attributes.
|
|
129
|
+
# @return [Integer] Hash code
|
|
130
|
+
def hash
|
|
131
|
+
[status, post_id, platform, liked].hash
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Builds the object from hash
|
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
136
|
+
# @return [Object] Returns the model itself
|
|
137
|
+
def self.build_from_hash(attributes)
|
|
138
|
+
return nil unless attributes.is_a?(Hash)
|
|
139
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
140
|
+
transformed_hash = {}
|
|
141
|
+
openapi_types.each_pair do |key, type|
|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
143
|
+
transformed_hash["#{key}"] = nil
|
|
144
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
145
|
+
# check to ensure the input is an array given that the attribute
|
|
146
|
+
# is documented as an array but the input is not
|
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
149
|
+
end
|
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
new(transformed_hash)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Returns the object in the form of hash
|
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
|
159
|
+
def to_hash
|
|
160
|
+
hash = {}
|
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
162
|
+
value = self.send(attr)
|
|
163
|
+
if value.nil?
|
|
164
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
165
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
hash[param] = _to_hash(value)
|
|
169
|
+
end
|
|
170
|
+
hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -792,6 +792,8 @@ require 'zernio-sdk/models/instagram_platform_data_trial_params'
|
|
|
792
792
|
require 'zernio-sdk/models/instagram_platform_data_user_tags_inner'
|
|
793
793
|
require 'zernio-sdk/models/like_inbox_comment200_response'
|
|
794
794
|
require 'zernio-sdk/models/like_inbox_comment_request'
|
|
795
|
+
require 'zernio-sdk/models/like_post200_response'
|
|
796
|
+
require 'zernio-sdk/models/like_post_request'
|
|
795
797
|
require 'zernio-sdk/models/linked_in_ads_platform_data'
|
|
796
798
|
require 'zernio-sdk/models/linked_in_ads_platform_data_carousel'
|
|
797
799
|
require 'zernio-sdk/models/linked_in_ads_platform_data_carousel_cards_inner'
|
|
@@ -1304,6 +1306,7 @@ require 'zernio-sdk/models/unblock_whats_app_users_request'
|
|
|
1304
1306
|
require 'zernio-sdk/models/undo_retweet200_response'
|
|
1305
1307
|
require 'zernio-sdk/models/unfollow_user200_response'
|
|
1306
1308
|
require 'zernio-sdk/models/unlike_inbox_comment200_response'
|
|
1309
|
+
require 'zernio-sdk/models/unlike_post200_response'
|
|
1307
1310
|
require 'zernio-sdk/models/unpin_discord_message200_response'
|
|
1308
1311
|
require 'zernio-sdk/models/unpublish_post200_response'
|
|
1309
1312
|
require 'zernio-sdk/models/unpublish_post_request'
|