aylien_news_api 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/aylien_news_api.gemspec +1 -2
- data/docs/Category.md +3 -1
- data/docs/CategoryTaxonomy.md +16 -0
- data/docs/DefaultApi.md +105 -51
- data/docs/Histograms.md +5 -1
- data/docs/Media.md +2 -2
- data/docs/MediaFormat.md +16 -0
- data/docs/MediaType.md +16 -0
- data/docs/Scope.md +1 -1
- data/docs/ScopeLevel.md +16 -0
- data/docs/Sentiment.md +1 -1
- data/docs/SentimentPolarity.md +16 -0
- data/docs/Stories.md +5 -1
- data/docs/StoryLinks.md +3 -3
- data/docs/StoryTranslation.md +19 -0
- data/docs/StoryTranslations.md +1 -1
- data/docs/Trends.md +5 -1
- data/lib/aylien_news_api.rb +7 -3
- data/lib/aylien_news_api/api/default_api.rb +265 -159
- data/lib/aylien_news_api/api_client.rb +8 -6
- data/lib/aylien_news_api/api_error.rb +1 -1
- data/lib/aylien_news_api/configuration.rb +2 -2
- data/lib/aylien_news_api/models/author.rb +12 -2
- data/lib/aylien_news_api/models/autocomplete.rb +12 -2
- data/lib/aylien_news_api/models/autocompletes.rb +12 -2
- data/lib/aylien_news_api/models/category.rb +24 -39
- data/lib/aylien_news_api/models/category_links.rb +12 -2
- data/lib/aylien_news_api/models/category_taxonomy.rb +36 -0
- data/lib/aylien_news_api/models/cluster.rb +12 -2
- data/lib/aylien_news_api/models/clusters.rb +12 -2
- data/lib/aylien_news_api/models/coverages.rb +12 -2
- data/lib/aylien_news_api/models/entities.rb +12 -2
- data/lib/aylien_news_api/models/entity.rb +12 -2
- data/lib/aylien_news_api/models/entity_links.rb +12 -2
- data/lib/aylien_news_api/models/error.rb +12 -2
- data/lib/aylien_news_api/models/error_links.rb +12 -2
- data/lib/aylien_news_api/models/errors.rb +12 -2
- data/lib/aylien_news_api/models/histogram_interval.rb +12 -2
- data/lib/aylien_news_api/models/histograms.rb +36 -6
- data/lib/aylien_news_api/models/location.rb +12 -2
- data/lib/aylien_news_api/models/media.rb +14 -52
- data/lib/aylien_news_api/models/media_format.rb +44 -0
- data/lib/aylien_news_api/models/media_type.rb +36 -0
- data/lib/aylien_news_api/models/rank.rb +12 -2
- data/lib/aylien_news_api/models/rankings.rb +12 -2
- data/lib/aylien_news_api/models/related_stories.rb +12 -2
- data/lib/aylien_news_api/models/representative_story.rb +12 -2
- data/lib/aylien_news_api/models/scope.rb +13 -38
- data/lib/aylien_news_api/models/scope_level.rb +37 -0
- data/lib/aylien_news_api/models/sentiment.rb +13 -38
- data/lib/aylien_news_api/models/sentiment_polarity.rb +37 -0
- data/lib/aylien_news_api/models/sentiments.rb +12 -2
- data/lib/aylien_news_api/models/share_count.rb +12 -2
- data/lib/aylien_news_api/models/share_counts.rb +12 -2
- data/lib/aylien_news_api/models/source.rb +12 -2
- data/lib/aylien_news_api/models/stories.rb +36 -6
- data/lib/aylien_news_api/models/story.rb +12 -2
- data/lib/aylien_news_api/models/story_cluster.rb +12 -2
- data/lib/aylien_news_api/models/story_links.rb +26 -16
- data/lib/aylien_news_api/models/story_translation.rb +217 -0
- data/lib/aylien_news_api/models/story_translations.rb +13 -3
- data/lib/aylien_news_api/models/story_translations_en.rb +12 -2
- data/lib/aylien_news_api/models/summary.rb +12 -2
- data/lib/aylien_news_api/models/time_series.rb +12 -2
- data/lib/aylien_news_api/models/time_series_list.rb +12 -2
- data/lib/aylien_news_api/models/trend.rb +12 -2
- data/lib/aylien_news_api/models/trends.rb +36 -6
- data/lib/aylien_news_api/version.rb +2 -2
- data/spec/api/default_api_spec.rb +54 -28
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/author_spec.rb +2 -2
- data/spec/models/autocomplete_spec.rb +2 -2
- data/spec/models/autocompletes_spec.rb +2 -2
- data/spec/models/category_links_spec.rb +2 -2
- data/spec/models/category_spec.rb +8 -6
- data/spec/models/category_taxonomy_spec.rb +35 -0
- data/spec/models/cluster_spec.rb +2 -2
- data/spec/models/clusters_spec.rb +2 -2
- data/spec/models/coverages_spec.rb +2 -2
- data/spec/models/entities_spec.rb +2 -2
- data/spec/models/entity_links_spec.rb +2 -2
- data/spec/models/entity_spec.rb +2 -2
- data/spec/models/error_links_spec.rb +2 -2
- data/spec/models/error_spec.rb +2 -2
- data/spec/models/errors_spec.rb +2 -2
- data/spec/models/histogram_interval_spec.rb +2 -2
- data/spec/models/histograms_spec.rb +14 -2
- data/spec/models/location_spec.rb +2 -2
- data/spec/models/media_format_spec.rb +35 -0
- data/spec/models/media_spec.rb +2 -10
- data/spec/models/media_type_spec.rb +35 -0
- data/spec/models/rank_spec.rb +2 -2
- data/spec/models/rankings_spec.rb +2 -2
- data/spec/models/related_stories_spec.rb +2 -2
- data/spec/models/representative_story_spec.rb +2 -2
- data/spec/models/scope_level_spec.rb +35 -0
- data/spec/models/scope_spec.rb +2 -6
- data/spec/models/sentiment_polarity_spec.rb +35 -0
- data/spec/models/sentiment_spec.rb +2 -6
- data/spec/models/sentiments_spec.rb +2 -2
- data/spec/models/share_count_spec.rb +2 -2
- data/spec/models/share_counts_spec.rb +2 -2
- data/spec/models/source_spec.rb +2 -2
- data/spec/models/stories_spec.rb +14 -2
- data/spec/models/story_cluster_spec.rb +2 -2
- data/spec/models/story_links_spec.rb +5 -5
- data/spec/models/story_spec.rb +2 -2
- data/spec/models/story_translation_spec.rb +47 -0
- data/spec/models/story_translations_en_spec.rb +2 -2
- data/spec/models/story_translations_spec.rb +2 -2
- data/spec/models/summary_spec.rb +2 -2
- data/spec/models/time_series_list_spec.rb +2 -2
- data/spec/models/time_series_spec.rb +2 -2
- data/spec/models/trend_spec.rb +2 -2
- data/spec/models/trends_spec.rb +14 -2
- data/spec/spec_helper.rb +2 -2
- metadata +27 -23
@@ -0,0 +1,217 @@
|
|
1
|
+
=begin
|
2
|
+
#AYLIEN News API
|
3
|
+
|
4
|
+
#The AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content. It is accessed by sending HTTP requests to our server, which returns information to your client.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 3.0
|
7
|
+
Contact: support@aylien.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module AylienNewsApi
|
16
|
+
class StoryTranslation
|
17
|
+
# Translation of body
|
18
|
+
attr_accessor :body
|
19
|
+
|
20
|
+
# Translation of title
|
21
|
+
attr_accessor :title
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'body' => :'body',
|
27
|
+
:'title' => :'title'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'body' => :'String',
|
35
|
+
:'title' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AylienNewsApi::StoryTranslation` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AylienNewsApi::StoryTranslation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'body')
|
61
|
+
self.body = attributes[:'body']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.key?(:'title')
|
65
|
+
self.title = attributes[:'title']
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properties with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
invalid_properties = Array.new
|
73
|
+
invalid_properties
|
74
|
+
end
|
75
|
+
|
76
|
+
# Check to see if the all the properties in the model are valid
|
77
|
+
# @return true if the model is valid
|
78
|
+
def valid?
|
79
|
+
true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param [Object] Object to be compared
|
84
|
+
def ==(o)
|
85
|
+
return true if self.equal?(o)
|
86
|
+
self.class == o.class &&
|
87
|
+
body == o.body &&
|
88
|
+
title == o.title
|
89
|
+
end
|
90
|
+
|
91
|
+
# @see the `==` method
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def eql?(o)
|
94
|
+
self == o
|
95
|
+
end
|
96
|
+
|
97
|
+
# Calculates hash code according to all attributes.
|
98
|
+
# @return [Integer] Hash code
|
99
|
+
def hash
|
100
|
+
[body, title].hash
|
101
|
+
end
|
102
|
+
|
103
|
+
# Builds the object from hash
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
+
# @return [Object] Returns the model itself
|
106
|
+
def self.build_from_hash(attributes)
|
107
|
+
new.build_from_hash(attributes)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.openapi_types.each_pair do |key, type|
|
116
|
+
if type =~ /\AArray<(.*)>/i
|
117
|
+
# check to ensure the input is an array given that the attribute
|
118
|
+
# is documented as an array but the input is not
|
119
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
120
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
121
|
+
end
|
122
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
125
|
+
end
|
126
|
+
|
127
|
+
self
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deserializes the data based on type
|
131
|
+
# @param string type Data type
|
132
|
+
# @param string value Value to be deserialized
|
133
|
+
# @return [Object] Deserialized data
|
134
|
+
def _deserialize(type, value)
|
135
|
+
case type.to_sym
|
136
|
+
when :DateTime
|
137
|
+
DateTime.parse(value)
|
138
|
+
when :Date
|
139
|
+
Date.parse(value)
|
140
|
+
when :String
|
141
|
+
value.to_s
|
142
|
+
when :Integer
|
143
|
+
value.to_i
|
144
|
+
when :Float
|
145
|
+
value.to_f
|
146
|
+
when :Boolean
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
148
|
+
true
|
149
|
+
else
|
150
|
+
false
|
151
|
+
end
|
152
|
+
when :Object
|
153
|
+
# generic object (usually a Hash), return directly
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else # model
|
167
|
+
AylienNewsApi.const_get(type).build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -27,10 +27,16 @@ module AylienNewsApi
|
|
27
27
|
# Attribute type mapping.
|
28
28
|
def self.openapi_types
|
29
29
|
{
|
30
|
-
:'en' => :'
|
30
|
+
:'en' => :'StoryTranslation'
|
31
31
|
}
|
32
32
|
end
|
33
33
|
|
34
|
+
# List of attributes with nullable: true
|
35
|
+
def self.openapi_nullable
|
36
|
+
Set.new([
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
34
40
|
# Initializes the object
|
35
41
|
# @param [Hash] attributes Model attributes in the form of hash
|
36
42
|
def initialize(attributes = {})
|
@@ -170,7 +176,11 @@ module AylienNewsApi
|
|
170
176
|
hash = {}
|
171
177
|
self.class.attribute_map.each_pair do |attr, param|
|
172
178
|
value = self.send(attr)
|
173
|
-
|
179
|
+
if value.nil?
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
182
|
+
end
|
183
|
+
|
174
184
|
hash[param] = _to_hash(value)
|
175
185
|
end
|
176
186
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.1
|
9
|
+
OpenAPI Generator version: 4.2.1-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -41,6 +41,12 @@ module AylienNewsApi
|
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
44
|
+
# List of attributes with nullable: true
|
45
|
+
def self.openapi_nullable
|
46
|
+
Set.new([
|
47
|
+
])
|
48
|
+
end
|
49
|
+
|
44
50
|
# Initializes the object
|
45
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
46
52
|
def initialize(attributes = {})
|
@@ -190,7 +196,11 @@ module AylienNewsApi
|
|
190
196
|
hash = {}
|
191
197
|
self.class.attribute_map.each_pair do |attr, param|
|
192
198
|
value = self.send(attr)
|
193
|
-
|
199
|
+
if value.nil?
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
202
|
+
end
|
203
|
+
|
194
204
|
hash[param] = _to_hash(value)
|
195
205
|
end
|
196
206
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -31,6 +31,12 @@ module AylienNewsApi
|
|
31
31
|
}
|
32
32
|
end
|
33
33
|
|
34
|
+
# List of attributes with nullable: true
|
35
|
+
def self.openapi_nullable
|
36
|
+
Set.new([
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
34
40
|
# Initializes the object
|
35
41
|
# @param [Hash] attributes Model attributes in the form of hash
|
36
42
|
def initialize(attributes = {})
|
@@ -172,7 +178,11 @@ module AylienNewsApi
|
|
172
178
|
hash = {}
|
173
179
|
self.class.attribute_map.each_pair do |attr, param|
|
174
180
|
value = self.send(attr)
|
175
|
-
|
181
|
+
if value.nil?
|
182
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
183
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
184
|
+
end
|
185
|
+
|
176
186
|
hash[param] = _to_hash(value)
|
177
187
|
end
|
178
188
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -36,6 +36,12 @@ module AylienNewsApi
|
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
39
45
|
# Initializes the object
|
40
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
41
47
|
def initialize(attributes = {})
|
@@ -180,7 +186,11 @@ module AylienNewsApi
|
|
180
186
|
hash = {}
|
181
187
|
self.class.attribute_map.each_pair do |attr, param|
|
182
188
|
value = self.send(attr)
|
183
|
-
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
184
194
|
hash[param] = _to_hash(value)
|
185
195
|
end
|
186
196
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -46,6 +46,12 @@ module AylienNewsApi
|
|
46
46
|
}
|
47
47
|
end
|
48
48
|
|
49
|
+
# List of attributes with nullable: true
|
50
|
+
def self.openapi_nullable
|
51
|
+
Set.new([
|
52
|
+
])
|
53
|
+
end
|
54
|
+
|
49
55
|
# Initializes the object
|
50
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
51
57
|
def initialize(attributes = {})
|
@@ -202,7 +208,11 @@ module AylienNewsApi
|
|
202
208
|
hash = {}
|
203
209
|
self.class.attribute_map.each_pair do |attr, param|
|
204
210
|
value = self.send(attr)
|
205
|
-
|
211
|
+
if value.nil?
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
214
|
+
end
|
215
|
+
|
206
216
|
hash[param] = _to_hash(value)
|
207
217
|
end
|
208
218
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -36,6 +36,12 @@ module AylienNewsApi
|
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
39
45
|
# Initializes the object
|
40
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
41
47
|
def initialize(attributes = {})
|
@@ -180,7 +186,11 @@ module AylienNewsApi
|
|
180
186
|
hash = {}
|
181
187
|
self.class.attribute_map.each_pair do |attr, param|
|
182
188
|
value = self.send(attr)
|
183
|
-
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
184
194
|
hash[param] = _to_hash(value)
|
185
195
|
end
|
186
196
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -20,11 +20,19 @@ module AylienNewsApi
|
|
20
20
|
# An array of trends
|
21
21
|
attr_accessor :trends
|
22
22
|
|
23
|
+
# The end of a period in which searched stories were published
|
24
|
+
attr_accessor :published_at_end
|
25
|
+
|
26
|
+
# The start of a period in which searched stories were published
|
27
|
+
attr_accessor :published_at_start
|
28
|
+
|
23
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
30
|
def self.attribute_map
|
25
31
|
{
|
26
32
|
:'field' => :'field',
|
27
|
-
:'trends' => :'trends'
|
33
|
+
:'trends' => :'trends',
|
34
|
+
:'published_at_end' => :'published_at.end',
|
35
|
+
:'published_at_start' => :'published_at.start'
|
28
36
|
}
|
29
37
|
end
|
30
38
|
|
@@ -32,10 +40,18 @@ module AylienNewsApi
|
|
32
40
|
def self.openapi_types
|
33
41
|
{
|
34
42
|
:'field' => :'String',
|
35
|
-
:'trends' => :'Array<Trend>'
|
43
|
+
:'trends' => :'Array<Trend>',
|
44
|
+
:'published_at_end' => :'DateTime',
|
45
|
+
:'published_at_start' => :'DateTime'
|
36
46
|
}
|
37
47
|
end
|
38
48
|
|
49
|
+
# List of attributes with nullable: true
|
50
|
+
def self.openapi_nullable
|
51
|
+
Set.new([
|
52
|
+
])
|
53
|
+
end
|
54
|
+
|
39
55
|
# Initializes the object
|
40
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
41
57
|
def initialize(attributes = {})
|
@@ -60,6 +76,14 @@ module AylienNewsApi
|
|
60
76
|
self.trends = value
|
61
77
|
end
|
62
78
|
end
|
79
|
+
|
80
|
+
if attributes.key?(:'published_at_end')
|
81
|
+
self.published_at_end = attributes[:'published_at_end']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'published_at_start')
|
85
|
+
self.published_at_start = attributes[:'published_at_start']
|
86
|
+
end
|
63
87
|
end
|
64
88
|
|
65
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -81,7 +105,9 @@ module AylienNewsApi
|
|
81
105
|
return true if self.equal?(o)
|
82
106
|
self.class == o.class &&
|
83
107
|
field == o.field &&
|
84
|
-
trends == o.trends
|
108
|
+
trends == o.trends &&
|
109
|
+
published_at_end == o.published_at_end &&
|
110
|
+
published_at_start == o.published_at_start
|
85
111
|
end
|
86
112
|
|
87
113
|
# @see the `==` method
|
@@ -93,7 +119,7 @@ module AylienNewsApi
|
|
93
119
|
# Calculates hash code according to all attributes.
|
94
120
|
# @return [Integer] Hash code
|
95
121
|
def hash
|
96
|
-
[field, trends].hash
|
122
|
+
[field, trends, published_at_end, published_at_start].hash
|
97
123
|
end
|
98
124
|
|
99
125
|
# Builds the object from hash
|
@@ -182,7 +208,11 @@ module AylienNewsApi
|
|
182
208
|
hash = {}
|
183
209
|
self.class.attribute_map.each_pair do |attr, param|
|
184
210
|
value = self.send(attr)
|
185
|
-
|
211
|
+
if value.nil?
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
214
|
+
end
|
215
|
+
|
186
216
|
hash[param] = _to_hash(value)
|
187
217
|
end
|
188
218
|
hash
|