aylien_news_api 0.1.0 → 0.2.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 +4 -4
- data/Gemfile.lock +2 -4
- data/README.md +8 -7
- data/aylien_news_api.gemspec +15 -2
- data/docs/CategoryLinks.md +2 -2
- data/docs/Coverages.md +1 -0
- data/docs/DefaultApi.md +315 -252
- data/docs/Media.md +1 -1
- data/docs/RelatedStories.md +1 -0
- data/docs/Scope.md +4 -4
- data/docs/Story.md +5 -5
- data/lib/aylien_news_api/api/default_api.rb +615 -549
- data/lib/aylien_news_api/api_client.rb +2 -2
- data/lib/aylien_news_api/configuration.rb +8 -0
- data/lib/aylien_news_api/models/author.rb +25 -6
- data/lib/aylien_news_api/models/autocomplete.rb +23 -5
- data/lib/aylien_news_api/models/autocompletes.rb +21 -4
- data/lib/aylien_news_api/models/category.rb +57 -12
- data/lib/aylien_news_api/models/category_links.rb +25 -7
- data/lib/aylien_news_api/models/coverages.rb +45 -12
- data/lib/aylien_news_api/models/entities.rb +23 -5
- data/lib/aylien_news_api/models/entity.rb +49 -8
- data/lib/aylien_news_api/models/entity_links.rb +21 -4
- data/lib/aylien_news_api/models/error.rb +31 -9
- data/lib/aylien_news_api/models/error_links.rb +21 -4
- data/lib/aylien_news_api/models/errors.rb +21 -4
- data/lib/aylien_news_api/models/histogram_interval.rb +23 -5
- data/lib/aylien_news_api/models/histograms.rb +29 -8
- data/lib/aylien_news_api/models/location.rb +25 -6
- data/lib/aylien_news_api/models/media.rb +50 -9
- data/lib/aylien_news_api/models/related_stories.rb +43 -11
- data/lib/aylien_news_api/models/scope.rb +57 -14
- data/lib/aylien_news_api/models/sentiment.rb +69 -8
- data/lib/aylien_news_api/models/sentiments.rb +23 -5
- data/lib/aylien_news_api/models/share_count.rb +23 -5
- data/lib/aylien_news_api/models/share_counts.rb +27 -7
- data/lib/aylien_news_api/models/source.rb +31 -9
- data/lib/aylien_news_api/models/stories.rb +25 -6
- data/lib/aylien_news_api/models/story.rb +64 -28
- data/lib/aylien_news_api/models/story_cluster.rb +29 -8
- data/lib/aylien_news_api/models/story_links.rb +25 -6
- data/lib/aylien_news_api/models/summary.rb +21 -4
- data/lib/aylien_news_api/models/time_series.rb +23 -5
- data/lib/aylien_news_api/models/time_series_list.rb +27 -7
- data/lib/aylien_news_api/models/trend.rb +23 -5
- data/lib/aylien_news_api/models/trends.rb +23 -5
- data/lib/aylien_news_api/version.rb +1 -1
- data/spec/api_client_spec.rb +306 -0
- data/spec/configuration_spec.rb +39 -0
- data/spec/spec_helper.rb +113 -0
- metadata +34 -49
- data/Rakefile +0 -8
- data/aylien_news_api-0.0.1.gem +0 -0
@@ -15,6 +15,7 @@
|
|
15
15
|
require 'date'
|
16
16
|
|
17
17
|
module AylienNewsApi
|
18
|
+
|
18
19
|
class StoryCluster
|
19
20
|
# A unique identification for the cluster
|
20
21
|
attr_accessor :id
|
@@ -31,6 +32,7 @@ module AylienNewsApi
|
|
31
32
|
# The cluster score
|
32
33
|
attr_accessor :score
|
33
34
|
|
35
|
+
|
34
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
37
|
def self.attribute_map
|
36
38
|
{
|
@@ -61,29 +63,47 @@ module AylienNewsApi
|
|
61
63
|
# convert string to symbol for hash key
|
62
64
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
63
65
|
|
64
|
-
if attributes
|
66
|
+
if attributes.has_key?(:'id')
|
65
67
|
self.id = attributes[:'id']
|
66
68
|
end
|
67
|
-
|
69
|
+
|
70
|
+
if attributes.has_key?(:'phrases')
|
68
71
|
if (value = attributes[:'phrases']).is_a?(Array)
|
69
72
|
self.phrases = value
|
70
73
|
end
|
71
74
|
end
|
72
|
-
|
75
|
+
|
76
|
+
if attributes.has_key?(:'size')
|
73
77
|
self.size = attributes[:'size']
|
74
78
|
end
|
75
|
-
|
79
|
+
|
80
|
+
if attributes.has_key?(:'stories')
|
76
81
|
if (value = attributes[:'stories']).is_a?(Array)
|
77
82
|
self.stories = value
|
78
83
|
end
|
79
84
|
end
|
80
|
-
|
85
|
+
|
86
|
+
if attributes.has_key?(:'score')
|
81
87
|
self.score = attributes[:'score']
|
82
88
|
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
93
|
+
# @return Array for valid properies with the reasons
|
94
|
+
def list_invalid_properties
|
95
|
+
invalid_properties = Array.new
|
96
|
+
return invalid_properties
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check to see if the all the properties in the model are valid
|
100
|
+
# @return true if the model is valid
|
101
|
+
def valid?
|
102
|
+
return true
|
83
103
|
end
|
84
104
|
|
85
105
|
# Checks equality by comparing each attribute.
|
86
|
-
# @param [Object] Object to be compared
|
106
|
+
# @param [Object] Object to be compared
|
87
107
|
def ==(o)
|
88
108
|
return true if self.equal?(o)
|
89
109
|
self.class == o.class &&
|
@@ -95,7 +115,7 @@ module AylienNewsApi
|
|
95
115
|
end
|
96
116
|
|
97
117
|
# @see the `==` method
|
98
|
-
# @param [Object] Object to be compared
|
118
|
+
# @param [Object] Object to be compared
|
99
119
|
def eql?(o)
|
100
120
|
self == o
|
101
121
|
end
|
@@ -194,7 +214,7 @@ module AylienNewsApi
|
|
194
214
|
|
195
215
|
# Outputs non-array value in the form of hash
|
196
216
|
# For object, use to_hash. Otherwise, just return the value
|
197
|
-
# @param [Object] value Any valid value
|
217
|
+
# @param [Object] value Any valid value
|
198
218
|
# @return [Hash] Returns the value in the form of hash
|
199
219
|
def _to_hash(value)
|
200
220
|
if value.is_a?(Array)
|
@@ -211,4 +231,5 @@ module AylienNewsApi
|
|
211
231
|
end
|
212
232
|
|
213
233
|
end
|
234
|
+
|
214
235
|
end
|
@@ -15,6 +15,7 @@
|
|
15
15
|
require 'date'
|
16
16
|
|
17
17
|
module AylienNewsApi
|
18
|
+
|
18
19
|
class StoryLinks
|
19
20
|
# The story permalink URL
|
20
21
|
attr_accessor :permalink
|
@@ -25,6 +26,7 @@ module AylienNewsApi
|
|
25
26
|
# The coverages URL
|
26
27
|
attr_accessor :coverages
|
27
28
|
|
29
|
+
|
28
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
31
|
def self.attribute_map
|
30
32
|
{
|
@@ -51,19 +53,35 @@ module AylienNewsApi
|
|
51
53
|
# convert string to symbol for hash key
|
52
54
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
53
55
|
|
54
|
-
if attributes
|
56
|
+
if attributes.has_key?(:'permalink')
|
55
57
|
self.permalink = attributes[:'permalink']
|
56
58
|
end
|
57
|
-
|
59
|
+
|
60
|
+
if attributes.has_key?(:'related_stories')
|
58
61
|
self.related_stories = attributes[:'related_stories']
|
59
62
|
end
|
60
|
-
|
63
|
+
|
64
|
+
if attributes.has_key?(:'coverages')
|
61
65
|
self.coverages = attributes[:'coverages']
|
62
66
|
end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properies with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = Array.new
|
74
|
+
return invalid_properties
|
75
|
+
end
|
76
|
+
|
77
|
+
# Check to see if the all the properties in the model are valid
|
78
|
+
# @return true if the model is valid
|
79
|
+
def valid?
|
80
|
+
return true
|
63
81
|
end
|
64
82
|
|
65
83
|
# Checks equality by comparing each attribute.
|
66
|
-
# @param [Object] Object to be compared
|
84
|
+
# @param [Object] Object to be compared
|
67
85
|
def ==(o)
|
68
86
|
return true if self.equal?(o)
|
69
87
|
self.class == o.class &&
|
@@ -73,7 +91,7 @@ module AylienNewsApi
|
|
73
91
|
end
|
74
92
|
|
75
93
|
# @see the `==` method
|
76
|
-
# @param [Object] Object to be compared
|
94
|
+
# @param [Object] Object to be compared
|
77
95
|
def eql?(o)
|
78
96
|
self == o
|
79
97
|
end
|
@@ -172,7 +190,7 @@ module AylienNewsApi
|
|
172
190
|
|
173
191
|
# Outputs non-array value in the form of hash
|
174
192
|
# For object, use to_hash. Otherwise, just return the value
|
175
|
-
# @param [Object] value Any valid value
|
193
|
+
# @param [Object] value Any valid value
|
176
194
|
# @return [Hash] Returns the value in the form of hash
|
177
195
|
def _to_hash(value)
|
178
196
|
if value.is_a?(Array)
|
@@ -189,4 +207,5 @@ module AylienNewsApi
|
|
189
207
|
end
|
190
208
|
|
191
209
|
end
|
210
|
+
|
192
211
|
end
|
@@ -15,10 +15,12 @@
|
|
15
15
|
require 'date'
|
16
16
|
|
17
17
|
module AylienNewsApi
|
18
|
+
|
18
19
|
class Summary
|
19
20
|
# An array of the suggested summary sentences
|
20
21
|
attr_accessor :sentences
|
21
22
|
|
23
|
+
|
22
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
25
|
def self.attribute_map
|
24
26
|
{
|
@@ -41,15 +43,29 @@ module AylienNewsApi
|
|
41
43
|
# convert string to symbol for hash key
|
42
44
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
43
45
|
|
44
|
-
if attributes
|
46
|
+
if attributes.has_key?(:'sentences')
|
45
47
|
if (value = attributes[:'sentences']).is_a?(Array)
|
46
48
|
self.sentences = value
|
47
49
|
end
|
48
50
|
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
55
|
+
# @return Array for valid properies with the reasons
|
56
|
+
def list_invalid_properties
|
57
|
+
invalid_properties = Array.new
|
58
|
+
return invalid_properties
|
59
|
+
end
|
60
|
+
|
61
|
+
# Check to see if the all the properties in the model are valid
|
62
|
+
# @return true if the model is valid
|
63
|
+
def valid?
|
64
|
+
return true
|
49
65
|
end
|
50
66
|
|
51
67
|
# Checks equality by comparing each attribute.
|
52
|
-
# @param [Object] Object to be compared
|
68
|
+
# @param [Object] Object to be compared
|
53
69
|
def ==(o)
|
54
70
|
return true if self.equal?(o)
|
55
71
|
self.class == o.class &&
|
@@ -57,7 +73,7 @@ module AylienNewsApi
|
|
57
73
|
end
|
58
74
|
|
59
75
|
# @see the `==` method
|
60
|
-
# @param [Object] Object to be compared
|
76
|
+
# @param [Object] Object to be compared
|
61
77
|
def eql?(o)
|
62
78
|
self == o
|
63
79
|
end
|
@@ -156,7 +172,7 @@ module AylienNewsApi
|
|
156
172
|
|
157
173
|
# Outputs non-array value in the form of hash
|
158
174
|
# For object, use to_hash. Otherwise, just return the value
|
159
|
-
# @param [Object] value Any valid value
|
175
|
+
# @param [Object] value Any valid value
|
160
176
|
# @return [Hash] Returns the value in the form of hash
|
161
177
|
def _to_hash(value)
|
162
178
|
if value.is_a?(Array)
|
@@ -173,4 +189,5 @@ module AylienNewsApi
|
|
173
189
|
end
|
174
190
|
|
175
191
|
end
|
192
|
+
|
176
193
|
end
|
@@ -15,6 +15,7 @@
|
|
15
15
|
require 'date'
|
16
16
|
|
17
17
|
module AylienNewsApi
|
18
|
+
|
18
19
|
class TimeSeries
|
19
20
|
# The published date of the time series bin
|
20
21
|
attr_accessor :published_at
|
@@ -22,6 +23,7 @@ module AylienNewsApi
|
|
22
23
|
# The count of time series bin
|
23
24
|
attr_accessor :count
|
24
25
|
|
26
|
+
|
25
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
28
|
def self.attribute_map
|
27
29
|
{
|
@@ -46,16 +48,31 @@ module AylienNewsApi
|
|
46
48
|
# convert string to symbol for hash key
|
47
49
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
48
50
|
|
49
|
-
if attributes
|
51
|
+
if attributes.has_key?(:'published_at')
|
50
52
|
self.published_at = attributes[:'published_at']
|
51
53
|
end
|
52
|
-
|
54
|
+
|
55
|
+
if attributes.has_key?(:'count')
|
53
56
|
self.count = attributes[:'count']
|
54
57
|
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properies with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
return invalid_properties
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
def valid?
|
71
|
+
return true
|
55
72
|
end
|
56
73
|
|
57
74
|
# Checks equality by comparing each attribute.
|
58
|
-
# @param [Object] Object to be compared
|
75
|
+
# @param [Object] Object to be compared
|
59
76
|
def ==(o)
|
60
77
|
return true if self.equal?(o)
|
61
78
|
self.class == o.class &&
|
@@ -64,7 +81,7 @@ module AylienNewsApi
|
|
64
81
|
end
|
65
82
|
|
66
83
|
# @see the `==` method
|
67
|
-
# @param [Object] Object to be compared
|
84
|
+
# @param [Object] Object to be compared
|
68
85
|
def eql?(o)
|
69
86
|
self == o
|
70
87
|
end
|
@@ -163,7 +180,7 @@ module AylienNewsApi
|
|
163
180
|
|
164
181
|
# Outputs non-array value in the form of hash
|
165
182
|
# For object, use to_hash. Otherwise, just return the value
|
166
|
-
# @param [Object] value Any valid value
|
183
|
+
# @param [Object] value Any valid value
|
167
184
|
# @return [Hash] Returns the value in the form of hash
|
168
185
|
def _to_hash(value)
|
169
186
|
if value.is_a?(Array)
|
@@ -180,4 +197,5 @@ module AylienNewsApi
|
|
180
197
|
end
|
181
198
|
|
182
199
|
end
|
200
|
+
|
183
201
|
end
|
@@ -15,6 +15,7 @@
|
|
15
15
|
require 'date'
|
16
16
|
|
17
17
|
module AylienNewsApi
|
18
|
+
|
18
19
|
class TimeSeriesList
|
19
20
|
# An array of time series
|
20
21
|
attr_accessor :time_series
|
@@ -28,6 +29,7 @@ module AylienNewsApi
|
|
28
29
|
# The end published date of the time series
|
29
30
|
attr_accessor :published_at_end
|
30
31
|
|
32
|
+
|
31
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
34
|
def self.attribute_map
|
33
35
|
{
|
@@ -56,24 +58,41 @@ module AylienNewsApi
|
|
56
58
|
# convert string to symbol for hash key
|
57
59
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
58
60
|
|
59
|
-
if attributes
|
61
|
+
if attributes.has_key?(:'time_series')
|
60
62
|
if (value = attributes[:'time_series']).is_a?(Array)
|
61
63
|
self.time_series = value
|
62
64
|
end
|
63
65
|
end
|
64
|
-
|
66
|
+
|
67
|
+
if attributes.has_key?(:'period')
|
65
68
|
self.period = attributes[:'period']
|
66
69
|
end
|
67
|
-
|
70
|
+
|
71
|
+
if attributes.has_key?(:'published_at.start')
|
68
72
|
self.published_at_start = attributes[:'published_at.start']
|
69
73
|
end
|
70
|
-
|
74
|
+
|
75
|
+
if attributes.has_key?(:'published_at.end')
|
71
76
|
self.published_at_end = attributes[:'published_at.end']
|
72
77
|
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
82
|
+
# @return Array for valid properies with the reasons
|
83
|
+
def list_invalid_properties
|
84
|
+
invalid_properties = Array.new
|
85
|
+
return invalid_properties
|
86
|
+
end
|
87
|
+
|
88
|
+
# Check to see if the all the properties in the model are valid
|
89
|
+
# @return true if the model is valid
|
90
|
+
def valid?
|
91
|
+
return true
|
73
92
|
end
|
74
93
|
|
75
94
|
# Checks equality by comparing each attribute.
|
76
|
-
# @param [Object] Object to be compared
|
95
|
+
# @param [Object] Object to be compared
|
77
96
|
def ==(o)
|
78
97
|
return true if self.equal?(o)
|
79
98
|
self.class == o.class &&
|
@@ -84,7 +103,7 @@ module AylienNewsApi
|
|
84
103
|
end
|
85
104
|
|
86
105
|
# @see the `==` method
|
87
|
-
# @param [Object] Object to be compared
|
106
|
+
# @param [Object] Object to be compared
|
88
107
|
def eql?(o)
|
89
108
|
self == o
|
90
109
|
end
|
@@ -183,7 +202,7 @@ module AylienNewsApi
|
|
183
202
|
|
184
203
|
# Outputs non-array value in the form of hash
|
185
204
|
# For object, use to_hash. Otherwise, just return the value
|
186
|
-
# @param [Object] value Any valid value
|
205
|
+
# @param [Object] value Any valid value
|
187
206
|
# @return [Hash] Returns the value in the form of hash
|
188
207
|
def _to_hash(value)
|
189
208
|
if value.is_a?(Array)
|
@@ -200,4 +219,5 @@ module AylienNewsApi
|
|
200
219
|
end
|
201
220
|
|
202
221
|
end
|
222
|
+
|
203
223
|
end
|
@@ -15,6 +15,7 @@
|
|
15
15
|
require 'date'
|
16
16
|
|
17
17
|
module AylienNewsApi
|
18
|
+
|
18
19
|
class Trend
|
19
20
|
# The value of the trend
|
20
21
|
attr_accessor :value
|
@@ -22,6 +23,7 @@ module AylienNewsApi
|
|
22
23
|
# The count of the trend
|
23
24
|
attr_accessor :count
|
24
25
|
|
26
|
+
|
25
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
28
|
def self.attribute_map
|
27
29
|
{
|
@@ -46,16 +48,31 @@ module AylienNewsApi
|
|
46
48
|
# convert string to symbol for hash key
|
47
49
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
48
50
|
|
49
|
-
if attributes
|
51
|
+
if attributes.has_key?(:'value')
|
50
52
|
self.value = attributes[:'value']
|
51
53
|
end
|
52
|
-
|
54
|
+
|
55
|
+
if attributes.has_key?(:'count')
|
53
56
|
self.count = attributes[:'count']
|
54
57
|
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properies with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
return invalid_properties
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
def valid?
|
71
|
+
return true
|
55
72
|
end
|
56
73
|
|
57
74
|
# Checks equality by comparing each attribute.
|
58
|
-
# @param [Object] Object to be compared
|
75
|
+
# @param [Object] Object to be compared
|
59
76
|
def ==(o)
|
60
77
|
return true if self.equal?(o)
|
61
78
|
self.class == o.class &&
|
@@ -64,7 +81,7 @@ module AylienNewsApi
|
|
64
81
|
end
|
65
82
|
|
66
83
|
# @see the `==` method
|
67
|
-
# @param [Object] Object to be compared
|
84
|
+
# @param [Object] Object to be compared
|
68
85
|
def eql?(o)
|
69
86
|
self == o
|
70
87
|
end
|
@@ -163,7 +180,7 @@ module AylienNewsApi
|
|
163
180
|
|
164
181
|
# Outputs non-array value in the form of hash
|
165
182
|
# For object, use to_hash. Otherwise, just return the value
|
166
|
-
# @param [Object] value Any valid value
|
183
|
+
# @param [Object] value Any valid value
|
167
184
|
# @return [Hash] Returns the value in the form of hash
|
168
185
|
def _to_hash(value)
|
169
186
|
if value.is_a?(Array)
|
@@ -180,4 +197,5 @@ module AylienNewsApi
|
|
180
197
|
end
|
181
198
|
|
182
199
|
end
|
200
|
+
|
183
201
|
end
|