late-sdk 0.0.600 → 0.0.602
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/AccountsApi.md +141 -0
- data/docs/AnalyticsApi.md +1 -1
- data/docs/GetSlackSettings200Response.md +18 -0
- data/docs/GetSlackSettings200ResponseAccount.md +36 -0
- data/docs/UpdateSlackSettingsRequest.md +20 -0
- data/lib/zernio-sdk/api/accounts_api.rb +137 -0
- data/lib/zernio-sdk/api/analytics_api.rb +2 -2
- data/lib/zernio-sdk/models/get_slack_settings200_response.rb +147 -0
- data/lib/zernio-sdk/models/get_slack_settings200_response_account.rb +237 -0
- data/lib/zernio-sdk/models/update_slack_settings_request.rb +177 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +64 -1
- data/spec/api/accounts_api_spec.rb +25 -0
- data/spec/api/analytics_api_spec.rb +1 -1
- data/spec/models/get_slack_settings200_response_account_spec.rb +90 -0
- data/spec/models/get_slack_settings200_response_spec.rb +36 -0
- data/spec/models/update_slack_settings_request_spec.rb +42 -0
- data/zernio-sdk-0.0.602.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.600.gem +0 -0
|
@@ -0,0 +1,237 @@
|
|
|
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 GetSlackSettings200ResponseAccount < ApiModelBase
|
|
18
|
+
attr_accessor :_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :platform
|
|
21
|
+
|
|
22
|
+
attr_accessor :display_name
|
|
23
|
+
|
|
24
|
+
attr_accessor :channel_id
|
|
25
|
+
|
|
26
|
+
attr_accessor :channel_name
|
|
27
|
+
|
|
28
|
+
# public or private
|
|
29
|
+
attr_accessor :channel_type
|
|
30
|
+
|
|
31
|
+
attr_accessor :team_id
|
|
32
|
+
|
|
33
|
+
attr_accessor :team_name
|
|
34
|
+
|
|
35
|
+
attr_accessor :default_username
|
|
36
|
+
|
|
37
|
+
attr_accessor :default_icon_url
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'_id' => :'_id',
|
|
43
|
+
:'platform' => :'platform',
|
|
44
|
+
:'display_name' => :'displayName',
|
|
45
|
+
:'channel_id' => :'channelId',
|
|
46
|
+
:'channel_name' => :'channelName',
|
|
47
|
+
:'channel_type' => :'channelType',
|
|
48
|
+
:'team_id' => :'teamId',
|
|
49
|
+
:'team_name' => :'teamName',
|
|
50
|
+
:'default_username' => :'defaultUsername',
|
|
51
|
+
:'default_icon_url' => :'defaultIconUrl'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'_id' => :'String',
|
|
69
|
+
:'platform' => :'String',
|
|
70
|
+
:'display_name' => :'String',
|
|
71
|
+
:'channel_id' => :'String',
|
|
72
|
+
:'channel_name' => :'String',
|
|
73
|
+
:'channel_type' => :'String',
|
|
74
|
+
:'team_id' => :'String',
|
|
75
|
+
:'team_name' => :'String',
|
|
76
|
+
:'default_username' => :'String',
|
|
77
|
+
:'default_icon_url' => :'String'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# List of attributes with nullable: true
|
|
82
|
+
def self.openapi_nullable
|
|
83
|
+
Set.new([
|
|
84
|
+
:'display_name',
|
|
85
|
+
:'channel_id',
|
|
86
|
+
:'channel_name',
|
|
87
|
+
:'channel_type',
|
|
88
|
+
:'team_id',
|
|
89
|
+
:'team_name',
|
|
90
|
+
:'default_username',
|
|
91
|
+
:'default_icon_url'
|
|
92
|
+
])
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Initializes the object
|
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
97
|
+
def initialize(attributes = {})
|
|
98
|
+
if (!attributes.is_a?(Hash))
|
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetSlackSettings200ResponseAccount` initialize method"
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
103
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
105
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
106
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetSlackSettings200ResponseAccount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
107
|
+
end
|
|
108
|
+
h[k.to_sym] = v
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'_id')
|
|
112
|
+
self._id = attributes[:'_id']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'platform')
|
|
116
|
+
self.platform = attributes[:'platform']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'display_name')
|
|
120
|
+
self.display_name = attributes[:'display_name']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'channel_id')
|
|
124
|
+
self.channel_id = attributes[:'channel_id']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'channel_name')
|
|
128
|
+
self.channel_name = attributes[:'channel_name']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'channel_type')
|
|
132
|
+
self.channel_type = attributes[:'channel_type']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'team_id')
|
|
136
|
+
self.team_id = attributes[:'team_id']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'team_name')
|
|
140
|
+
self.team_name = attributes[:'team_name']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'default_username')
|
|
144
|
+
self.default_username = attributes[:'default_username']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'default_icon_url')
|
|
148
|
+
self.default_icon_url = attributes[:'default_icon_url']
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
153
|
+
# @return Array for valid properties with the reasons
|
|
154
|
+
def list_invalid_properties
|
|
155
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
156
|
+
invalid_properties = Array.new
|
|
157
|
+
invalid_properties
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Check to see if the all the properties in the model are valid
|
|
161
|
+
# @return true if the model is valid
|
|
162
|
+
def valid?
|
|
163
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
164
|
+
true
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Checks equality by comparing each attribute.
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def ==(o)
|
|
170
|
+
return true if self.equal?(o)
|
|
171
|
+
self.class == o.class &&
|
|
172
|
+
_id == o._id &&
|
|
173
|
+
platform == o.platform &&
|
|
174
|
+
display_name == o.display_name &&
|
|
175
|
+
channel_id == o.channel_id &&
|
|
176
|
+
channel_name == o.channel_name &&
|
|
177
|
+
channel_type == o.channel_type &&
|
|
178
|
+
team_id == o.team_id &&
|
|
179
|
+
team_name == o.team_name &&
|
|
180
|
+
default_username == o.default_username &&
|
|
181
|
+
default_icon_url == o.default_icon_url
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# @see the `==` method
|
|
185
|
+
# @param [Object] Object to be compared
|
|
186
|
+
def eql?(o)
|
|
187
|
+
self == o
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Calculates hash code according to all attributes.
|
|
191
|
+
# @return [Integer] Hash code
|
|
192
|
+
def hash
|
|
193
|
+
[_id, platform, display_name, channel_id, channel_name, channel_type, team_id, team_name, default_username, default_icon_url].hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Builds the object from hash
|
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
198
|
+
# @return [Object] Returns the model itself
|
|
199
|
+
def self.build_from_hash(attributes)
|
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
|
201
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
202
|
+
transformed_hash = {}
|
|
203
|
+
openapi_types.each_pair do |key, type|
|
|
204
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = nil
|
|
206
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
207
|
+
# check to ensure the input is an array given that the attribute
|
|
208
|
+
# is documented as an array but the input is not
|
|
209
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
210
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
211
|
+
end
|
|
212
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
new(transformed_hash)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Returns the object in the form of hash
|
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
|
221
|
+
def to_hash
|
|
222
|
+
hash = {}
|
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
224
|
+
value = self.send(attr)
|
|
225
|
+
if value.nil?
|
|
226
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
227
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
hash[param] = _to_hash(value)
|
|
231
|
+
end
|
|
232
|
+
hash
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
@@ -0,0 +1,177 @@
|
|
|
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 UpdateSlackSettingsRequest < ApiModelBase
|
|
18
|
+
# Author name shown on posts. Empty string clears it.
|
|
19
|
+
attr_accessor :default_username
|
|
20
|
+
|
|
21
|
+
# Author avatar image URL. Empty string clears it.
|
|
22
|
+
attr_accessor :default_icon_url
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'default_username' => :'defaultUsername',
|
|
28
|
+
:'default_icon_url' => :'defaultIconUrl'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'default_username' => :'String',
|
|
46
|
+
:'default_icon_url' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateSlackSettingsRequest` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateSlackSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'default_username')
|
|
73
|
+
self.default_username = attributes[:'default_username']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'default_icon_url')
|
|
77
|
+
self.default_icon_url = attributes[:'default_icon_url']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
if !@default_username.nil? && @default_username.to_s.length > 80
|
|
87
|
+
invalid_properties.push('invalid value for "default_username", the character length must be smaller than or equal to 80.')
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
invalid_properties
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Check to see if the all the properties in the model are valid
|
|
94
|
+
# @return true if the model is valid
|
|
95
|
+
def valid?
|
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
97
|
+
return false if !@default_username.nil? && @default_username.to_s.length > 80
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Custom attribute writer method with validation
|
|
102
|
+
# @param [Object] default_username Value to be assigned
|
|
103
|
+
def default_username=(default_username)
|
|
104
|
+
if default_username.nil?
|
|
105
|
+
fail ArgumentError, 'default_username cannot be nil'
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if default_username.to_s.length > 80
|
|
109
|
+
fail ArgumentError, 'invalid value for "default_username", the character length must be smaller than or equal to 80.'
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
@default_username = default_username
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
default_username == o.default_username &&
|
|
121
|
+
default_icon_url == o.default_icon_url
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# @see the `==` method
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def eql?(o)
|
|
127
|
+
self == o
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Calculates hash code according to all attributes.
|
|
131
|
+
# @return [Integer] Hash code
|
|
132
|
+
def hash
|
|
133
|
+
[default_username, default_icon_url].hash
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Builds the object from hash
|
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
|
+
# @return [Object] Returns the model itself
|
|
139
|
+
def self.build_from_hash(attributes)
|
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
|
141
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
142
|
+
transformed_hash = {}
|
|
143
|
+
openapi_types.each_pair do |key, type|
|
|
144
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
145
|
+
transformed_hash["#{key}"] = nil
|
|
146
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
147
|
+
# check to ensure the input is an array given that the attribute
|
|
148
|
+
# is documented as an array but the input is not
|
|
149
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
150
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
151
|
+
end
|
|
152
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
153
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
new(transformed_hash)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Returns the object in the form of hash
|
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
|
161
|
+
def to_hash
|
|
162
|
+
hash = {}
|
|
163
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
164
|
+
value = self.send(attr)
|
|
165
|
+
if value.nil?
|
|
166
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
167
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
hash[param] = _to_hash(value)
|
|
171
|
+
end
|
|
172
|
+
hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -644,6 +644,8 @@ require 'zernio-sdk/models/get_sequence200_response'
|
|
|
644
644
|
require 'zernio-sdk/models/get_sequence200_response_sequence'
|
|
645
645
|
require 'zernio-sdk/models/get_sequence200_response_sequence_steps_inner'
|
|
646
646
|
require 'zernio-sdk/models/get_sequence200_response_sequence_steps_inner_template'
|
|
647
|
+
require 'zernio-sdk/models/get_slack_settings200_response'
|
|
648
|
+
require 'zernio-sdk/models/get_slack_settings200_response_account'
|
|
647
649
|
require 'zernio-sdk/models/get_sms_registration200_response'
|
|
648
650
|
require 'zernio-sdk/models/get_sms_registration200_response_campaign_content'
|
|
649
651
|
require 'zernio-sdk/models/get_sms_usage200_response'
|
|
@@ -1360,6 +1362,7 @@ require 'zernio-sdk/models/update_sequence200_response_sequence'
|
|
|
1360
1362
|
require 'zernio-sdk/models/update_sequence_request'
|
|
1361
1363
|
require 'zernio-sdk/models/update_sequence_request_steps_inner'
|
|
1362
1364
|
require 'zernio-sdk/models/update_sequence_request_steps_inner_template'
|
|
1365
|
+
require 'zernio-sdk/models/update_slack_settings_request'
|
|
1363
1366
|
require 'zernio-sdk/models/update_tracking_tag_request'
|
|
1364
1367
|
require 'zernio-sdk/models/update_webhook_settings200_response'
|
|
1365
1368
|
require 'zernio-sdk/models/update_webhook_settings_request'
|
data/openapi.yaml
CHANGED
|
@@ -12559,7 +12559,9 @@ paths:
|
|
|
12559
12559
|
- Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post.
|
|
12560
12560
|
- Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped.
|
|
12561
12561
|
|
|
12562
|
-
`accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts
|
|
12562
|
+
`accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts).
|
|
12563
|
+
|
|
12564
|
+
LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles).
|
|
12563
12565
|
|
|
12564
12566
|
`url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, and `vm.tiktok.com` short links). Pass `postId` (the platform media/video id) as an alternative locator.
|
|
12565
12567
|
|
|
@@ -19874,6 +19876,67 @@ paths:
|
|
|
19874
19876
|
'404': { description: Account not found }
|
|
19875
19877
|
'502': { description: "Reddit was unreachable or returned an unclassified error. Reddit 4xx statuses (e.g. subreddit does not allow user flair selection) are forwarded as-is." }
|
|
19876
19878
|
|
|
19879
|
+
/v1/accounts/{accountId}/slack-settings:
|
|
19880
|
+
get:
|
|
19881
|
+
operationId: getSlackSettings
|
|
19882
|
+
tags: [Accounts]
|
|
19883
|
+
summary: Get Slack account settings
|
|
19884
|
+
description: 'Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack''s APP badge). The identity applies to messages only; the app''s own Slack profile is global and cannot be changed per workspace.'
|
|
19885
|
+
parameters:
|
|
19886
|
+
- name: accountId
|
|
19887
|
+
in: path
|
|
19888
|
+
required: true
|
|
19889
|
+
schema: { type: string }
|
|
19890
|
+
responses:
|
|
19891
|
+
'200':
|
|
19892
|
+
description: Slack account settings
|
|
19893
|
+
content:
|
|
19894
|
+
application/json:
|
|
19895
|
+
schema:
|
|
19896
|
+
type: object
|
|
19897
|
+
properties:
|
|
19898
|
+
account:
|
|
19899
|
+
type: object
|
|
19900
|
+
properties:
|
|
19901
|
+
_id: { type: string }
|
|
19902
|
+
platform: { type: string, example: slack }
|
|
19903
|
+
displayName: { type: [string, "null"] }
|
|
19904
|
+
channelId: { type: [string, "null"] }
|
|
19905
|
+
channelName: { type: [string, "null"] }
|
|
19906
|
+
channelType: { type: [string, "null"], description: 'public or private' }
|
|
19907
|
+
teamId: { type: [string, "null"] }
|
|
19908
|
+
teamName: { type: [string, "null"] }
|
|
19909
|
+
defaultUsername: { type: [string, "null"] }
|
|
19910
|
+
defaultIconUrl: { type: [string, "null"] }
|
|
19911
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
19912
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
19913
|
+
'404': { description: Account not found }
|
|
19914
|
+
patch:
|
|
19915
|
+
operationId: updateSlackSettings
|
|
19916
|
+
tags: [Accounts]
|
|
19917
|
+
summary: Update Slack account settings
|
|
19918
|
+
description: 'Set or clear the default message identity for this channel. Empty string clears a field; per-post platformSpecificData.username/iconUrl still override these defaults.'
|
|
19919
|
+
parameters:
|
|
19920
|
+
- name: accountId
|
|
19921
|
+
in: path
|
|
19922
|
+
required: true
|
|
19923
|
+
schema: { type: string }
|
|
19924
|
+
requestBody:
|
|
19925
|
+
required: true
|
|
19926
|
+
content:
|
|
19927
|
+
application/json:
|
|
19928
|
+
schema:
|
|
19929
|
+
type: object
|
|
19930
|
+
properties:
|
|
19931
|
+
defaultUsername: { type: string, maxLength: 80, description: 'Author name shown on posts. Empty string clears it.' }
|
|
19932
|
+
defaultIconUrl: { type: string, description: 'Author avatar image URL. Empty string clears it.' }
|
|
19933
|
+
responses:
|
|
19934
|
+
'200':
|
|
19935
|
+
description: Updated settings
|
|
19936
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
19937
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
19938
|
+
'404': { description: Account not found }
|
|
19939
|
+
|
|
19877
19940
|
/v1/accounts/{accountId}/discord-settings:
|
|
19878
19941
|
get:
|
|
19879
19942
|
operationId: getDiscordSettings
|
|
@@ -86,6 +86,18 @@ describe 'AccountsApi' do
|
|
|
86
86
|
end
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
+
# unit tests for get_slack_settings
|
|
90
|
+
# Get Slack account settings
|
|
91
|
+
# Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack's APP badge). The identity applies to messages only; the app's own Slack profile is global and cannot be changed per workspace.
|
|
92
|
+
# @param account_id
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [GetSlackSettings200Response]
|
|
95
|
+
describe 'get_slack_settings test' do
|
|
96
|
+
it 'should work' do
|
|
97
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
89
101
|
# unit tests for get_tik_tok_creator_info
|
|
90
102
|
# Get TikTok creator info
|
|
91
103
|
# Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account. Only works with TikTok accounts.
|
|
@@ -142,4 +154,17 @@ describe 'AccountsApi' do
|
|
|
142
154
|
end
|
|
143
155
|
end
|
|
144
156
|
|
|
157
|
+
# unit tests for update_slack_settings
|
|
158
|
+
# Update Slack account settings
|
|
159
|
+
# Set or clear the default message identity for this channel. Empty string clears a field; per-post platformSpecificData.username/iconUrl still override these defaults.
|
|
160
|
+
# @param account_id
|
|
161
|
+
# @param update_slack_settings_request
|
|
162
|
+
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @return [nil]
|
|
164
|
+
describe 'update_slack_settings test' do
|
|
165
|
+
it 'should work' do
|
|
166
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
145
170
|
end
|
|
@@ -393,7 +393,7 @@ describe 'AnalyticsApi' do
|
|
|
393
393
|
|
|
394
394
|
# unit tests for sync_external_posts
|
|
395
395
|
# Sync an external post
|
|
396
|
-
# Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts
|
|
396
|
+
# Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, and `vm.tiktok.com` short links). Pass `postId` (the platform media/video id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
|
|
397
397
|
# @param sync_external_posts_request
|
|
398
398
|
# @param [Hash] opts the optional parameters
|
|
399
399
|
# @return [SyncExternalPosts200Response]
|
|
@@ -0,0 +1,90 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::GetSlackSettings200ResponseAccount
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::GetSlackSettings200ResponseAccount do
|
|
21
|
+
#let(:instance) { Zernio::GetSlackSettings200ResponseAccount.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of GetSlackSettings200ResponseAccount' do
|
|
24
|
+
it 'should create an instance of GetSlackSettings200ResponseAccount' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::GetSlackSettings200ResponseAccount)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "_id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "platform"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "display_name"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "channel_id"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "channel_name"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "channel_type"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
describe 'test attribute "team_id"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
describe 'test attribute "team_name"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
describe 'test attribute "default_username"' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
describe 'test attribute "default_icon_url"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|