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.
Files changed (155) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +7 -1
  3. data/README.md +36 -47
  4. data/Rakefile +10 -0
  5. data/aylien_news_api.gemspec +25 -32
  6. data/docs/Author.md +12 -1
  7. data/docs/Autocomplete.md +10 -0
  8. data/docs/Autocompletes.md +9 -0
  9. data/docs/Category.md +19 -3
  10. data/docs/CategoryLinks.md +11 -1
  11. data/docs/CategoryTaxonomy.md +16 -0
  12. data/docs/Cluster.md +29 -0
  13. data/docs/Clusters.md +21 -0
  14. data/docs/Coverages.md +16 -4
  15. data/docs/DefaultApi.md +1310 -576
  16. data/docs/Entities.md +11 -1
  17. data/docs/Entity.md +16 -3
  18. data/docs/EntityLinks.md +9 -0
  19. data/docs/Error.md +16 -2
  20. data/docs/ErrorLinks.md +9 -0
  21. data/docs/Errors.md +9 -0
  22. data/docs/HistogramInterval.md +10 -0
  23. data/docs/Histograms.md +20 -3
  24. data/docs/Location.md +13 -2
  25. data/docs/Media.md +19 -1
  26. data/docs/MediaFormat.md +16 -0
  27. data/docs/MediaType.md +16 -0
  28. data/docs/Rank.md +21 -0
  29. data/docs/Rankings.md +17 -0
  30. data/docs/RelatedStories.md +14 -3
  31. data/docs/RepresentativeStory.md +23 -0
  32. data/docs/Scope.md +15 -3
  33. data/docs/ScopeLevel.md +16 -0
  34. data/docs/Sentiment.md +11 -1
  35. data/docs/SentimentPolarity.md +16 -0
  36. data/docs/Sentiments.md +12 -2
  37. data/docs/ShareCount.md +10 -0
  38. data/docs/ShareCounts.md +12 -0
  39. data/docs/Source.md +27 -3
  40. data/docs/Stories.md +15 -2
  41. data/docs/Story.md +48 -16
  42. data/docs/StoryCluster.md +14 -1
  43. data/docs/StoryLinks.md +14 -1
  44. data/docs/StoryTranslation.md +19 -0
  45. data/docs/StoryTranslations.md +17 -0
  46. data/docs/StoryTranslationsEn.md +21 -0
  47. data/docs/Summary.md +9 -0
  48. data/docs/TimeSeries.md +11 -1
  49. data/docs/TimeSeriesList.md +15 -3
  50. data/docs/Trend.md +11 -1
  51. data/docs/Trends.md +15 -1
  52. data/git_push.sh +58 -0
  53. data/lib/aylien_news_api.rb +23 -14
  54. data/lib/aylien_news_api/api/default_api.rb +2755 -892
  55. data/lib/aylien_news_api/api_client.rb +141 -102
  56. data/lib/aylien_news_api/api_error.rb +37 -18
  57. data/lib/aylien_news_api/configuration.rb +94 -43
  58. data/lib/aylien_news_api/models/author.rb +69 -53
  59. data/lib/aylien_news_api/models/autocomplete.rb +55 -39
  60. data/lib/aylien_news_api/models/autocompletes.rb +54 -38
  61. data/lib/aylien_news_api/models/category.rb +88 -97
  62. data/lib/aylien_news_api/models/category_links.rb +66 -50
  63. data/lib/aylien_news_api/models/category_taxonomy.rb +36 -0
  64. data/lib/aylien_news_api/models/cluster.rb +265 -0
  65. data/lib/aylien_news_api/models/clusters.rb +229 -0
  66. data/lib/aylien_news_api/models/coverages.rb +79 -75
  67. data/lib/aylien_news_api/models/entities.rb +67 -51
  68. data/lib/aylien_news_api/models/entity.rb +100 -81
  69. data/lib/aylien_news_api/models/entity_links.rb +54 -38
  70. data/lib/aylien_news_api/models/error.rb +79 -63
  71. data/lib/aylien_news_api/models/error_links.rb +54 -38
  72. data/lib/aylien_news_api/models/errors.rb +54 -38
  73. data/lib/aylien_news_api/models/histogram_interval.rb +55 -39
  74. data/lib/aylien_news_api/models/histograms.rb +99 -63
  75. data/lib/aylien_news_api/models/location.rb +70 -54
  76. data/lib/aylien_news_api/models/media.rb +97 -76
  77. data/lib/aylien_news_api/models/media_format.rb +44 -0
  78. data/lib/aylien_news_api/models/media_type.rb +36 -0
  79. data/lib/aylien_news_api/models/rank.rb +227 -0
  80. data/lib/aylien_news_api/models/rankings.rb +208 -0
  81. data/lib/aylien_news_api/models/related_stories.rb +72 -68
  82. data/lib/aylien_news_api/models/representative_story.rb +237 -0
  83. data/lib/aylien_news_api/models/scope.rb +76 -94
  84. data/lib/aylien_news_api/models/scope_level.rb +37 -0
  85. data/lib/aylien_news_api/models/sentiment.rb +70 -84
  86. data/lib/aylien_news_api/models/sentiment_polarity.rb +37 -0
  87. data/lib/aylien_news_api/models/sentiments.rb +65 -51
  88. data/lib/aylien_news_api/models/share_count.rb +55 -39
  89. data/lib/aylien_news_api/models/share_counts.rb +57 -41
  90. data/lib/aylien_news_api/models/source.rb +129 -64
  91. data/lib/aylien_news_api/models/stories.rb +79 -55
  92. data/lib/aylien_news_api/models/story.rb +191 -161
  93. data/lib/aylien_news_api/models/story_cluster.rb +71 -55
  94. data/lib/aylien_news_api/models/story_links.rb +73 -47
  95. data/lib/aylien_news_api/models/story_translation.rb +217 -0
  96. data/lib/aylien_news_api/models/story_translations.rb +207 -0
  97. data/lib/aylien_news_api/models/story_translations_en.rb +227 -0
  98. data/lib/aylien_news_api/models/summary.rb +54 -38
  99. data/lib/aylien_news_api/models/time_series.rb +66 -50
  100. data/lib/aylien_news_api/models/time_series_list.rb +75 -59
  101. data/lib/aylien_news_api/models/trend.rb +66 -50
  102. data/lib/aylien_news_api/models/trends.rb +80 -44
  103. data/lib/aylien_news_api/version.rb +12 -14
  104. data/spec/api/default_api_spec.rb +620 -284
  105. data/spec/api_client_spec.rb +43 -161
  106. data/spec/configuration_spec.rb +22 -19
  107. data/spec/models/author_spec.rb +21 -34
  108. data/spec/models/autocomplete_spec.rb +17 -26
  109. data/spec/models/autocompletes_spec.rb +16 -21
  110. data/spec/models/category_links_spec.rb +19 -28
  111. data/spec/models/category_spec.rb +31 -50
  112. data/spec/models/category_taxonomy_spec.rb +35 -0
  113. data/spec/models/cluster_spec.rb +77 -0
  114. data/spec/models/clusters_spec.rb +53 -0
  115. data/spec/models/coverages_spec.rb +24 -45
  116. data/spec/models/entities_spec.rb +19 -28
  117. data/spec/models/entity_links_spec.rb +16 -21
  118. data/spec/models/entity_spec.rb +25 -46
  119. data/spec/models/error_links_spec.rb +16 -21
  120. data/spec/models/error_spec.rb +27 -52
  121. data/spec/models/errors_spec.rb +16 -21
  122. data/spec/models/histogram_interval_spec.rb +17 -26
  123. data/spec/models/histograms_spec.rb +36 -45
  124. data/spec/models/location_spec.rb +21 -34
  125. data/spec/models/media_format_spec.rb +35 -0
  126. data/spec/models/media_spec.rb +41 -26
  127. data/spec/models/media_type_spec.rb +35 -0
  128. data/spec/models/rank_spec.rb +53 -0
  129. data/spec/models/rankings_spec.rb +41 -0
  130. data/spec/models/related_stories_spec.rb +21 -38
  131. data/spec/models/representative_story_spec.rb +59 -0
  132. data/spec/models/scope_level_spec.rb +35 -0
  133. data/spec/models/scope_spec.rb +23 -40
  134. data/spec/models/sentiment_polarity_spec.rb +35 -0
  135. data/spec/models/sentiment_spec.rb +17 -26
  136. data/spec/models/sentiments_spec.rb +19 -28
  137. data/spec/models/share_count_spec.rb +17 -26
  138. data/spec/models/share_counts_spec.rb +19 -36
  139. data/spec/models/source_spec.rb +54 -49
  140. data/spec/models/stories_spec.rb +26 -33
  141. data/spec/models/story_cluster_spec.rb +23 -44
  142. data/spec/models/story_links_spec.rb +25 -32
  143. data/spec/models/story_spec.rb +65 -134
  144. data/spec/models/story_translation_spec.rb +47 -0
  145. data/spec/models/story_translations_en_spec.rb +53 -0
  146. data/spec/models/story_translations_spec.rb +41 -0
  147. data/spec/models/summary_spec.rb +16 -21
  148. data/spec/models/time_series_list_spec.rb +22 -39
  149. data/spec/models/time_series_spec.rb +19 -28
  150. data/spec/models/trend_spec.rb +19 -28
  151. data/spec/models/trends_spec.rb +30 -27
  152. data/spec/spec_helper.rb +11 -13
  153. metadata +95 -193
  154. data/Gemfile.lock +0 -65
  155. data/LICENSE +0 -13
