aylien_news_api 0.4.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +1 -1
  4. data/Rakefile +8 -0
  5. data/aylien_news_api.gemspec +17 -13
  6. data/docs/DefaultApi.md +897 -611
  7. data/docs/StoryLinks.md +1 -0
  8. data/lib/aylien_news_api.rb +15 -13
  9. data/lib/aylien_news_api/api/default_api.rb +861 -344
  10. data/lib/aylien_news_api/api_client.rb +18 -15
  11. data/lib/aylien_news_api/api_error.rb +22 -18
  12. data/lib/aylien_news_api/configuration.rb +15 -13
  13. data/lib/aylien_news_api/models/author.rb +15 -13
  14. data/lib/aylien_news_api/models/autocomplete.rb +15 -13
  15. data/lib/aylien_news_api/models/autocompletes.rb +15 -13
  16. data/lib/aylien_news_api/models/category.rb +15 -13
  17. data/lib/aylien_news_api/models/category_links.rb +15 -13
  18. data/lib/aylien_news_api/models/coverages.rb +15 -13
  19. data/lib/aylien_news_api/models/entities.rb +15 -13
  20. data/lib/aylien_news_api/models/entity.rb +25 -23
  21. data/lib/aylien_news_api/models/entity_links.rb +15 -13
  22. data/lib/aylien_news_api/models/error.rb +15 -13
  23. data/lib/aylien_news_api/models/error_links.rb +15 -13
  24. data/lib/aylien_news_api/models/errors.rb +15 -13
  25. data/lib/aylien_news_api/models/histogram_interval.rb +15 -13
  26. data/lib/aylien_news_api/models/histograms.rb +15 -13
  27. data/lib/aylien_news_api/models/location.rb +15 -13
  28. data/lib/aylien_news_api/models/media.rb +15 -13
  29. data/lib/aylien_news_api/models/rank.rb +15 -13
  30. data/lib/aylien_news_api/models/rankings.rb +15 -13
  31. data/lib/aylien_news_api/models/related_stories.rb +15 -13
  32. data/lib/aylien_news_api/models/scope.rb +15 -13
  33. data/lib/aylien_news_api/models/sentiment.rb +25 -23
  34. data/lib/aylien_news_api/models/sentiments.rb +15 -13
  35. data/lib/aylien_news_api/models/share_count.rb +15 -13
  36. data/lib/aylien_news_api/models/share_counts.rb +15 -13
  37. data/lib/aylien_news_api/models/source.rb +15 -13
  38. data/lib/aylien_news_api/models/stories.rb +15 -13
  39. data/lib/aylien_news_api/models/story.rb +15 -13
  40. data/lib/aylien_news_api/models/story_cluster.rb +15 -13
  41. data/lib/aylien_news_api/models/story_links.rb +29 -17
  42. data/lib/aylien_news_api/models/summary.rb +15 -13
  43. data/lib/aylien_news_api/models/time_series.rb +15 -13
  44. data/lib/aylien_news_api/models/time_series_list.rb +15 -13
  45. data/lib/aylien_news_api/models/trend.rb +15 -13
  46. data/lib/aylien_news_api/models/trends.rb +15 -13
  47. data/lib/aylien_news_api/version.rb +16 -14
  48. data/spec/api/default_api_spec.rb +463 -189
  49. data/spec/api_client_spec.rb +25 -101
  50. data/spec/configuration_spec.rb +26 -19
  51. data/spec/models/author_spec.rb +19 -29
  52. data/spec/models/autocomplete_spec.rb +18 -24
  53. data/spec/models/autocompletes_spec.rb +17 -19
  54. data/spec/models/category_links_spec.rb +18 -24
  55. data/spec/models/category_spec.rb +26 -44
  56. data/spec/models/coverages_spec.rb +27 -39
  57. data/spec/models/entities_spec.rb +18 -24
  58. data/spec/models/entity_links_spec.rb +17 -19
  59. data/spec/models/entity_spec.rb +21 -39
  60. data/spec/models/error_links_spec.rb +17 -19
  61. data/spec/models/error_spec.rb +22 -44
  62. data/spec/models/errors_spec.rb +17 -19
  63. data/spec/models/histogram_interval_spec.rb +18 -24
  64. data/spec/models/histograms_spec.rb +21 -39
  65. data/spec/models/location_spec.rb +19 -29
  66. data/spec/models/media_spec.rb +50 -24
  67. data/spec/models/rank_spec.rb +15 -13
  68. data/spec/models/rankings_spec.rb +15 -13
  69. data/spec/models/related_stories_spec.rb +26 -34
  70. data/spec/models/scope_spec.rb +24 -34
  71. data/spec/models/sentiment_spec.rb +22 -24
  72. data/spec/models/sentiments_spec.rb +18 -24
  73. data/spec/models/share_count_spec.rb +18 -24
  74. data/spec/models/share_counts_spec.rb +20 -34
  75. data/spec/models/source_spec.rb +52 -44
  76. data/spec/models/stories_spec.rb +19 -29
  77. data/spec/models/story_cluster_spec.rb +21 -39
  78. data/spec/models/story_links_spec.rb +25 -29
  79. data/spec/models/story_spec.rb +36 -114
  80. data/spec/models/summary_spec.rb +17 -19
  81. data/spec/models/time_series_list_spec.rb +20 -34
  82. data/spec/models/time_series_spec.rb +18 -24
  83. data/spec/models/trend_spec.rb +18 -24
  84. data/spec/models/trends_spec.rb +18 -24
  85. data/spec/spec_helper.rb +15 -13
  86. metadata +25 -8
  87. data/Gemfile.lock +0 -65
  88. data/LICENSE +0 -13
  89. data/aylien_news_api-0.2.0.gem +0 -0
  90. data/aylien_news_api-0.3.0.gem +0 -0
