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,46 @@ describe 'Category' do
29
31
 
30
32
  describe 'test an instance of Category' do
31
33
  it 'should create an instact of Category' do
32
- @instance.should be_a(AylienNewsApi::Category)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Category)
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 "taxonomy"' 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
46
+ #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["iab-qag", "iptc-subjectcode"])
47
+ #validator.allowable_values.each do |value|
48
+ # expect { @instance.taxonomy = value }.not_to raise_error
49
+ #end
52
50
  end
53
51
  end
54
52
 
55
53
  describe 'test attribute "level"' do
56
54
  it 'should work' do
57
- # assertion here
58
- # should be_a()
59
- # should be_nil
60
- # should ==
61
- # should_not ==
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
56
  end
63
57
  end
64
58
 
65
59
  describe 'test attribute "score"' do
66
60
  it 'should work' do
67
- # assertion here
68
- # should be_a()
69
- # should be_nil
70
- # should ==
71
- # should_not ==
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
62
  end
73
63
  end
74
64
 
75
65
  describe 'test attribute "confident"' do
76
66
  it 'should work' do
77
- # assertion here
78
- # should be_a()
79
- # should be_nil
80
- # should ==
81
- # should_not ==
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
68
  end
83
69
  end
84
70
 
85
71
  describe 'test attribute "links"' do
86
72
  it 'should work' do
87
- # assertion here
88
- # should be_a()
89
- # should be_nil
90
- # should ==
91
- # should_not ==
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
74
  end
93
75
  end
94
76
 
@@ -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,42 @@ describe 'Coverages' do
29
31
 
30
32
  describe 'test an instance of Coverages' do
31
33
  it 'should create an instact of Coverages' do
32
- @instance.should be_a(AylienNewsApi::Coverages)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Coverages)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "story_title"' 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 "story_body"' 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 "story_published_at"' 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 "story_language"' 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 "coverages"' 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
64
+ end
65
+ end
66
+
67
+ describe 'test attribute "clusters"' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
70
  end
83
71
  end
84
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,26 +31,18 @@ describe 'Entities' do
29
31
 
30
32
  describe 'test an instance of Entities' do
31
33
  it 'should create an instact of Entities' do
32
- @instance.should be_a(AylienNewsApi::Entities)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Entities)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "title"' 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 "body"' 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,16 +31,12 @@ describe 'EntityLinks' do
29
31
 
30
32
  describe 'test an instance of EntityLinks' do
31
33
  it 'should create an instact of EntityLinks' do
32
- @instance.should be_a(AylienNewsApi::EntityLinks)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::EntityLinks)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "dbpedia"' 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,56 +31,36 @@ describe 'Entity' do
29
31
 
30
32
  describe 'test an instance of Entity' do
31
33
  it 'should create an instact of Entity' do
32
- @instance.should be_a(AylienNewsApi::Entity)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::Entity)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "text"' 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 "score"' 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 "types"' 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 "links"' 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 "indices"' 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,16 +31,12 @@ describe 'ErrorLinks' do
29
31
 
30
32
  describe 'test an instance of ErrorLinks' do
31
33
  it 'should create an instact of ErrorLinks' do
32
- @instance.should be_a(AylienNewsApi::ErrorLinks)
34
+ expect(@instance).to be_instance_of(AylienNewsApi::ErrorLinks)
33
35
  end
34
36
  end
35
37
  describe 'test attribute "about"' 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