@@ -1,16 +1,14 @@
1
- # Copyright 2016 Aylien, Inc. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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 "#update_params_for_auth!" do
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 "handles Array<Array<Integer>>" do
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 "handles Hash<String, String>" do
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({:message => 'Hello'})
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 "ignores nils and includes empty arrays" do
202
- api_client = AylienNewsApi::ApiClient.new
203
- story = AylienNewsApi::Story.new
204
- story.id = 1
205
- story.title = ''
206
- story.published_at = nil
207
- story.body = nil
208
- story.hashtags = []
209
- expected = {id: 1, title: '', hashtags: []}
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 "#build_collection_param" do
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 "works for csv" do
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 "works for ssv" do
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 "works for tsv" do
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 "works for pipes" do
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 "works for multi" do
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 "fails for invalid collection format" do
239
- expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
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 "#json_mime?" do
125
+ describe '#json_mime?' do
244
126
  let(:api_client) { AylienNewsApi::ApiClient.new }
245
127
 
246
- it "works" do
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 "#select_header_accept" do
142
+ describe '#select_header_accept' do
261
143
  let(:api_client) { AylienNewsApi::ApiClient.new }
262
144
 
263
- it "works" do
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 "#select_header_content_type" do
158
+ describe '#select_header_content_type' do
277
159
  let(:api_client) { AylienNewsApi::ApiClient.new }