@@ -1,16 +1,18 @@
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
+ Copyright 2017 Aylien, Inc. All Rights Reserved.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
14
16
 
15
17
  require 'spec_helper'
16
18
  require 'json'
@@ -29,66 +31,42 @@ describe 'Error' do
29
31
 
30
32
  describe 'test an instance of Error' do
31
33
  it 'should create an instact of Error' do
32
- @instance.should be_a(AylienNewsApi::Error)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Error)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "id"' do
36
38
  it 'should work' do
37
- # assertion here
38
- # should be_a()
39
- # should be_nil
40
- # should ==
41
- # should_not ==
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
40
  end
43
41
  end
44
42
 
45
43
  describe 'test attribute "links"' do
46
44
  it 'should work' do
47
- # assertion here
48
- # should be_a()
49
- # should be_nil
50
- # should ==
51
- # should_not ==
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
52
46
  end
53
47
  end
54
48
 
55
49
  describe 'test attribute "status"' do
56
50
  it 'should work' do
57
- # assertion here
58
- # should be_a()
59
- # should be_nil
60
- # should ==
61
- # should_not ==
51
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
52
  end
63
53
  end
64
54
 
65
55
  describe 'test attribute "code"' do
66
56
  it 'should work' do
67
- # assertion here
68
- # should be_a()
69
- # should be_nil
70
- # should ==
71
- # should_not ==
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
58
  end
73
59
  end
74
60
 
75
61
  describe 'test attribute "title"' do
76
62
  it 'should work' do
77
- # assertion here
78
- # should be_a()
79
- # should be_nil
80
- # should ==
81
- # should_not ==
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
64
  end
83
65
  end
84
66
 
85
67
  describe 'test attribute "detail"' do
86
68
  it 'should work' do
87
- # assertion here
88
- # should be_a()
89
- # should be_nil
90
- # should ==
91
- # should_not ==
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
70
  end
93
71
  end
94
72
 
@@ -1,16 +1,18 @@
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
+ Copyright 2017 Aylien, Inc. All Rights Reserved.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
14
16
 
15
17
  require 'spec_helper'
16
18
  require 'json'
@@ -29,16 +31,12 @@ describe 'Errors' do
29
31
 
30
32
  describe 'test an instance of Errors' do
31
33
  it 'should create an instact of Errors' do
32
- @instance.should be_a(AylienNewsApi::Errors)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Errors)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "errors"' do
36
38
  it 'should work' do
37
- # assertion here
38
- # should be_a()
39
- # should be_nil
40
- # should ==
41
- # should_not ==
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
40
  end
43
41
  end
44
42
 
@@ -1,16 +1,18 @@
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
+ Copyright 2017 Aylien, Inc. All Rights Reserved.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
14
16
 
15
17
  require 'spec_helper'
16
18
  require 'json'
@@ -29,26 +31,18 @@ describe 'HistogramInterval' do
29
31
 
30
32
  describe 'test an instance of HistogramInterval' do
31
33
  it 'should create an instact of HistogramInterval' do
32
- @instance.should be_a(AylienNewsApi::HistogramInterval)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::HistogramInterval)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "bin"' do
36
38
  it 'should work' do
37
- # assertion here
38
- # should be_a()
39
- # should be_nil
40
- # should ==
41
- # should_not ==
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
40
  end
43
41
  end
44
42
 
45
43
  describe 'test attribute "count"' do
