aylien_news_api 0.2.0 → 4.0.0
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 +5 -5
- data/Gemfile +7 -1
- data/README.md +36 -47
- data/Rakefile +10 -0
- data/aylien_news_api.gemspec +25 -32
- data/docs/Author.md +12 -1
- data/docs/Autocomplete.md +10 -0
- data/docs/Autocompletes.md +9 -0
- data/docs/Category.md +19 -3
- data/docs/CategoryLinks.md +11 -1
- data/docs/CategoryTaxonomy.md +16 -0
- data/docs/Cluster.md +29 -0
- data/docs/Clusters.md +21 -0
- data/docs/Coverages.md +16 -4
- data/docs/DefaultApi.md +1310 -576
- data/docs/Entities.md +11 -1
- data/docs/Entity.md +16 -3
- data/docs/EntityLinks.md +9 -0
- data/docs/Error.md +16 -2
- data/docs/ErrorLinks.md +9 -0
- data/docs/Errors.md +9 -0
- data/docs/HistogramInterval.md +10 -0
- data/docs/Histograms.md +20 -3
- data/docs/Location.md +13 -2
- data/docs/Media.md +19 -1
- data/docs/MediaFormat.md +16 -0
- data/docs/MediaType.md +16 -0
- data/docs/Rank.md +21 -0
- data/docs/Rankings.md +17 -0
- data/docs/RelatedStories.md +14 -3
- data/docs/RepresentativeStory.md +23 -0
- data/docs/Scope.md +15 -3
- data/docs/ScopeLevel.md +16 -0
- data/docs/Sentiment.md +11 -1
- data/docs/SentimentPolarity.md +16 -0
- data/docs/Sentiments.md +12 -2
- data/docs/ShareCount.md +10 -0
- data/docs/ShareCounts.md +12 -0
- data/docs/Source.md +27 -3
- data/docs/Stories.md +15 -2
- data/docs/Story.md +48 -16
- data/docs/StoryCluster.md +14 -1
- data/docs/StoryLinks.md +14 -1
- data/docs/StoryTranslation.md +19 -0
- data/docs/StoryTranslations.md +17 -0
- data/docs/StoryTranslationsEn.md +21 -0
- data/docs/Summary.md +9 -0
- data/docs/TimeSeries.md +11 -1
- data/docs/TimeSeriesList.md +15 -3
- data/docs/Trend.md +11 -1
- data/docs/Trends.md +15 -1
- data/git_push.sh +58 -0
- data/lib/aylien_news_api.rb +23 -14
- data/lib/aylien_news_api/api/default_api.rb +2755 -892
- data/lib/aylien_news_api/api_client.rb +141 -102
- data/lib/aylien_news_api/api_error.rb +37 -18
- data/lib/aylien_news_api/configuration.rb +94 -43
- data/lib/aylien_news_api/models/author.rb +69 -53
- data/lib/aylien_news_api/models/autocomplete.rb +55 -39
- data/lib/aylien_news_api/models/autocompletes.rb +54 -38
- data/lib/aylien_news_api/models/category.rb +88 -97
- data/lib/aylien_news_api/models/category_links.rb +66 -50
- data/lib/aylien_news_api/models/category_taxonomy.rb +36 -0
- data/lib/aylien_news_api/models/cluster.rb +265 -0
- data/lib/aylien_news_api/models/clusters.rb +229 -0
- data/lib/aylien_news_api/models/coverages.rb +79 -75
- data/lib/aylien_news_api/models/entities.rb +67 -51
- data/lib/aylien_news_api/models/entity.rb +100 -81
- data/lib/aylien_news_api/models/entity_links.rb +54 -38
- data/lib/aylien_news_api/models/error.rb +79 -63
- data/lib/aylien_news_api/models/error_links.rb +54 -38
- data/lib/aylien_news_api/models/errors.rb +54 -38
- data/lib/aylien_news_api/models/histogram_interval.rb +55 -39
- data/lib/aylien_news_api/models/histograms.rb +99 -63
- data/lib/aylien_news_api/models/location.rb +70 -54
- data/lib/aylien_news_api/models/media.rb +97 -76
- 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 +227 -0
- data/lib/aylien_news_api/models/rankings.rb +208 -0
- data/lib/aylien_news_api/models/related_stories.rb +72 -68
- data/lib/aylien_news_api/models/representative_story.rb +237 -0
- data/lib/aylien_news_api/models/scope.rb +76 -94
- data/lib/aylien_news_api/models/scope_level.rb +37 -0
- data/lib/aylien_news_api/models/sentiment.rb +70 -84
- data/lib/aylien_news_api/models/sentiment_polarity.rb +37 -0
- data/lib/aylien_news_api/models/sentiments.rb +65 -51
- data/lib/aylien_news_api/models/share_count.rb +55 -39
- data/lib/aylien_news_api/models/share_counts.rb +57 -41
- data/lib/aylien_news_api/models/source.rb +129 -64
- data/lib/aylien_news_api/models/stories.rb +79 -55
- data/lib/aylien_news_api/models/story.rb +191 -161
- data/lib/aylien_news_api/models/story_cluster.rb +71 -55
- data/lib/aylien_news_api/models/story_links.rb +73 -47
- data/lib/aylien_news_api/models/story_translation.rb +217 -0
- data/lib/aylien_news_api/models/story_translations.rb +207 -0
- data/lib/aylien_news_api/models/story_translations_en.rb +227 -0
- data/lib/aylien_news_api/models/summary.rb +54 -38
- data/lib/aylien_news_api/models/time_series.rb +66 -50
- data/lib/aylien_news_api/models/time_series_list.rb +75 -59
- data/lib/aylien_news_api/models/trend.rb +66 -50
- data/lib/aylien_news_api/models/trends.rb +80 -44
- data/lib/aylien_news_api/version.rb +12 -14
- data/spec/api/default_api_spec.rb +620 -284
- data/spec/api_client_spec.rb +43 -161
- data/spec/configuration_spec.rb +22 -19
- data/spec/models/author_spec.rb +21 -34
- data/spec/models/autocomplete_spec.rb +17 -26
- data/spec/models/autocompletes_spec.rb +16 -21
- data/spec/models/category_links_spec.rb +19 -28
- data/spec/models/category_spec.rb +31 -50
- data/spec/models/category_taxonomy_spec.rb +35 -0
- data/spec/models/cluster_spec.rb +77 -0
- data/spec/models/clusters_spec.rb +53 -0
- data/spec/models/coverages_spec.rb +24 -45
- data/spec/models/entities_spec.rb +19 -28
- data/spec/models/entity_links_spec.rb +16 -21
- data/spec/models/entity_spec.rb +25 -46
- data/spec/models/error_links_spec.rb +16 -21
- data/spec/models/error_spec.rb +27 -52
- data/spec/models/errors_spec.rb +16 -21
- data/spec/models/histogram_interval_spec.rb +17 -26
- data/spec/models/histograms_spec.rb +36 -45
- data/spec/models/location_spec.rb +21 -34
- data/spec/models/media_format_spec.rb +35 -0
- data/spec/models/media_spec.rb +41 -26
- data/spec/models/media_type_spec.rb +35 -0
- data/spec/models/rank_spec.rb +53 -0
- data/spec/models/rankings_spec.rb +41 -0
- data/spec/models/related_stories_spec.rb +21 -38
- data/spec/models/representative_story_spec.rb +59 -0
- data/spec/models/scope_level_spec.rb +35 -0
- data/spec/models/scope_spec.rb +23 -40
- data/spec/models/sentiment_polarity_spec.rb +35 -0
- data/spec/models/sentiment_spec.rb +17 -26
- data/spec/models/sentiments_spec.rb +19 -28
- data/spec/models/share_count_spec.rb +17 -26
- data/spec/models/share_counts_spec.rb +19 -36
- data/spec/models/source_spec.rb +54 -49
- data/spec/models/stories_spec.rb +26 -33
- data/spec/models/story_cluster_spec.rb +23 -44
- data/spec/models/story_links_spec.rb +25 -32
- data/spec/models/story_spec.rb +65 -134
- data/spec/models/story_translation_spec.rb +47 -0
- data/spec/models/story_translations_en_spec.rb +53 -0
- data/spec/models/story_translations_spec.rb +41 -0
- data/spec/models/summary_spec.rb +16 -21
- data/spec/models/time_series_list_spec.rb +22 -39
- data/spec/models/time_series_spec.rb +19 -28
- data/spec/models/trend_spec.rb +19 -28
- data/spec/models/trends_spec.rb +30 -27
- data/spec/spec_helper.rb +11 -13
- metadata +95 -193
- data/Gemfile.lock +0 -65
- data/LICENSE +0 -13
data/spec/api_client_spec.rb
CHANGED
@@ -1,16 +1,14 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
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
|
14
12
|
|
15
13
|
require 'spec_helper'
|
16
14
|
|
@@ -53,197 +51,81 @@ describe AylienNewsApi::ApiClient do
|
|
53
51
|
end
|
54
52
|
end
|
55
53
|
|
56
|
-
describe
|
57
|
-
it "sets header api-key parameter with prefix" do
|
58
|
-
AylienNewsApi.configure do |c|
|
59
|
-
c.api_key_prefix['X-AYLIEN-NewsAPI-Application-ID'] = 'PREFIX'
|
60
|
-
c.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'special-key'
|
61
|
-
end
|
62
|
-
|
63
|
-
api_client = AylienNewsApi::ApiClient.new
|
64
|
-
|
65
|
-
config2 = AylienNewsApi::Configuration.new do |c|
|
66
|
-
c.api_key_prefix['X-AYLIEN-NewsAPI-Application-ID'] = 'PREFIX2'
|
67
|
-
c.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'special-key2'
|
68
|
-
end
|
69
|
-
api_client2 = AylienNewsApi::ApiClient.new(config2)
|
70
|
-
|
71
|
-
auth_names = ['app_id']
|
72
|
-
|
73
|
-
header_params = {}
|
74
|
-
query_params = {}
|
75
|
-
api_client.update_params_for_auth! header_params, query_params, auth_names
|
76
|
-
expect(header_params).to eq({'X-AYLIEN-NewsAPI-Application-ID' => 'PREFIX special-key'})
|
77
|
-
expect(query_params).to eq({})
|
78
|
-
|
79
|
-
header_params = {}
|
80
|
-
query_params = {}
|
81
|
-
api_client2.update_params_for_auth! header_params, query_params, auth_names
|
82
|
-
expect(header_params).to eq({'X-AYLIEN-NewsAPI-Application-ID' => 'PREFIX2 special-key2'})
|
83
|
-
expect(query_params).to eq({})
|
84
|
-
end
|
85
|
-
|
86
|
-
it "sets header api-key parameter without prefix" do
|
87
|
-
AylienNewsApi.configure do |c|
|
88
|
-
c.api_key_prefix['X-AYLIEN-NewsAPI-Application-ID'] = nil
|
89
|
-
c.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'special-key'
|
90
|
-
end
|
91
|
-
|
92
|
-
api_client = AylienNewsApi::ApiClient.new
|
93
|
-
|
94
|
-
header_params = {}
|
95
|
-
query_params = {}
|
96
|
-
auth_names = ['app_id']
|
97
|
-
api_client.update_params_for_auth! header_params, query_params, auth_names
|
98
|
-
expect(header_params).to eq({'X-AYLIEN-NewsAPI-Application-ID' => 'special-key'})
|
99
|
-
expect(query_params).to eq({})
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
describe "params_encoding in #build_request" do
|
104
|
-
let(:config) { AylienNewsApi::Configuration.new }
|
105
|
-
let(:api_client) { AylienNewsApi::ApiClient.new(config) }
|
106
|
-
|
107
|
-
it "defaults to multi" do
|
108
|
-
expect(AylienNewsApi::Configuration.default.params_encoding).to eq(:multi)
|
109
|
-
expect(config.params_encoding).to eq(:multi)
|
110
|
-
|
111
|
-
request = api_client.build_request(:get, '/test')
|
112
|
-
expect(request.options[:params_encoding]).to eq(:multi)
|
113
|
-
end
|
114
|
-
|
115
|
-
it "can be customized" do
|
116
|
-
config.params_encoding = nil
|
117
|
-
request = api_client.build_request(:get, '/test')
|
118
|
-
expect(request.options[:params_encoding]).to eq(nil)
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
|
-
describe "timeout in #build_request" do
|
123
|
-
let(:config) { AylienNewsApi::Configuration.new }
|
124
|
-
let(:api_client) { AylienNewsApi::ApiClient.new(config) }
|
125
|
-
|
126
|
-
it "defaults to 0" do
|
127
|
-
expect(AylienNewsApi::Configuration.default.timeout).to eq(0)
|
128
|
-
expect(config.timeout).to eq(0)
|
129
|
-
|
130
|
-
request = api_client.build_request(:get, '/test')
|
131
|
-
expect(request.options[:timeout]).to eq(0)
|
132
|
-
end
|
133
|
-
|
134
|
-
it "can be customized" do
|
135
|
-
config.timeout = 100
|
136
|
-
request = api_client.build_request(:get, '/test')
|
137
|
-
expect(request.options[:timeout]).to eq(100)
|
138
|
-
end
|
139
|
-
end
|
140
|
-
|
141
|
-
describe "#deserialize" do
|
54
|
+
describe '#deserialize' do
|
142
55
|
it "handles Array<Integer>" do
|
143
56
|
api_client = AylienNewsApi::ApiClient.new
|
144
|
-
headers = {'Content-Type' => 'application/json'}
|
57
|
+
headers = { 'Content-Type' => 'application/json' }
|
145
58
|
response = double('response', headers: headers, body: '[12, 34]')
|
146
59
|
data = api_client.deserialize(response, 'Array<Integer>')
|
147
60
|
expect(data).to be_instance_of(Array)
|
148
61
|
expect(data).to eq([12, 34])
|
149
62
|
end
|
150
63
|
|
151
|
-
it
|
64
|
+
it 'handles Array<Array<Integer>>' do
|
152
65
|
api_client = AylienNewsApi::ApiClient.new
|
153
|
-
headers = {'Content-Type' => 'application/json'}
|
66
|
+
headers = { 'Content-Type' => 'application/json' }
|
154
67
|
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
155
68
|
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
156
69
|
expect(data).to be_instance_of(Array)
|
157
70
|
expect(data).to eq([[12, 34], [56]])
|
158
71
|
end
|
159
72
|
|
160
|
-
it
|
73
|
+
it 'handles Hash<String, String>' do
|
161
74
|
api_client = AylienNewsApi::ApiClient.new
|
162
|
-
headers = {'Content-Type' => 'application/json'}
|
75
|
+
headers = { 'Content-Type' => 'application/json' }
|
163
76
|
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
164
77
|
data = api_client.deserialize(response, 'Hash<String, String>')
|
165
78
|
expect(data).to be_instance_of(Hash)
|
166
|
-
expect(data).to eq(
|
167
|
-
end
|
168
|
-
|
169
|
-
it "handles Hash<String, Story>" do
|
170
|
-
api_client = AylienNewsApi::ApiClient.new
|
171
|
-
headers = {'Content-Type' => 'application/json'}
|
172
|
-
response = double('response', headers: headers, body: '{"story": {"id": 1}}')
|
173
|
-
data = api_client.deserialize(response, 'Hash<String, Story>')
|
174
|
-
expect(data).to be_instance_of(Hash)
|
175
|
-
expect(data.keys).to eq([:story])
|
176
|
-
|
177
|
-
story = data[:story]
|
178
|
-
expect(story).to be_instance_of(AylienNewsApi::Story)
|
179
|
-
expect(story.id).to eq(1)
|
180
|
-
end
|
181
|
-
|
182
|
-
it "handles Hash<String, Hash<String, Story>>" do
|
183
|
-
api_client = AylienNewsApi::ApiClient.new
|
184
|
-
headers = {'Content-Type' => 'application/json'}
|
185
|
-
response = double('response', headers: headers, body: '{"data": {"story": {"id": 1}}}')
|
186
|
-
result = api_client.deserialize(response, 'Hash<String, Hash<String, Story>>')
|
187
|
-
expect(result).to be_instance_of(Hash)
|
188
|
-
expect(result.keys).to match_array([:data])
|
189
|
-
|
190
|
-
data = result[:data]
|
191
|
-
expect(data).to be_instance_of(Hash)
|
192
|
-
expect(data.keys).to match_array([:story])
|
193
|
-
|
194
|
-
story = data[:story]
|
195
|
-
expect(story).to be_instance_of(AylienNewsApi::Story)
|
196
|
-
expect(story.id).to eq(1)
|
79
|
+
expect(data).to eq(:message => 'Hello')
|
197
80
|
end
|
198
81
|
end
|
199
82
|
|
200
83
|
describe "#object_to_hash" do
|
201
|
-
it
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
expect(api_client.object_to_hash(story)).to eq(expected)
|
84
|
+
it 'ignores nils and includes empty arrays' do
|
85
|
+
# uncomment below to test object_to_hash for model
|
86
|
+
# api_client = AylienNewsApi::ApiClient.new
|
87
|
+
# _model = AylienNewsApi::ModelName.new
|
88
|
+
# update the model attribute below
|
89
|
+
# _model.id = 1
|
90
|
+
# update the expected value (hash) below
|
91
|
+
# expected = {id: 1, name: '', tags: []}
|
92
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
211
93
|
end
|
212
94
|
end
|
213
95
|
|
214
|
-
describe
|
96
|
+
describe '#build_collection_param' do
|
215
97
|
let(:param) { ['aa', 'bb', 'cc'] }
|
216
98
|
let(:api_client) { AylienNewsApi::ApiClient.new }
|
217
99
|
|
218
|
-
it
|
100
|
+
it 'works for csv' do
|
219
101
|
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
220
102
|
end
|
221
103
|
|
222
|
-
it
|
104
|
+
it 'works for ssv' do
|
223
105
|
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
224
106
|
end
|
225
107
|
|
226
|
-
it
|
108
|
+
it 'works for tsv' do
|
227
109
|
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
228
110
|
end
|
229
111
|
|
230
|
-
it
|
112
|
+
it 'works for pipes' do
|
231
113
|
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
232
114
|
end
|
233
115
|
|
234
|
-
it
|
116
|
+
it 'works for multi' do
|
235
117
|
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
236
118
|
end
|
237
119
|
|
238
|
-
it
|
239
|
-
expect
|
120
|
+
it 'fails for invalid collection format' do
|
121
|
+
expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
240
122
|
end
|
241
123
|
end
|
242
124
|
|
243
|
-
describe
|
125
|
+
describe '#json_mime?' do
|
244
126
|
let(:api_client) { AylienNewsApi::ApiClient.new }
|
245
127
|
|
246
|
-
it
|
128
|
+
it 'works' do
|
247
129
|
expect(api_client.json_mime?(nil)).to eq false
|
248
130
|
expect(api_client.json_mime?('')).to eq false
|
249
131
|
|
@@ -257,10 +139,10 @@ describe AylienNewsApi::ApiClient do
|
|
257
139
|
end
|
258
140
|
end
|
259
141
|
|
260
|
-
describe
|
142
|
+
describe '#select_header_accept' do
|
261
143
|
let(:api_client) { AylienNewsApi::ApiClient.new }
|
262
144
|
|
263
|
-
it
|
145
|
+
it 'works' do
|
264
146
|
expect(api_client.select_header_accept(nil)).to be_nil
|
265
147
|
expect(api_client.select_header_accept([])).to be_nil
|
266
148
|
|
@@ -273,10 +155,10 @@ describe AylienNewsApi::ApiClient do
|
|
273
155
|
end
|
274
156
|
end
|
275
157
|
|
276
|
-
describe
|
158
|
+
describe '#select_header_content_type' do
|
277
159
|
let(:api_client) { AylienNewsApi::ApiClient.new }
|
278
160
|
|
279
|
-
it
|
161
|
+
it 'works' do
|
280
162
|
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
281
163
|
expect(api_client.select_header_content_type([])).to eq('application/json')
|
282
164
|
|
@@ -288,10 +170,10 @@ describe AylienNewsApi::ApiClient do
|
|
288
170
|
end
|
289
171
|
end
|
290
172
|
|
291
|
-
describe
|
173
|
+
describe '#sanitize_filename' do
|
292
174
|
let(:api_client) { AylienNewsApi::ApiClient.new }
|
293
175
|
|
294
|
-
it
|
176
|
+
it 'works' do
|
295
177
|
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
296
178
|
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
297
179
|
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
data/spec/configuration_spec.rb
CHANGED
@@ -1,16 +1,14 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
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
|
14
12
|
|
15
13
|
require 'spec_helper'
|
16
14
|
|
@@ -18,21 +16,26 @@ describe AylienNewsApi::Configuration do
|
|
18
16
|
let(:config) { AylienNewsApi::Configuration.default }
|
19
17
|
|
20
18
|
before(:each) do
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
# uncomment below to setup host and base_path
|
20
|
+
# require 'URI'
|
21
|
+
# uri = URI.parse("https://api.aylien.com/news")
|
22
|
+
# AylienNewsApi.configure do |c|
|
23
|
+
# c.host = uri.host
|
24
|
+
# c.base_path = uri.path
|
25
|
+
# end
|
25
26
|
end
|
26
27
|
|
27
28
|
describe '#base_url' do
|
28
29
|
it 'should have the default value' do
|
29
|
-
|
30
|
+
# uncomment below to test default value of the base path
|
31
|
+
# expect(config.base_url).to eq("https://api.aylien.com/news")
|
30
32
|
end
|
31
33
|
|
32
34
|
it 'should remove trailing slashes' do
|
33
35
|
[nil, '', '/', '//'].each do |base_path|
|
34
36
|
config.base_path = base_path
|
35
|
-
|
37
|
+
# uncomment below to test trailing slashes
|
38
|
+
# expect(config.base_url).to eq("https://api.aylien.com/news")
|
36
39
|
end
|
37
40
|
end
|
38
41
|
end
|
data/spec/models/author_spec.rb
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
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
|
14
12
|
|
15
13
|
require 'spec_helper'
|
16
14
|
require 'json'
|
17
15
|
require 'date'
|
18
16
|
|
19
17
|
# Unit tests for AylienNewsApi::Author
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
20
|
describe 'Author' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
@@ -28,39 +28,26 @@ describe 'Author' do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
describe 'test an instance of Author' do
|
31
|
-
it 'should create an
|
32
|
-
@instance.
|
31
|
+
it 'should create an instance of Author' do
|
32
|
+
expect(@instance).to be_instance_of(AylienNewsApi::Author)
|
33
33
|
end
|
34
34
|
end
|
35
|
-
describe 'test attribute "
|
35
|
+
describe 'test attribute "avatar_url"' do
|
36
36
|
it 'should work' do
|
37
|
-
|
38
|
-
# should be_a()
|
39
|
-
# should be_nil
|
40
|
-
# should ==
|
41
|
-
# should_not ==
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
38
|
end
|
43
39
|
end
|
44
40
|
|
45
|
-
describe 'test attribute "
|
41
|
+
describe 'test attribute "id"' do
|
46
42
|
it 'should work' do
|
47
|
-
|
48
|
-
# should be_a()
|
49
|
-
# should be_nil
|
50
|
-
# should ==
|
51
|
-
# should_not ==
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
52
44
|
end
|
53
45
|
end
|
54
46
|
|
55
|
-
describe 'test attribute "
|
47
|
+
describe 'test attribute "name"' do
|
56
48
|
it 'should work' do
|
57
|
-
|
58
|
-
# should be_a()
|
59
|
-
# should be_nil
|
60
|
-
# should ==
|
61
|
-
# should_not ==
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
50
|
end
|
63
51
|
end
|
64
52
|
|
65
53
|
end
|
66
|
-
|
@@ -1,22 +1,22 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
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
|
14
12
|
|
15
13
|
require 'spec_helper'
|
16
14
|
require 'json'
|
17
15
|
require 'date'
|
18
16
|
|
19
17
|
# Unit tests for AylienNewsApi::Autocomplete
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
20
|
describe 'Autocomplete' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
@@ -28,29 +28,20 @@ describe 'Autocomplete' do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
describe 'test an instance of Autocomplete' do
|
31
|
-
it 'should create an
|
32
|
-
@instance.
|
31
|
+
it 'should create an instance of Autocomplete' do
|
32
|
+
expect(@instance).to be_instance_of(AylienNewsApi::Autocomplete)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "id"' do
|
36
36
|
it 'should work' do
|
37
|
-
|
38
|
-
# should be_a()
|
39
|
-
# should be_nil
|
40
|
-
# should ==
|
41
|
-
# should_not ==
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
38
|
end
|
43
39
|
end
|
44
40
|
|
45
41
|
describe 'test attribute "text"' do
|
46
42
|
it 'should work' do
|
47
|
-
|
48
|
-
# should be_a()
|
49
|
-
# should be_nil
|
50
|
-
# should ==
|
51
|
-
# should_not ==
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
52
44
|
end
|
53
45
|
end
|
54
46
|
|
55
47
|
end
|
56
|
-
|