278
160
 
279
- it "works" do
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 "#sanitize_filename" do
173
+ describe '#sanitize_filename' do
292
174
  let(:api_client) { AylienNewsApi::ApiClient.new }
293
175
 
294
- it "works" do
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')
@@ -1,16 +1,14 @@
1
- # Copyright 2016 Aylien, Inc. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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
- AylienNewsApi.configure do |c|
22
- c.host = 'api.newsapi.aylien.com'
23
- c.base_path = 'v1'
24
- end
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
- expect(config.base_url).to eq('https://api.newsapi.aylien.com/v1')
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
- expect(config.base_url).to eq('https://api.newsapi.aylien.com')
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
@@ -1,22 +1,22 @@
1
- # Copyright 2016 Aylien, Inc. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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 instact of Author' do
32
- @instance.should be_a(AylienNewsApi::Author)
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 "id"' do
35
+ describe 'test attribute "avatar_url"' do
36
36
  it 'should work' do
37
- # assertion here
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 "name"' do
41
+ describe 'test attribute "id"' do
46
42
  it 'should work' do
47
- # assertion here
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 "avatar_url"' do
47
+ describe 'test attribute "name"' do
56
48
  it 'should work' do
57
- # assertion here
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
- # Copyright 2016 Aylien, Inc. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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 instact of Autocomplete' do
32
- @instance.should be_a(AylienNewsApi::Autocomplete)
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
- # assertion here
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
- # assertion here
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
-