46
44
  it 'should work' do
47
- # assertion here
48
- # should be_a()
49
- # should be_nil
50
- # should ==
51
- # should_not ==
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
52
46
  end
53
47
  end
54
48
 
@@ -1,16 +1,18 @@
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
+ Copyright 2017 Aylien, Inc. All Rights Reserved.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
14
16
 
15
17
  require 'spec_helper'
16
18
  require 'json'
@@ -29,56 +31,36 @@ describe 'Histograms' do
29
31
 
30
32
  describe 'test an instance of Histograms' do
31
33
  it 'should create an instact of Histograms' do
32
- @instance.should be_a(AylienNewsApi::Histograms)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Histograms)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "intervals"' do
36
38
  it 'should work' do
37
- # assertion here
38
- # should be_a()
39
- # should be_nil
40
- # should ==
41
- # should_not ==
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
40
  end
43
41
  end
44
42
 
45
43
  describe 'test attribute "interval_start"' do
46
44
  it 'should work' do
47
- # assertion here
48
- # should be_a()
49
- # should be_nil
50
- # should ==
51
- # should_not ==
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
52
46
  end
53
47
  end
54
48
 
55
49
  describe 'test attribute "interval_end"' do
56
50
  it 'should work' do
57
- # assertion here
58
- # should be_a()
59
- # should be_nil
60
- # should ==
61
- # should_not ==
51
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
52
  end
63
53
  end
64
54
 
65
55
  describe 'test attribute "interval_width"' do
66
56
  it 'should work' do
67
- # assertion here
68
- # should be_a()
69
- # should be_nil
70
- # should ==
71
- # should_not ==
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
58
  end
73
59
  end
74
60
 
75
61
  describe 'test attribute "field"' do
76
62
  it 'should work' do
77
- # assertion here
78
- # should be_a()
79
- # should be_nil
80
- # should ==
81
- # should_not ==
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
64
  end
83
65
  end
84
66
 
@@ -1,16 +1,18 @@
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
+ Copyright 2017 Aylien, Inc. All Rights Reserved.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
14
16
 
15
17
  require 'spec_helper'
16
18
  require 'json'
@@ -29,36 +31,24 @@ describe 'Location' do
29
31
 
30
32
  describe 'test an instance of Location' do
31
33
  it 'should create an instact of Location' do
32
- @instance.should be_a(AylienNewsApi::Location)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Location)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "country"' do
36
38
  it 'should work' do
37
- # assertion here
38
- # should be_a()
39
- # should be_nil
40
- # should ==
41
- # should_not ==
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
40
  end
43
41
  end
44
42
 
45
43
  describe 'test attribute "state"' do
46
44
  it 'should work' do
47
- # assertion here
48
- # should be_a()
49
- # should be_nil
50
- # should ==
51
- # should_not ==
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
52
46
  end
53
47
  end
54
48
 
55
49
  describe 'test attribute "city"' do
56
50
  it 'should work' do
57
- # assertion here
58
- # should be_a()
59
- # should be_nil
60
- # should ==
61
- # should_not ==
51
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
52
  end
63
53
  end
64
54
 
@@ -1,16 +1,18 @@
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
+ Copyright 2017 Aylien, Inc. All Rights Reserved.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
14
16
 
15
17
  require 'spec_helper'
16
18
  require 'json'
@@ -29,26 +31,50 @@ describe 'Media' do
29
31
 
30
32
  describe 'test an instance of Media' do
31
33
  it 'should create an instact of Media' do
32
- @instance.should be_a(AylienNewsApi::Media)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Media)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "type"' do
36
38
  it 'should work' do
37
- # assertion here
38
- # should be_a()
39
- # should be_nil
40
- # should ==
41
- # should_not ==
39
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
40
+ #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["image", "video"])
41
+ #validator.allowable_values.each do |value|
42
+ # expect { @instance.type = value }.not_to raise_error
43
+ #end
42
44
  end
43
45
  end
44
46
 
45
47
  describe 'test attribute "url"' do
46
48
  it 'should work' do
47
- # assertion here
48
- # should be_a()
49
- # should be_nil
50
- # should ==
51
- # should_not ==
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "format"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"])
57
+ #validator.allowable_values.each do |value|
58
+ # expect { @instance.format = value }.not_to raise_error
59
+ #end
60
+ end
61
+ end
62
+
63
+ describe 'test attribute "content_length"' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ end
67
+ end
68
+
69
+ describe 'test attribute "width"' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ end
73
+ end
74
+
75
+ describe 'test attribute "height"' do
76
+ it 'should work' do
77
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
52
78
  end
53
79
  end
54
80