Class: AylienNewsApi::DefaultApi

Inherits:
Object
  • Object
show all
Defined in:
lib/aylien_news_api/api/default_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DefaultApi

Returns a new instance of DefaultApi.



19
20
21
# File 'lib/aylien_news_api/api/default_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/aylien_news_api/api/default_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#advanced_list_stories(unknown_base_type, opts = {}) ⇒ Stories

List Stories The stories endpoint is used to return stories based on the json query you set in your request body. The News API crawler gathers articles in near real-time and stores information about them, or metadata. Below you can see all of the query parameters, and JSON schema for the body, which you can use to narrow down your query.

Parameters:

  • unknown_base_type (UNKNOWN_BASE_TYPE)

    /stories body schema to perform an advanced search with logical operators and nested objects.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



34
35
36
37
# File 'lib/aylien_news_api/api/default_api.rb', line 34

def advanced_list_stories(unknown_base_type, opts = {})
  data, _status_code, _headers = advanced_list_stories_with_http_info(unknown_base_type, opts)
  data
end

#advanced_list_stories_with_http_info(unknown_base_type, opts = {}) ⇒ Array<(Stories, Integer, Hash)>

List Stories The stories endpoint is used to return stories based on the json query you set in your request body. The News API crawler gathers articles in near real-time and stores information about them, or metadata. Below you can see all of the query parameters, and JSON schema for the body, which you can use to narrow down your query.

Parameters:

  • unknown_base_type (UNKNOWN_BASE_TYPE)

    /stories body schema to perform an advanced search with logical operators and nested objects.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Stories, Integer, Hash)>)

    Stories data, response status code and response headers



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/aylien_news_api/api/default_api.rb', line 51

def advanced_list_stories_with_http_info(unknown_base_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.advanced_list_stories ...'
  end
  # verify the required parameter 'unknown_base_type' is set
  if @api_client.config.client_side_validation && unknown_base_type.nil?
    fail ArgumentError, "Missing the required parameter 'unknown_base_type' when calling DefaultApi.advanced_list_stories"
  end
  allowable_values = ["id", "title", "body", "summary", "source", "author", "entities", "keywords", "hashtags", "characters_count", "words_count", "sentences_count", "paragraphs_count", "categories", "social_shares_count", "media", "sentiment", "language", "published_at", "links"]
  if @api_client.config.client_side_validation && opts[:'_return'] && !opts[:'_return'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"_return\", must include one of #{allowable_values}"
  end
  allowable_values = ["relevance", "recency", "hotness", "published_at", "social_shares_count", "social_shares_count.facebook", "social_shares_count.linkedin", "social_shares_count.google_plus", "social_shares_count.reddit", "media.images.count", "media.videos.count", "source.links_in_count", "source.rankings.alexa.rank", "source.rankings.alexa.rank.AF", "source.rankings.alexa.rank.AX", "source.rankings.alexa.rank.AL", "source.rankings.alexa.rank.DZ", "source.rankings.alexa.rank.AS", "source.rankings.alexa.rank.AD", "source.rankings.alexa.rank.AO", "source.rankings.alexa.rank.AI", "source.rankings.alexa.rank.AQ", "source.rankings.alexa.rank.AG", "source.rankings.alexa.rank.AR", "source.rankings.alexa.rank.AM", "source.rankings.alexa.rank.AW", "source.rankings.alexa.rank.AU", "source.rankings.alexa.rank.AT", "source.rankings.alexa.rank.AZ", "source.rankings.alexa.rank.BS", "source.rankings.alexa.rank.BH", "source.rankings.alexa.rank.BD", "source.rankings.alexa.rank.BB", "source.rankings.alexa.rank.BY", "source.rankings.alexa.rank.BE", "source.rankings.alexa.rank.BZ", "source.rankings.alexa.rank.BJ", "source.rankings.alexa.rank.BM", "source.rankings.alexa.rank.BT", "source.rankings.alexa.rank.BO", "source.rankings.alexa.rank.BQ", "source.rankings.alexa.rank.BA", "source.rankings.alexa.rank.BW", "source.rankings.alexa.rank.BV", "source.rankings.alexa.rank.BR", "source.rankings.alexa.rank.IO", "source.rankings.alexa.rank.BN", "source.rankings.alexa.rank.BG", "source.rankings.alexa.rank.BF", "source.rankings.alexa.rank.BI", "source.rankings.alexa.rank.KH", "source.rankings.alexa.rank.CM", "source.rankings.alexa.rank.CA", "source.rankings.alexa.rank.CV", "source.rankings.alexa.rank.KY", "source.rankings.alexa.rank.CF", "source.rankings.alexa.rank.TD", "source.rankings.alexa.rank.CL", "source.rankings.alexa.rank.CN", "source.rankings.alexa.rank.CX", "source.rankings.alexa.rank.CC", "source.rankings.alexa.rank.CO", "source.rankings.alexa.rank.KM", "source.rankings.alexa.rank.CG", "source.rankings.alexa.rank.CD", "source.rankings.alexa.rank.CK", "source.rankings.alexa.rank.CR", "source.rankings.alexa.rank.CI", "source.rankings.alexa.rank.HR", "source.rankings.alexa.rank.CU", "source.rankings.alexa.rank.CW", "source.rankings.alexa.rank.CY", "source.rankings.alexa.rank.CZ", "source.rankings.alexa.rank.DK", "source.rankings.alexa.rank.DJ", "source.rankings.alexa.rank.DM", "source.rankings.alexa.rank.DO", "source.rankings.alexa.rank.EC", "source.rankings.alexa.rank.EG", "source.rankings.alexa.rank.SV", "source.rankings.alexa.rank.GQ", "source.rankings.alexa.rank.ER", "source.rankings.alexa.rank.EE", "source.rankings.alexa.rank.ET", "source.rankings.alexa.rank.FK", "source.rankings.alexa.rank.FO", "source.rankings.alexa.rank.FJ", "source.rankings.alexa.rank.FI", "source.rankings.alexa.rank.FR", "source.rankings.alexa.rank.GF", "source.rankings.alexa.rank.PF", "source.rankings.alexa.rank.TF", "source.rankings.alexa.rank.GA", "source.rankings.alexa.rank.GM", "source.rankings.alexa.rank.GE", "source.rankings.alexa.rank.DE", "source.rankings.alexa.rank.GH", "source.rankings.alexa.rank.GI", "source.rankings.alexa.rank.GR", "source.rankings.alexa.rank.GL", "source.rankings.alexa.rank.GD", "source.rankings.alexa.rank.GP", "source.rankings.alexa.rank.GU", "source.rankings.alexa.rank.GT", "source.rankings.alexa.rank.GG", "source.rankings.alexa.rank.GN", "source.rankings.alexa.rank.GW", "source.rankings.alexa.rank.GY", "source.rankings.alexa.rank.HT", "source.rankings.alexa.rank.HM", "source.rankings.alexa.rank.VA", "source.rankings.alexa.rank.HN", "source.rankings.alexa.rank.HK", "source.rankings.alexa.rank.HU", "source.rankings.alexa.rank.IS", "source.rankings.alexa.rank.IN", "source.rankings.alexa.rank.ID", "source.rankings.alexa.rank.IR", "source.rankings.alexa.rank.IQ", "source.rankings.alexa.rank.IE", "source.rankings.alexa.rank.IM", "source.rankings.alexa.rank.IL", "source.rankings.alexa.rank.IT", "source.rankings.alexa.rank.JM", "source.rankings.alexa.rank.JP", "source.rankings.alexa.rank.JE", "source.rankings.alexa.rank.JO", "source.rankings.alexa.rank.KZ", "source.rankings.alexa.rank.KE", "source.rankings.alexa.rank.KI", "source.rankings.alexa.rank.KP", "source.rankings.alexa.rank.KR", "source.rankings.alexa.rank.KW", "source.rankings.alexa.rank.KG", "source.rankings.alexa.rank.LA", "source.rankings.alexa.rank.LV", "source.rankings.alexa.rank.LB", "source.rankings.alexa.rank.LS", "source.rankings.alexa.rank.LR", "source.rankings.alexa.rank.LY", "source.rankings.alexa.rank.LI", "source.rankings.alexa.rank.LT", "source.rankings.alexa.rank.LU", "source.rankings.alexa.rank.MO", "source.rankings.alexa.rank.MK", "source.rankings.alexa.rank.MG", "source.rankings.alexa.rank.MW", "source.rankings.alexa.rank.MY", "source.rankings.alexa.rank.MV", "source.rankings.alexa.rank.ML", "source.rankings.alexa.rank.MT", "source.rankings.alexa.rank.MH", "source.rankings.alexa.rank.MQ", "source.rankings.alexa.rank.MR", "source.rankings.alexa.rank.MU", "source.rankings.alexa.rank.YT", "source.rankings.alexa.rank.MX", "source.rankings.alexa.rank.FM", "source.rankings.alexa.rank.MD", "source.rankings.alexa.rank.MC", "source.rankings.alexa.rank.MN", "source.rankings.alexa.rank.ME", "source.rankings.alexa.rank.MS", "source.rankings.alexa.rank.MA", "source.rankings.alexa.rank.MZ", "source.rankings.alexa.rank.MM", "source.rankings.alexa.rank.NA", "source.rankings.alexa.rank.NR", "source.rankings.alexa.rank.NP", "source.rankings.alexa.rank.NL", "source.rankings.alexa.rank.NC", "source.rankings.alexa.rank.NZ", "source.rankings.alexa.rank.NI", "source.rankings.alexa.rank.NE", "source.rankings.alexa.rank.NG", "source.rankings.alexa.rank.NU", "source.rankings.alexa.rank.NF", "source.rankings.alexa.rank.MP", "source.rankings.alexa.rank.NO", "source.rankings.alexa.rank.OM", "source.rankings.alexa.rank.PK", "source.rankings.alexa.rank.PW", "source.rankings.alexa.rank.PS", "source.rankings.alexa.rank.PA", "source.rankings.alexa.rank.PG", "source.rankings.alexa.rank.PY", "source.rankings.alexa.rank.PE", "source.rankings.alexa.rank.PH", "source.rankings.alexa.rank.PN", "source.rankings.alexa.rank.PL", "source.rankings.alexa.rank.PT", "source.rankings.alexa.rank.PR", "source.rankings.alexa.rank.QA", "source.rankings.alexa.rank.RE", "source.rankings.alexa.rank.RO", "source.rankings.alexa.rank.RU", "source.rankings.alexa.rank.RW", "source.rankings.alexa.rank.BL", "source.rankings.alexa.rank.SH", "source.rankings.alexa.rank.KN", "source.rankings.alexa.rank.LC", "source.rankings.alexa.rank.MF", "source.rankings.alexa.rank.PM", "source.rankings.alexa.rank.VC", "source.rankings.alexa.rank.WS", "source.rankings.alexa.rank.SM", "source.rankings.alexa.rank.ST", "source.rankings.alexa.rank.SA", "source.rankings.alexa.rank.SN", "source.rankings.alexa.rank.RS", "source.rankings.alexa.rank.SC", "source.rankings.alexa.rank.SL", "source.rankings.alexa.rank.SG", "source.rankings.alexa.rank.SX", "source.rankings.alexa.rank.SK", "source.rankings.alexa.rank.SI", "source.rankings.alexa.rank.SB", "source.rankings.alexa.rank.SO", "source.rankings.alexa.rank.ZA", "source.rankings.alexa.rank.GS", "source.rankings.alexa.rank.SS", "source.rankings.alexa.rank.ES", "source.rankings.alexa.rank.LK", "source.rankings.alexa.rank.SD", "source.rankings.alexa.rank.SR", "source.rankings.alexa.rank.SJ", "source.rankings.alexa.rank.SZ", "source.rankings.alexa.rank.SE", "source.rankings.alexa.rank.CH", "source.rankings.alexa.rank.SY", "source.rankings.alexa.rank.TW", "source.rankings.alexa.rank.TJ", "source.rankings.alexa.rank.TZ", "source.rankings.alexa.rank.TH", "source.rankings.alexa.rank.TL", "source.rankings.alexa.rank.TG", "source.rankings.alexa.rank.TK", "source.rankings.alexa.rank.TO", "source.rankings.alexa.rank.TT", "source.rankings.alexa.rank.TN", "source.rankings.alexa.rank.TR", "source.rankings.alexa.rank.TM", "source.rankings.alexa.rank.TC", "source.rankings.alexa.rank.TV", "source.rankings.alexa.rank.UG", "source.rankings.alexa.rank.UA", "source.rankings.alexa.rank.AE", "source.rankings.alexa.rank.GB", "source.rankings.alexa.rank.US", "source.rankings.alexa.rank.UM", "source.rankings.alexa.rank.UY", "source.rankings.alexa.rank.UZ", "source.rankings.alexa.rank.VU", "source.rankings.alexa.rank.VE", "source.rankings.alexa.rank.VN", "source.rankings.alexa.rank.VG", "source.rankings.alexa.rank.VI", "source.rankings.alexa.rank.WF", "source.rankings.alexa.rank.EH", "source.rankings.alexa.rank.YE", "source.rankings.alexa.rank.ZM", "source.rankings.alexa.rank.ZW"]
  if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
    fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
  end
  allowable_values = ["asc", "desc"]
  if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
    fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.advanced_list_stories, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.advanced_list_stories, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/stories'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
  query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
  query_params[:'return'] = opts[:'_return'] if !opts[:'_return'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(unknown_base_type) 

  # return_type
  return_type = opts[:return_type] || 'Stories' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#advanced_list_stories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_autocompletes(type, term, opts = {}) ⇒ Autocompletes

List autocompletes The autocompletes endpoint a string of characters provided to it, and then returns suggested terms that are the most likely full words or strings. The terms returned by the News API are based on parameters the type parameters you can see below. For example, if you provide the autocompletes endpoint with the term ‘New York C` and select the type `dbpedia_resources`, the API will return links to the DBpedia resources `New_York_City`, `New_York_City_Subway`, `New_York_City_Police_Department`, and so on.

Parameters:

  • type (String)

    This parameter is used for defining the type of autocompletes.

  • term (String)

    This parameter is used for finding autocomplete objects that contain the specified value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :language (String)

    This parameter is used for autocompletes whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. (default to ‘en’)

  • :per_page (Integer)

    This parameter is used for specifying number of items in each page. (default to 3)

Returns:



135
136
137
138
# File 'lib/aylien_news_api/api/default_api.rb', line 135

def list_autocompletes(type, term, opts = {})
  data, _status_code, _headers = list_autocompletes_with_http_info(type, term, opts)
  data
end

#list_autocompletes_with_http_info(type, term, opts = {}) ⇒ Array<(Autocompletes, Integer, Hash)>

List autocompletes The autocompletes endpoint a string of characters provided to it, and then returns suggested terms that are the most likely full words or strings. The terms returned by the News API are based on parameters the type parameters you can see below. For example, if you provide the autocompletes endpoint with the term &#x60;New York C&#x60; and select the type &#x60;dbpedia_resources&#x60;, the API will return links to the DBpedia resources &#x60;New_York_City&#x60;, &#x60;New_York_City_Subway&#x60;, &#x60;New_York_City_Police_Department&#x60;, and so on.

Parameters:

  • type (String)

    This parameter is used for defining the type of autocompletes.

  • term (String)

    This parameter is used for finding autocomplete objects that contain the specified value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :language (String)

    This parameter is used for autocompletes whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :per_page (Integer)

    This parameter is used for specifying number of items in each page.

Returns:

  • (Array<(Autocompletes, Integer, Hash)>)

    Autocompletes data, response status code and response headers



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/aylien_news_api/api/default_api.rb', line 148

def list_autocompletes_with_http_info(type, term, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_autocompletes ...'
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling DefaultApi.list_autocompletes"
  end
  # verify enum value
  allowable_values = ["source_names", "source_domains", "entity_types", "dbpedia_resources", "aylien_entities_names", "aylien_entities_types"]
  if @api_client.config.client_side_validation && !allowable_values.include?(type)
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'term' is set
  if @api_client.config.client_side_validation && term.nil?
    fail ArgumentError, "Missing the required parameter 'term' when calling DefaultApi.list_autocompletes"
  end
  if @api_client.config.client_side_validation && term.to_s.length < 1
    fail ArgumentError, 'invalid value for "term" when calling DefaultApi.list_autocompletes, the character length must be great than or equal to 1.'
  end

  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language'])
    fail ArgumentError, "invalid value for \"language\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_autocompletes, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_autocompletes, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/autocompletes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = type
  query_params[:'term'] = term
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Autocompletes' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_autocompletes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_clusters(opts = {}) ⇒ Clusters

List Clusters The clusters endpoint is used to return clusters based on parameters you set in your query.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



245
246
247
248
# File 'lib/aylien_news_api/api/default_api.rb', line 245

def list_clusters(opts = {})
  data, _status_code, _headers = list_clusters_with_http_info(opts)
  data
end

#list_clusters_with_http_info(opts = {}) ⇒ Array<(Clusters, Integer, Hash)>

List Clusters The clusters endpoint is used to return clusters based on parameters you set in your query.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Clusters, Integer, Hash)>)

    Clusters data, response status code and response headers



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/aylien_news_api/api/default_api.rb', line 271

def list_clusters_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_clusters ...'
  end
  if @api_client.config.client_side_validation && !opts[:'story_count_min'].nil? && opts[:'story_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"story_count_min"]" when calling DefaultApi.list_clusters, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'story_count_max'].nil? && opts[:'story_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"story_count_max"]" when calling DefaultApi.list_clusters, must be greater than 0.'
  end

  allowable_values = ["id", "time", "summary", "category", "story_count", "earliest_story", "latest_story", "representative_story", "location_country"]
  if @api_client.config.client_side_validation && opts[:'_return'] && !opts[:'_return'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"_return\", must include one of #{allowable_values}"
  end
  allowable_values = ["time", "story_count", "earliest_story", "latest_story"]
  if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
    fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
  end
  allowable_values = ["asc", "desc"]
  if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
    fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_clusters, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_clusters, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clusters'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'!id'] = opts[:'not_id'] if !opts[:'not_id'].nil?
  query_params[:'story_count.min'] = opts[:'story_count_min'] if !opts[:'story_count_min'].nil?
  query_params[:'story_count.max'] = opts[:'story_count_max'] if !opts[:'story_count_max'].nil?
  query_params[:'time.start'] = opts[:'time_start'] if !opts[:'time_start'].nil?
  query_params[:'time.end'] = opts[:'time_end'] if !opts[:'time_end'].nil?
  query_params[:'earliest_story.start'] = opts[:'earliest_story_start'] if !opts[:'earliest_story_start'].nil?
  query_params[:'earliest_story.end'] = opts[:'earliest_story_end'] if !opts[:'earliest_story_end'].nil?
  query_params[:'latest_story.start'] = opts[:'latest_story_start'] if !opts[:'latest_story_start'].nil?
  query_params[:'latest_story.end'] = opts[:'latest_story_end'] if !opts[:'latest_story_end'].nil?
  query_params[:'location.country'] = opts[:'location_country'] if !opts[:'location_country'].nil?
  query_params[:'!location.country'] = opts[:'not_location_country'] if !opts[:'not_location_country'].nil?
  query_params[:'return'] = opts[:'_return'] if !opts[:'_return'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Clusters' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_clusters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_histograms(opts = {}) ⇒ Histograms

List histograms For the numerical metadata that the News API gathers (such as word counts or social shares for example), you can use the histograms endpoint to access and display this information. As this endpoint does not return actual stories, the results you are given will not count towards your story allowance provided by your subscription, so you can effectively query this endpoint free of charge.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories). (default to true)

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’)

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :interval_start (Integer)

    This parameter is used for setting the start data point of histogram intervals.

  • :interval_end (Integer)

    This parameter is used for setting the end data point of histogram intervals.

  • :interval_width (Integer)

    This parameter is used for setting the width of histogram intervals.

  • :field (String)

    This parameter is used for specifying the y-axis variable for the histogram. (default to ‘social_shares_count’)

Returns:



462
463
464
465
# File 'lib/aylien_news_api/api/default_api.rb', line 462

def list_histograms(opts = {})
  data, _status_code, _headers = list_histograms_with_http_info(opts)
  data
end

#list_histograms_with_http_info(opts = {}) ⇒ Array<(Histograms, Integer, Hash)>

List histograms For the numerical metadata that the News API gathers (such as word counts or social shares for example), you can use the histograms endpoint to access and display this information. As this endpoint does not return actual stories, the results you are given will not count towards your story allowance provided by your subscription, so you can effectively query this endpoint free of charge.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query.

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :interval_start (Integer)

    This parameter is used for setting the start data point of histogram intervals.

  • :interval_end (Integer)

    This parameter is used for setting the end data point of histogram intervals.

  • :interval_width (Integer)

    This parameter is used for setting the width of histogram intervals.

  • :field (String)

    This parameter is used for specifying the y-axis variable for the histogram.

Returns:

  • (Array<(Histograms, Integer, Hash)>)

    Histograms data, response status code and response headers



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
# File 'lib/aylien_news_api/api/default_api.rb', line 570

def list_histograms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_histograms ...'
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"language\", must include one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'not_language'] && !opts[:'not_language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_language\", must include one of #{allowable_values}"
  end
  allowable_values = ["iab-qag", "iptc-subjectcode"]
  if @api_client.config.client_side_validation && opts[:'categories_taxonomy'] && !allowable_values.include?(opts[:'categories_taxonomy'])
    fail ArgumentError, "invalid value for \"categories_taxonomy\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_title_polarity'] && !allowable_values.include?(opts[:'sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_title_polarity'] && !allowable_values.include?(opts[:'not_sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_body_polarity'] && !allowable_values.include?(opts[:'sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_body_polarity'] && !allowable_values.include?(opts[:'not_sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'media_images_format'] && !opts[:'media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"media_images_format\", must include one of #{allowable_values}"
  end
  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'not_media_images_format'] && !opts[:'not_media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'source_scopes_level'] && !opts[:'source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"source_scopes_level\", must include one of #{allowable_values}"
  end
  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'not_source_scopes_level'] && !opts[:'not_source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
  end

  allowable_values = ["social_shares_count", "social_shares_count.facebook", "social_shares_count.linkedin", "social_shares_count.reddit", "social_shares_count.google_plus", "characters_count", "words_count", "sentences_count", "paragraphs_count", "media.images.count", "media.videos.count", "source.links_in_count", "source.rankings.alexa.rank", "source.rankings.alexa.rank.AF", "source.rankings.alexa.rank.AX", "source.rankings.alexa.rank.AL", "source.rankings.alexa.rank.DZ", "source.rankings.alexa.rank.AS", "source.rankings.alexa.rank.AD", "source.rankings.alexa.rank.AO", "source.rankings.alexa.rank.AI", "source.rankings.alexa.rank.AQ", "source.rankings.alexa.rank.AG", "source.rankings.alexa.rank.AR", "source.rankings.alexa.rank.AM", "source.rankings.alexa.rank.AW", "source.rankings.alexa.rank.AU", "source.rankings.alexa.rank.AT", "source.rankings.alexa.rank.AZ", "source.rankings.alexa.rank.BS", "source.rankings.alexa.rank.BH", "source.rankings.alexa.rank.BD", "source.rankings.alexa.rank.BB", "source.rankings.alexa.rank.BY", "source.rankings.alexa.rank.BE", "source.rankings.alexa.rank.BZ", "source.rankings.alexa.rank.BJ", "source.rankings.alexa.rank.BM", "source.rankings.alexa.rank.BT", "source.rankings.alexa.rank.BO", "source.rankings.alexa.rank.BQ", "source.rankings.alexa.rank.BA", "source.rankings.alexa.rank.BW", "source.rankings.alexa.rank.BV", "source.rankings.alexa.rank.BR", "source.rankings.alexa.rank.IO", "source.rankings.alexa.rank.BN", "source.rankings.alexa.rank.BG", "source.rankings.alexa.rank.BF", "source.rankings.alexa.rank.BI", "source.rankings.alexa.rank.KH", "source.rankings.alexa.rank.CM", "source.rankings.alexa.rank.CA", "source.rankings.alexa.rank.CV", "source.rankings.alexa.rank.KY", "source.rankings.alexa.rank.CF", "source.rankings.alexa.rank.TD", "source.rankings.alexa.rank.CL", "source.rankings.alexa.rank.CN", "source.rankings.alexa.rank.CX", "source.rankings.alexa.rank.CC", "source.rankings.alexa.rank.CO", "source.rankings.alexa.rank.KM", "source.rankings.alexa.rank.CG", "source.rankings.alexa.rank.CD", "source.rankings.alexa.rank.CK", "source.rankings.alexa.rank.CR", "source.rankings.alexa.rank.CI", "source.rankings.alexa.rank.HR", "source.rankings.alexa.rank.CU", "source.rankings.alexa.rank.CW", "source.rankings.alexa.rank.CY", "source.rankings.alexa.rank.CZ", "source.rankings.alexa.rank.DK", "source.rankings.alexa.rank.DJ", "source.rankings.alexa.rank.DM", "source.rankings.alexa.rank.DO", "source.rankings.alexa.rank.EC", "source.rankings.alexa.rank.EG", "source.rankings.alexa.rank.SV", "source.rankings.alexa.rank.GQ", "source.rankings.alexa.rank.ER", "source.rankings.alexa.rank.EE", "source.rankings.alexa.rank.ET", "source.rankings.alexa.rank.FK", "source.rankings.alexa.rank.FO", "source.rankings.alexa.rank.FJ", "source.rankings.alexa.rank.FI", "source.rankings.alexa.rank.FR", "source.rankings.alexa.rank.GF", "source.rankings.alexa.rank.PF", "source.rankings.alexa.rank.TF", "source.rankings.alexa.rank.GA", "source.rankings.alexa.rank.GM", "source.rankings.alexa.rank.GE", "source.rankings.alexa.rank.DE", "source.rankings.alexa.rank.GH", "source.rankings.alexa.rank.GI", "source.rankings.alexa.rank.GR", "source.rankings.alexa.rank.GL", "source.rankings.alexa.rank.GD", "source.rankings.alexa.rank.GP", "source.rankings.alexa.rank.GU", "source.rankings.alexa.rank.GT", "source.rankings.alexa.rank.GG", "source.rankings.alexa.rank.GN", "source.rankings.alexa.rank.GW", "source.rankings.alexa.rank.GY", "source.rankings.alexa.rank.HT", "source.rankings.alexa.rank.HM", "source.rankings.alexa.rank.VA", "source.rankings.alexa.rank.HN", "source.rankings.alexa.rank.HK", "source.rankings.alexa.rank.HU", "source.rankings.alexa.rank.IS", "source.rankings.alexa.rank.IN", "source.rankings.alexa.rank.ID", "source.rankings.alexa.rank.IR", "source.rankings.alexa.rank.IQ", "source.rankings.alexa.rank.IE", "source.rankings.alexa.rank.IM", "source.rankings.alexa.rank.IL", "source.rankings.alexa.rank.IT", "source.rankings.alexa.rank.JM", "source.rankings.alexa.rank.JP", "source.rankings.alexa.rank.JE", "source.rankings.alexa.rank.JO", "source.rankings.alexa.rank.KZ", "source.rankings.alexa.rank.KE", "source.rankings.alexa.rank.KI", "source.rankings.alexa.rank.KP", "source.rankings.alexa.rank.KR", "source.rankings.alexa.rank.KW", "source.rankings.alexa.rank.KG", "source.rankings.alexa.rank.LA", "source.rankings.alexa.rank.LV", "source.rankings.alexa.rank.LB", "source.rankings.alexa.rank.LS", "source.rankings.alexa.rank.LR", "source.rankings.alexa.rank.LY", "source.rankings.alexa.rank.LI", "source.rankings.alexa.rank.LT", "source.rankings.alexa.rank.LU", "source.rankings.alexa.rank.MO", "source.rankings.alexa.rank.MK", "source.rankings.alexa.rank.MG", "source.rankings.alexa.rank.MW", "source.rankings.alexa.rank.MY", "source.rankings.alexa.rank.MV", "source.rankings.alexa.rank.ML", "source.rankings.alexa.rank.MT", "source.rankings.alexa.rank.MH", "source.rankings.alexa.rank.MQ", "source.rankings.alexa.rank.MR", "source.rankings.alexa.rank.MU", "source.rankings.alexa.rank.YT", "source.rankings.alexa.rank.MX", "source.rankings.alexa.rank.FM", "source.rankings.alexa.rank.MD", "source.rankings.alexa.rank.MC", "source.rankings.alexa.rank.MN", "source.rankings.alexa.rank.ME", "source.rankings.alexa.rank.MS", "source.rankings.alexa.rank.MA", "source.rankings.alexa.rank.MZ", "source.rankings.alexa.rank.MM", "source.rankings.alexa.rank.NA", "source.rankings.alexa.rank.NR", "source.rankings.alexa.rank.NP", "source.rankings.alexa.rank.NL", "source.rankings.alexa.rank.NC", "source.rankings.alexa.rank.NZ", "source.rankings.alexa.rank.NI", "source.rankings.alexa.rank.NE", "source.rankings.alexa.rank.NG", "source.rankings.alexa.rank.NU", "source.rankings.alexa.rank.NF", "source.rankings.alexa.rank.MP", "source.rankings.alexa.rank.NO", "source.rankings.alexa.rank.OM", "source.rankings.alexa.rank.PK", "source.rankings.alexa.rank.PW", "source.rankings.alexa.rank.PS", "source.rankings.alexa.rank.PA", "source.rankings.alexa.rank.PG", "source.rankings.alexa.rank.PY", "source.rankings.alexa.rank.PE", "source.rankings.alexa.rank.PH", "source.rankings.alexa.rank.PN", "source.rankings.alexa.rank.PL", "source.rankings.alexa.rank.PT", "source.rankings.alexa.rank.PR", "source.rankings.alexa.rank.QA", "source.rankings.alexa.rank.RE", "source.rankings.alexa.rank.RO", "source.rankings.alexa.rank.RU", "source.rankings.alexa.rank.RW", "source.rankings.alexa.rank.BL", "source.rankings.alexa.rank.SH", "source.rankings.alexa.rank.KN", "source.rankings.alexa.rank.LC", "source.rankings.alexa.rank.MF", "source.rankings.alexa.rank.PM", "source.rankings.alexa.rank.VC", "source.rankings.alexa.rank.WS", "source.rankings.alexa.rank.SM", "source.rankings.alexa.rank.ST", "source.rankings.alexa.rank.SA", "source.rankings.alexa.rank.SN", "source.rankings.alexa.rank.RS", "source.rankings.alexa.rank.SC", "source.rankings.alexa.rank.SL", "source.rankings.alexa.rank.SG", "source.rankings.alexa.rank.SX", "source.rankings.alexa.rank.SK", "source.rankings.alexa.rank.SI", "source.rankings.alexa.rank.SB", "source.rankings.alexa.rank.SO", "source.rankings.alexa.rank.ZA", "source.rankings.alexa.rank.GS", "source.rankings.alexa.rank.SS", "source.rankings.alexa.rank.ES", "source.rankings.alexa.rank.LK", "source.rankings.alexa.rank.SD", "source.rankings.alexa.rank.SR", "source.rankings.alexa.rank.SJ", "source.rankings.alexa.rank.SZ", "source.rankings.alexa.rank.SE", "source.rankings.alexa.rank.CH", "source.rankings.alexa.rank.SY", "source.rankings.alexa.rank.TW", "source.rankings.alexa.rank.TJ", "source.rankings.alexa.rank.TZ", "source.rankings.alexa.rank.TH", "source.rankings.alexa.rank.TL", "source.rankings.alexa.rank.TG", "source.rankings.alexa.rank.TK", "source.rankings.alexa.rank.TO", "source.rankings.alexa.rank.TT", "source.rankings.alexa.rank.TN", "source.rankings.alexa.rank.TR", "source.rankings.alexa.rank.TM", "source.rankings.alexa.rank.TC", "source.rankings.alexa.rank.TV", "source.rankings.alexa.rank.UG", "source.rankings.alexa.rank.UA", "source.rankings.alexa.rank.AE", "source.rankings.alexa.rank.GB", "source.rankings.alexa.rank.US", "source.rankings.alexa.rank.UM", "source.rankings.alexa.rank.UY", "source.rankings.alexa.rank.UZ", "source.rankings.alexa.rank.VU", "source.rankings.alexa.rank.VE", "source.rankings.alexa.rank.VN", "source.rankings.alexa.rank.VG", "source.rankings.alexa.rank.VI", "source.rankings.alexa.rank.WF", "source.rankings.alexa.rank.EH", "source.rankings.alexa.rank.YE", "source.rankings.alexa.rank.ZM", "source.rankings.alexa.rank.ZW"]
  if @api_client.config.client_side_validation && opts[:'field'] && !allowable_values.include?(opts[:'field'])
    fail ArgumentError, "invalid value for \"field\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/histograms'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'!id'] = opts[:'not_id'] if !opts[:'not_id'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
  query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
  query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
  query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
  query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
  query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
  query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
  query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
  query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
  query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
  query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
  query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
  query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
  query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
  query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
  query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
  query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
  query_params[:'entities.id'] = opts[:'entities_id'] if !opts[:'entities_id'].nil?
  query_params[:'!entities.id'] = opts[:'not_entities_id'] if !opts[:'not_entities_id'].nil?
  query_params[:'entities.links.wikipedia'] = opts[:'entities_links_wikipedia'] if !opts[:'entities_links_wikipedia'].nil?
  query_params[:'!entities.links.wikipedia'] = opts[:'not_entities_links_wikipedia'] if !opts[:'not_entities_links_wikipedia'].nil?
  query_params[:'entities.links.wikidata'] = opts[:'entities_links_wikidata'] if !opts[:'entities_links_wikidata'].nil?
  query_params[:'!entities.links.wikidata'] = opts[:'not_entities_links_wikidata'] if !opts[:'not_entities_links_wikidata'].nil?
  query_params[:'entities.types'] = opts[:'entities_types'] if !opts[:'entities_types'].nil?
  query_params[:'!entities.types'] = opts[:'not_entities_types'] if !opts[:'not_entities_types'].nil?
  query_params[:'entities.stock_tickers'] = opts[:'entities_stock_tickers'] if !opts[:'entities_stock_tickers'].nil?
  query_params[:'!entities.body.stock_tickers'] = opts[:'entities_body_stock_tickers'] if !opts[:'entities_body_stock_tickers'].nil?
  query_params[:'entities.surface_forms.text'] = opts[:'entities_surface_forms_text'] if !opts[:'entities_surface_forms_text'].nil?
  query_params[:'!entities.surface_forms.text'] = opts[:'not_entities_surface_forms_text'] if !opts[:'not_entities_surface_forms_text'].nil?
  query_params[:'entities.title.surface_forms.text'] = opts[:'entities_title_surface_forms_text'] if !opts[:'entities_title_surface_forms_text'].nil?
  query_params[:'!entities.title.surface_forms.text'] = opts[:'not_entities_title_surface_forms_text'] if !opts[:'not_entities_title_surface_forms_text'].nil?
  query_params[:'entities.body.surface_forms.text'] = opts[:'entities_body_surface_forms_text'] if !opts[:'entities_body_surface_forms_text'].nil?
  query_params[:'!entities.body.surface_forms.text'] = opts[:'not_entities_body_surface_forms_text'] if !opts[:'not_entities_body_surface_forms_text'].nil?
  query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
  query_params[:'!sentiment.title.polarity'] = opts[:'not_sentiment_title_polarity'] if !opts[:'not_sentiment_title_polarity'].nil?
  query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
  query_params[:'!sentiment.body.polarity'] = opts[:'not_sentiment_body_polarity'] if !opts[:'not_sentiment_body_polarity'].nil?
  query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
  query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
  query_params[:'media.images.width.min'] = opts[:'media_images_width_min'] if !opts[:'media_images_width_min'].nil?
  query_params[:'media.images.width.max'] = opts[:'media_images_width_max'] if !opts[:'media_images_width_max'].nil?
  query_params[:'media.images.height.min'] = opts[:'media_images_height_min'] if !opts[:'media_images_height_min'].nil?
  query_params[:'media.images.height.max'] = opts[:'media_images_height_max'] if !opts[:'media_images_height_max'].nil?
  query_params[:'media.images.content_length.min'] = opts[:'media_images_content_length_min'] if !opts[:'media_images_content_length_min'].nil?
  query_params[:'media.images.content_length.max'] = opts[:'media_images_content_length_max'] if !opts[:'media_images_content_length_max'].nil?
  query_params[:'media.images.format'] = opts[:'media_images_format'] if !opts[:'media_images_format'].nil?
  query_params[:'!media.images.format'] = opts[:'not_media_images_format'] if !opts[:'not_media_images_format'].nil?
  query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
  query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
  query_params[:'author.id'] = opts[:'author_id'] if !opts[:'author_id'].nil?
  query_params[:'!author.id'] = opts[:'not_author_id'] if !opts[:'not_author_id'].nil?
  query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
  query_params[:'!author.name'] = opts[:'not_author_name'] if !opts[:'not_author_name'].nil?
  query_params[:'source.id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
  query_params[:'!source.id'] = opts[:'not_source_id'] if !opts[:'not_source_id'].nil?
  query_params[:'source.name'] = opts[:'source_name'] if !opts[:'source_name'].nil?
  query_params[:'!source.name'] = opts[:'not_source_name'] if !opts[:'not_source_name'].nil?
  query_params[:'source.domain'] = opts[:'source_domain'] if !opts[:'source_domain'].nil?
  query_params[:'!source.domain'] = opts[:'not_source_domain'] if !opts[:'not_source_domain'].nil?
  query_params[:'source.locations.country'] = opts[:'source_locations_country'] if !opts[:'source_locations_country'].nil?
  query_params[:'!source.locations.country'] = opts[:'not_source_locations_country'] if !opts[:'not_source_locations_country'].nil?
  query_params[:'source.locations.state'] = opts[:'source_locations_state'] if !opts[:'source_locations_state'].nil?
  query_params[:'!source.locations.state'] = opts[:'not_source_locations_state'] if !opts[:'not_source_locations_state'].nil?
  query_params[:'source.locations.city'] = opts[:'source_locations_city'] if !opts[:'source_locations_city'].nil?
  query_params[:'!source.locations.city'] = opts[:'not_source_locations_city'] if !opts[:'not_source_locations_city'].nil?
  query_params[:'source.scopes.country'] = opts[:'source_scopes_country'] if !opts[:'source_scopes_country'].nil?
  query_params[:'!source.scopes.country'] = opts[:'not_source_scopes_country'] if !opts[:'not_source_scopes_country'].nil?
  query_params[:'source.scopes.state'] = opts[:'source_scopes_state'] if !opts[:'source_scopes_state'].nil?
  query_params[:'!source.scopes.state'] = opts[:'not_source_scopes_state'] if !opts[:'not_source_scopes_state'].nil?
  query_params[:'source.scopes.city'] = opts[:'source_scopes_city'] if !opts[:'source_scopes_city'].nil?
  query_params[:'!source.scopes.city'] = opts[:'not_source_scopes_city'] if !opts[:'not_source_scopes_city'].nil?
  query_params[:'source.scopes.level'] = opts[:'source_scopes_level'] if !opts[:'source_scopes_level'].nil?
  query_params[:'!source.scopes.level'] = opts[:'not_source_scopes_level'] if !opts[:'not_source_scopes_level'].nil?
  query_params[:'source.links_in_count.min'] = opts[:'source_links_in_count_min'] if !opts[:'source_links_in_count_min'].nil?
  query_params[:'source.links_in_count.max'] = opts[:'source_links_in_count_max'] if !opts[:'source_links_in_count_max'].nil?
  query_params[:'source.rankings.alexa.rank.min'] = opts[:'source_rankings_alexa_rank_min'] if !opts[:'source_rankings_alexa_rank_min'].nil?
  query_params[:'source.rankings.alexa.rank.max'] = opts[:'source_rankings_alexa_rank_max'] if !opts[:'source_rankings_alexa_rank_max'].nil?
  query_params[:'source.rankings.alexa.country'] = opts[:'source_rankings_alexa_country'] if !opts[:'source_rankings_alexa_country'].nil?
  query_params[:'social_shares_count.facebook.min'] = opts[:'social_shares_count_facebook_min'] if !opts[:'social_shares_count_facebook_min'].nil?
  query_params[:'social_shares_count.facebook.max'] = opts[:'social_shares_count_facebook_max'] if !opts[:'social_shares_count_facebook_max'].nil?
  query_params[:'social_shares_count.google_plus.min'] = opts[:'social_shares_count_google_plus_min'] if !opts[:'social_shares_count_google_plus_min'].nil?
  query_params[:'social_shares_count.google_plus.max'] = opts[:'social_shares_count_google_plus_max'] if !opts[:'social_shares_count_google_plus_max'].nil?
  query_params[:'social_shares_count.linkedin.min'] = opts[:'social_shares_count_linkedin_min'] if !opts[:'social_shares_count_linkedin_min'].nil?
  query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
  query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
  query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
  query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
  query_params[:'aql'] = opts[:'aql'] if !opts[:'aql'].nil?
  query_params[:'aql_default_field'] = opts[:'aql_default_field'] if !opts[:'aql_default_field'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'interval.start'] = opts[:'interval_start'] if !opts[:'interval_start'].nil?
  query_params[:'interval.end'] = opts[:'interval_end'] if !opts[:'interval_end'].nil?
  query_params[:'interval.width'] = opts[:'interval_width'] if !opts[:'interval_width'].nil?
  query_params[:'field'] = opts[:'field'] if !opts[:'field'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Histograms' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_histograms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories). (default to true)

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :_return (Array<String>)

    This parameter is used for specifying return fields.

  • :story_id (Integer)

    A story id

  • :story_url (String)

    An article or webpage

  • :story_title (String)

    Title of the article

  • :story_body (String)

    Body of the article

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’)

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :boost_by (String)

    This parameter is used for boosting the result by the specified value.

  • :story_language (String)

    This parameter is used for setting the language of the story. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. (default to ‘auto’)

  • :per_page (Integer)

    This parameter is used for specifying number of items in each page. (default to 3)

Returns:



953
954
955
956
# File 'lib/aylien_news_api/api/default_api.rb', line 953

def list_related_stories_get(opts = {})
  data, _status_code, _headers = list_related_stories_get_with_http_info(opts)
  data
end

Returns RelatedStories data, response status code and response headers.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :_return (Array<String>)

    This parameter is used for specifying return fields.

  • :story_id (Integer)

    A story id

  • :story_url (String)

    An article or webpage

  • :story_title (String)

    Title of the article

  • :story_body (String)

    Body of the article

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query.

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :boost_by (String)

    This parameter is used for boosting the result by the specified value.

  • :story_language (String)

    This parameter is used for setting the language of the story. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :per_page (Integer)

    This parameter is used for specifying number of items in each page.

Returns:

  • (Array<(RelatedStories, Integer, Hash)>)

    RelatedStories data, response status code and response headers



1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/aylien_news_api/api/default_api.rb', line 1063

def list_related_stories_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_related_stories_get ...'
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"language\", must include one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'not_language'] && !opts[:'not_language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_language\", must include one of #{allowable_values}"
  end
  allowable_values = ["iab-qag", "iptc-subjectcode"]
  if @api_client.config.client_side_validation && opts[:'categories_taxonomy'] && !allowable_values.include?(opts[:'categories_taxonomy'])
    fail ArgumentError, "invalid value for \"categories_taxonomy\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_title_polarity'] && !allowable_values.include?(opts[:'sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_title_polarity'] && !allowable_values.include?(opts[:'not_sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_body_polarity'] && !allowable_values.include?(opts[:'sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_body_polarity'] && !allowable_values.include?(opts[:'not_sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'media_images_format'] && !opts[:'media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"media_images_format\", must include one of #{allowable_values}"
  end
  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'not_media_images_format'] && !opts[:'not_media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'source_scopes_level'] && !opts[:'source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"source_scopes_level\", must include one of #{allowable_values}"
  end
  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'not_source_scopes_level'] && !opts[:'not_source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
  end

  allowable_values = ["id", "title", "body", "summary", "source", "author", "entities", "keywords", "hashtags", "characters_count", "words_count", "sentences_count", "paragraphs_count", "categories", "social_shares_count", "media", "sentiment", "language", "published_at", "links"]
  if @api_client.config.client_side_validation && opts[:'_return'] && !opts[:'_return'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"_return\", must include one of #{allowable_values}"
  end
  allowable_values = ["recency", "popularity"]
  if @api_client.config.client_side_validation && opts[:'boost_by'] && !allowable_values.include?(opts[:'boost_by'])
    fail ArgumentError, "invalid value for \"boost_by\", must be one of #{allowable_values}"
  end
  allowable_values = ["auto", "en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'story_language'] && !allowable_values.include?(opts[:'story_language'])
    fail ArgumentError, "invalid value for \"story_language\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_related_stories_get, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_related_stories_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/related_stories'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'!id'] = opts[:'not_id'] if !opts[:'not_id'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
  query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
  query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
  query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
  query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
  query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
  query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
  query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
  query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
  query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
  query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
  query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
  query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
  query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
  query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
  query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
  query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
  query_params[:'entities.id'] = opts[:'entities_id'] if !opts[:'entities_id'].nil?
  query_params[:'!entities.id'] = opts[:'not_entities_id'] if !opts[:'not_entities_id'].nil?
  query_params[:'entities.links.wikipedia'] = opts[:'entities_links_wikipedia'] if !opts[:'entities_links_wikipedia'].nil?
  query_params[:'!entities.links.wikipedia'] = opts[:'not_entities_links_wikipedia'] if !opts[:'not_entities_links_wikipedia'].nil?
  query_params[:'entities.links.wikidata'] = opts[:'entities_links_wikidata'] if !opts[:'entities_links_wikidata'].nil?
  query_params[:'!entities.links.wikidata'] = opts[:'not_entities_links_wikidata'] if !opts[:'not_entities_links_wikidata'].nil?
  query_params[:'entities.types'] = opts[:'entities_types'] if !opts[:'entities_types'].nil?
  query_params[:'!entities.types'] = opts[:'not_entities_types'] if !opts[:'not_entities_types'].nil?
  query_params[:'entities.stock_tickers'] = opts[:'entities_stock_tickers'] if !opts[:'entities_stock_tickers'].nil?
  query_params[:'!entities.body.stock_tickers'] = opts[:'entities_body_stock_tickers'] if !opts[:'entities_body_stock_tickers'].nil?
  query_params[:'entities.surface_forms.text'] = opts[:'entities_surface_forms_text'] if !opts[:'entities_surface_forms_text'].nil?
  query_params[:'!entities.surface_forms.text'] = opts[:'not_entities_surface_forms_text'] if !opts[:'not_entities_surface_forms_text'].nil?
  query_params[:'entities.title.surface_forms.text'] = opts[:'entities_title_surface_forms_text'] if !opts[:'entities_title_surface_forms_text'].nil?
  query_params[:'!entities.title.surface_forms.text'] = opts[:'not_entities_title_surface_forms_text'] if !opts[:'not_entities_title_surface_forms_text'].nil?
  query_params[:'entities.body.surface_forms.text'] = opts[:'entities_body_surface_forms_text'] if !opts[:'entities_body_surface_forms_text'].nil?
  query_params[:'!entities.body.surface_forms.text'] = opts[:'not_entities_body_surface_forms_text'] if !opts[:'not_entities_body_surface_forms_text'].nil?
  query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
  query_params[:'!sentiment.title.polarity'] = opts[:'not_sentiment_title_polarity'] if !opts[:'not_sentiment_title_polarity'].nil?
  query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
  query_params[:'!sentiment.body.polarity'] = opts[:'not_sentiment_body_polarity'] if !opts[:'not_sentiment_body_polarity'].nil?
  query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
  query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
  query_params[:'media.images.width.min'] = opts[:'media_images_width_min'] if !opts[:'media_images_width_min'].nil?
  query_params[:'media.images.width.max'] = opts[:'media_images_width_max'] if !opts[:'media_images_width_max'].nil?
  query_params[:'media.images.height.min'] = opts[:'media_images_height_min'] if !opts[:'media_images_height_min'].nil?
  query_params[:'media.images.height.max'] = opts[:'media_images_height_max'] if !opts[:'media_images_height_max'].nil?
  query_params[:'media.images.content_length.min'] = opts[:'media_images_content_length_min'] if !opts[:'media_images_content_length_min'].nil?
  query_params[:'media.images.content_length.max'] = opts[:'media_images_content_length_max'] if !opts[:'media_images_content_length_max'].nil?
  query_params[:'media.images.format'] = opts[:'media_images_format'] if !opts[:'media_images_format'].nil?
  query_params[:'!media.images.format'] = opts[:'not_media_images_format'] if !opts[:'not_media_images_format'].nil?
  query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
  query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
  query_params[:'author.id'] = opts[:'author_id'] if !opts[:'author_id'].nil?
  query_params[:'!author.id'] = opts[:'not_author_id'] if !opts[:'not_author_id'].nil?
  query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
  query_params[:'!author.name'] = opts[:'not_author_name'] if !opts[:'not_author_name'].nil?
  query_params[:'source.id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
  query_params[:'!source.id'] = opts[:'not_source_id'] if !opts[:'not_source_id'].nil?
  query_params[:'source.name'] = opts[:'source_name'] if !opts[:'source_name'].nil?
  query_params[:'!source.name'] = opts[:'not_source_name'] if !opts[:'not_source_name'].nil?
  query_params[:'source.domain'] = opts[:'source_domain'] if !opts[:'source_domain'].nil?
  query_params[:'!source.domain'] = opts[:'not_source_domain'] if !opts[:'not_source_domain'].nil?
  query_params[:'source.locations.country'] = opts[:'source_locations_country'] if !opts[:'source_locations_country'].nil?
  query_params[:'!source.locations.country'] = opts[:'not_source_locations_country'] if !opts[:'not_source_locations_country'].nil?
  query_params[:'source.locations.state'] = opts[:'source_locations_state'] if !opts[:'source_locations_state'].nil?
  query_params[:'!source.locations.state'] = opts[:'not_source_locations_state'] if !opts[:'not_source_locations_state'].nil?
  query_params[:'source.locations.city'] = opts[:'source_locations_city'] if !opts[:'source_locations_city'].nil?
  query_params[:'!source.locations.city'] = opts[:'not_source_locations_city'] if !opts[:'not_source_locations_city'].nil?
  query_params[:'source.scopes.country'] = opts[:'source_scopes_country'] if !opts[:'source_scopes_country'].nil?
  query_params[:'!source.scopes.country'] = opts[:'not_source_scopes_country'] if !opts[:'not_source_scopes_country'].nil?
  query_params[:'source.scopes.state'] = opts[:'source_scopes_state'] if !opts[:'source_scopes_state'].nil?
  query_params[:'!source.scopes.state'] = opts[:'not_source_scopes_state'] if !opts[:'not_source_scopes_state'].nil?
  query_params[:'source.scopes.city'] = opts[:'source_scopes_city'] if !opts[:'source_scopes_city'].nil?
  query_params[:'!source.scopes.city'] = opts[:'not_source_scopes_city'] if !opts[:'not_source_scopes_city'].nil?
  query_params[:'source.scopes.level'] = opts[:'source_scopes_level'] if !opts[:'source_scopes_level'].nil?
  query_params[:'!source.scopes.level'] = opts[:'not_source_scopes_level'] if !opts[:'not_source_scopes_level'].nil?
  query_params[:'source.links_in_count.min'] = opts[:'source_links_in_count_min'] if !opts[:'source_links_in_count_min'].nil?
  query_params[:'source.links_in_count.max'] = opts[:'source_links_in_count_max'] if !opts[:'source_links_in_count_max'].nil?
  query_params[:'source.rankings.alexa.rank.min'] = opts[:'source_rankings_alexa_rank_min'] if !opts[:'source_rankings_alexa_rank_min'].nil?
  query_params[:'source.rankings.alexa.rank.max'] = opts[:'source_rankings_alexa_rank_max'] if !opts[:'source_rankings_alexa_rank_max'].nil?
  query_params[:'source.rankings.alexa.country'] = opts[:'source_rankings_alexa_country'] if !opts[:'source_rankings_alexa_country'].nil?
  query_params[:'social_shares_count.facebook.min'] = opts[:'social_shares_count_facebook_min'] if !opts[:'social_shares_count_facebook_min'].nil?
  query_params[:'social_shares_count.facebook.max'] = opts[:'social_shares_count_facebook_max'] if !opts[:'social_shares_count_facebook_max'].nil?
  query_params[:'social_shares_count.google_plus.min'] = opts[:'social_shares_count_google_plus_min'] if !opts[:'social_shares_count_google_plus_min'].nil?
  query_params[:'social_shares_count.google_plus.max'] = opts[:'social_shares_count_google_plus_max'] if !opts[:'social_shares_count_google_plus_max'].nil?
  query_params[:'social_shares_count.linkedin.min'] = opts[:'social_shares_count_linkedin_min'] if !opts[:'social_shares_count_linkedin_min'].nil?
  query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
  query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
  query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
  query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
  query_params[:'return'] = opts[:'_return'] if !opts[:'_return'].nil?
  query_params[:'story_id'] = opts[:'story_id'] if !opts[:'story_id'].nil?
  query_params[:'story_url'] = opts[:'story_url'] if !opts[:'story_url'].nil?
  query_params[:'story_title'] = opts[:'story_title'] if !opts[:'story_title'].nil?
  query_params[:'story_body'] = opts[:'story_body'] if !opts[:'story_body'].nil?
  query_params[:'aql'] = opts[:'aql'] if !opts[:'aql'].nil?
  query_params[:'aql_default_field'] = opts[:'aql_default_field'] if !opts[:'aql_default_field'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'boost_by'] = opts[:'boost_by'] if !opts[:'boost_by'].nil?
  query_params[:'story_language'] = opts[:'story_language'] if !opts[:'story_language'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'RelatedStories' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_related_stories_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_related_stories_post(opts = {}) ⇒ RelatedStories

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories). (default to true)

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :_return (Array<String>)

    This parameter is used for specifying return fields.

  • :story_id (Integer)

    A story id

  • :story_url (String)

    An article or webpage

  • :story_title (String)

    Title of the article

  • :story_body (String)

    Body of the article

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’)

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :boost_by (String)

    This parameter is used for boosting the result by the specified value.

  • :story_language (String)

    This parameter is used for setting the language of the story. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. (default to ‘auto’)

  • :per_page (Integer)

    This parameter is used for specifying number of items in each page. (default to 3)

Returns:



1466
1467
1468
1469
# File 'lib/aylien_news_api/api/default_api.rb', line 1466

def list_related_stories_post(opts = {})
  data, _status_code, _headers = list_related_stories_post_with_http_info(opts)
  data
end

#list_related_stories_post_with_http_info(opts = {}) ⇒ Array<(RelatedStories, Integer, Hash)>

Returns RelatedStories data, response status code and response headers.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :_return (Array<String>)

    This parameter is used for specifying return fields.

  • :story_id (Integer)

    A story id

  • :story_url (String)

    An article or webpage

  • :story_title (String)

    Title of the article

  • :story_body (String)

    Body of the article

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query.

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :boost_by (String)

    This parameter is used for boosting the result by the specified value.

  • :story_language (String)

    This parameter is used for setting the language of the story. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :per_page (Integer)

    This parameter is used for specifying number of items in each page.

Returns:

  • (Array<(RelatedStories, Integer, Hash)>)

    RelatedStories data, response status code and response headers



1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
# File 'lib/aylien_news_api/api/default_api.rb', line 1576

def list_related_stories_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_related_stories_post ...'
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"language\", must include one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'not_language'] && !opts[:'not_language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_language\", must include one of #{allowable_values}"
  end
  allowable_values = ["iab-qag", "iptc-subjectcode"]
  if @api_client.config.client_side_validation && opts[:'categories_taxonomy'] && !allowable_values.include?(opts[:'categories_taxonomy'])
    fail ArgumentError, "invalid value for \"categories_taxonomy\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_title_polarity'] && !allowable_values.include?(opts[:'sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_title_polarity'] && !allowable_values.include?(opts[:'not_sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_body_polarity'] && !allowable_values.include?(opts[:'sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_body_polarity'] && !allowable_values.include?(opts[:'not_sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'media_images_format'] && !opts[:'media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"media_images_format\", must include one of #{allowable_values}"
  end
  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'not_media_images_format'] && !opts[:'not_media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'source_scopes_level'] && !opts[:'source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"source_scopes_level\", must include one of #{allowable_values}"
  end
  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'not_source_scopes_level'] && !opts[:'not_source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
  end

  allowable_values = ["id", "title", "body", "summary", "source", "author", "entities", "keywords", "hashtags", "characters_count", "words_count", "sentences_count", "paragraphs_count", "categories", "social_shares_count", "media", "sentiment", "language", "published_at", "links"]
  if @api_client.config.client_side_validation && opts[:'_return'] && !opts[:'_return'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"_return\", must include one of #{allowable_values}"
  end
  allowable_values = ["recency", "popularity"]
  if @api_client.config.client_side_validation && opts[:'boost_by'] && !allowable_values.include?(opts[:'boost_by'])
    fail ArgumentError, "invalid value for \"boost_by\", must be one of #{allowable_values}"
  end
  allowable_values = ["auto", "en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'story_language'] && !allowable_values.include?(opts[:'story_language'])
    fail ArgumentError, "invalid value for \"story_language\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_related_stories_post, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_related_stories_post, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/related_stories'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'!id'] = opts[:'not_id'] if !opts[:'not_id'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
  query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
  query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
  query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
  query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
  query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
  query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
  query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
  query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
  query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
  query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
  query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
  query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
  query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
  query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
  query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
  query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
  query_params[:'entities.id'] = opts[:'entities_id'] if !opts[:'entities_id'].nil?
  query_params[:'!entities.id'] = opts[:'not_entities_id'] if !opts[:'not_entities_id'].nil?
  query_params[:'entities.links.wikipedia'] = opts[:'entities_links_wikipedia'] if !opts[:'entities_links_wikipedia'].nil?
  query_params[:'!entities.links.wikipedia'] = opts[:'not_entities_links_wikipedia'] if !opts[:'not_entities_links_wikipedia'].nil?
  query_params[:'entities.links.wikidata'] = opts[:'entities_links_wikidata'] if !opts[:'entities_links_wikidata'].nil?
  query_params[:'!entities.links.wikidata'] = opts[:'not_entities_links_wikidata'] if !opts[:'not_entities_links_wikidata'].nil?
  query_params[:'entities.types'] = opts[:'entities_types'] if !opts[:'entities_types'].nil?
  query_params[:'!entities.types'] = opts[:'not_entities_types'] if !opts[:'not_entities_types'].nil?
  query_params[:'entities.stock_tickers'] = opts[:'entities_stock_tickers'] if !opts[:'entities_stock_tickers'].nil?
  query_params[:'!entities.body.stock_tickers'] = opts[:'entities_body_stock_tickers'] if !opts[:'entities_body_stock_tickers'].nil?
  query_params[:'entities.surface_forms.text'] = opts[:'entities_surface_forms_text'] if !opts[:'entities_surface_forms_text'].nil?
  query_params[:'!entities.surface_forms.text'] = opts[:'not_entities_surface_forms_text'] if !opts[:'not_entities_surface_forms_text'].nil?
  query_params[:'entities.title.surface_forms.text'] = opts[:'entities_title_surface_forms_text'] if !opts[:'entities_title_surface_forms_text'].nil?
  query_params[:'!entities.title.surface_forms.text'] = opts[:'not_entities_title_surface_forms_text'] if !opts[:'not_entities_title_surface_forms_text'].nil?
  query_params[:'entities.body.surface_forms.text'] = opts[:'entities_body_surface_forms_text'] if !opts[:'entities_body_surface_forms_text'].nil?
  query_params[:'!entities.body.surface_forms.text'] = opts[:'not_entities_body_surface_forms_text'] if !opts[:'not_entities_body_surface_forms_text'].nil?
  query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
  query_params[:'!sentiment.title.polarity'] = opts[:'not_sentiment_title_polarity'] if !opts[:'not_sentiment_title_polarity'].nil?
  query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
  query_params[:'!sentiment.body.polarity'] = opts[:'not_sentiment_body_polarity'] if !opts[:'not_sentiment_body_polarity'].nil?
  query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
  query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
  query_params[:'media.images.width.min'] = opts[:'media_images_width_min'] if !opts[:'media_images_width_min'].nil?
  query_params[:'media.images.width.max'] = opts[:'media_images_width_max'] if !opts[:'media_images_width_max'].nil?
  query_params[:'media.images.height.min'] = opts[:'media_images_height_min'] if !opts[:'media_images_height_min'].nil?
  query_params[:'media.images.height.max'] = opts[:'media_images_height_max'] if !opts[:'media_images_height_max'].nil?
  query_params[:'media.images.content_length.min'] = opts[:'media_images_content_length_min'] if !opts[:'media_images_content_length_min'].nil?
  query_params[:'media.images.content_length.max'] = opts[:'media_images_content_length_max'] if !opts[:'media_images_content_length_max'].nil?
  query_params[:'media.images.format'] = opts[:'media_images_format'] if !opts[:'media_images_format'].nil?
  query_params[:'!media.images.format'] = opts[:'not_media_images_format'] if !opts[:'not_media_images_format'].nil?
  query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
  query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
  query_params[:'author.id'] = opts[:'author_id'] if !opts[:'author_id'].nil?
  query_params[:'!author.id'] = opts[:'not_author_id'] if !opts[:'not_author_id'].nil?
  query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
  query_params[:'!author.name'] = opts[:'not_author_name'] if !opts[:'not_author_name'].nil?
  query_params[:'source.id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
  query_params[:'!source.id'] = opts[:'not_source_id'] if !opts[:'not_source_id'].nil?
  query_params[:'source.name'] = opts[:'source_name'] if !opts[:'source_name'].nil?
  query_params[:'!source.name'] = opts[:'not_source_name'] if !opts[:'not_source_name'].nil?
  query_params[:'source.domain'] = opts[:'source_domain'] if !opts[:'source_domain'].nil?
  query_params[:'!source.domain'] = opts[:'not_source_domain'] if !opts[:'not_source_domain'].nil?
  query_params[:'source.locations.country'] = opts[:'source_locations_country'] if !opts[:'source_locations_country'].nil?
  query_params[:'!source.locations.country'] = opts[:'not_source_locations_country'] if !opts[:'not_source_locations_country'].nil?
  query_params[:'source.locations.state'] = opts[:'source_locations_state'] if !opts[:'source_locations_state'].nil?
  query_params[:'!source.locations.state'] = opts[:'not_source_locations_state'] if !opts[:'not_source_locations_state'].nil?
  query_params[:'source.locations.city'] = opts[:'source_locations_city'] if !opts[:'source_locations_city'].nil?
  query_params[:'!source.locations.city'] = opts[:'not_source_locations_city'] if !opts[:'not_source_locations_city'].nil?
  query_params[:'source.scopes.country'] = opts[:'source_scopes_country'] if !opts[:'source_scopes_country'].nil?
  query_params[:'!source.scopes.country'] = opts[:'not_source_scopes_country'] if !opts[:'not_source_scopes_country'].nil?
  query_params[:'source.scopes.state'] = opts[:'source_scopes_state'] if !opts[:'source_scopes_state'].nil?
  query_params[:'!source.scopes.state'] = opts[:'not_source_scopes_state'] if !opts[:'not_source_scopes_state'].nil?
  query_params[:'source.scopes.city'] = opts[:'source_scopes_city'] if !opts[:'source_scopes_city'].nil?
  query_params[:'!source.scopes.city'] = opts[:'not_source_scopes_city'] if !opts[:'not_source_scopes_city'].nil?
  query_params[:'source.scopes.level'] = opts[:'source_scopes_level'] if !opts[:'source_scopes_level'].nil?
  query_params[:'!source.scopes.level'] = opts[:'not_source_scopes_level'] if !opts[:'not_source_scopes_level'].nil?
  query_params[:'source.links_in_count.min'] = opts[:'source_links_in_count_min'] if !opts[:'source_links_in_count_min'].nil?
  query_params[:'source.links_in_count.max'] = opts[:'source_links_in_count_max'] if !opts[:'source_links_in_count_max'].nil?
  query_params[:'source.rankings.alexa.rank.min'] = opts[:'source_rankings_alexa_rank_min'] if !opts[:'source_rankings_alexa_rank_min'].nil?
  query_params[:'source.rankings.alexa.rank.max'] = opts[:'source_rankings_alexa_rank_max'] if !opts[:'source_rankings_alexa_rank_max'].nil?
  query_params[:'source.rankings.alexa.country'] = opts[:'source_rankings_alexa_country'] if !opts[:'source_rankings_alexa_country'].nil?
  query_params[:'social_shares_count.facebook.min'] = opts[:'social_shares_count_facebook_min'] if !opts[:'social_shares_count_facebook_min'].nil?
  query_params[:'social_shares_count.facebook.max'] = opts[:'social_shares_count_facebook_max'] if !opts[:'social_shares_count_facebook_max'].nil?
  query_params[:'social_shares_count.google_plus.min'] = opts[:'social_shares_count_google_plus_min'] if !opts[:'social_shares_count_google_plus_min'].nil?
  query_params[:'social_shares_count.google_plus.max'] = opts[:'social_shares_count_google_plus_max'] if !opts[:'social_shares_count_google_plus_max'].nil?
  query_params[:'social_shares_count.linkedin.min'] = opts[:'social_shares_count_linkedin_min'] if !opts[:'social_shares_count_linkedin_min'].nil?
  query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
  query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
  query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
  query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
  query_params[:'return'] = opts[:'_return'] if !opts[:'_return'].nil?
  query_params[:'story_id'] = opts[:'story_id'] if !opts[:'story_id'].nil?
  query_params[:'story_url'] = opts[:'story_url'] if !opts[:'story_url'].nil?
  query_params[:'story_title'] = opts[:'story_title'] if !opts[:'story_title'].nil?
  query_params[:'story_body'] = opts[:'story_body'] if !opts[:'story_body'].nil?
  query_params[:'aql'] = opts[:'aql'] if !opts[:'aql'].nil?
  query_params[:'aql_default_field'] = opts[:'aql_default_field'] if !opts[:'aql_default_field'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'boost_by'] = opts[:'boost_by'] if !opts[:'boost_by'].nil?
  query_params[:'story_language'] = opts[:'story_language'] if !opts[:'story_language'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'RelatedStories' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_related_stories_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_stories(opts = {}) ⇒ Stories

List Stories The stories endpoint is used to return stories based on parameters you set in your query. The News API crawler gathers articles in near real-time and stores information about them, or metadata. Below you can see all of the query parameters, which you can use to narrow down your query.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories). (default to true)

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :_return (Array<String>)

    This parameter is used for specifying return fields.

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’)

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :sort_by (String)

    This parameter is used for changing the order column of the results. You can read about sorting results [here](newsapi.aylien.com/docs/sorting-results). (default to ‘published_at’)

  • :sort_direction (String)

    This parameter is used for changing the order direction of the result. You can read about sorting results [here](newsapi.aylien.com/docs/sorting-results). (default to ‘desc’)

  • :cursor (String)

    This parameter is used for finding a specific page. You can read more about pagination of results [here](newsapi.aylien.com/docs/pagination-of-results). (default to ‘*’)

  • :per_page (Integer)

    This parameter is used for specifying number of items in each page You can read more about pagination of results [here](newsapi.aylien.com/docs/pagination-of-results) (default to 10)

Returns:



1978
1979
1980
1981
# File 'lib/aylien_news_api/api/default_api.rb', line 1978

def list_stories(opts = {})
  data, _status_code, _headers = list_stories_with_http_info(opts)
  data
end

#list_stories_with_http_info(opts = {}) ⇒ Array<(Stories, Integer, Hash)>

List Stories The stories endpoint is used to return stories based on parameters you set in your query. The News API crawler gathers articles in near real-time and stores information about them, or metadata. Below you can see all of the query parameters, which you can use to narrow down your query.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :_return (Array<String>)

    This parameter is used for specifying return fields.

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query.

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :sort_by (String)

    This parameter is used for changing the order column of the results. You can read about sorting results [here](newsapi.aylien.com/docs/sorting-results).

  • :sort_direction (String)

    This parameter is used for changing the order direction of the result. You can read about sorting results [here](newsapi.aylien.com/docs/sorting-results).

  • :cursor (String)

    This parameter is used for finding a specific page. You can read more about pagination of results [here](newsapi.aylien.com/docs/pagination-of-results).

  • :per_page (Integer)

    This parameter is used for specifying number of items in each page You can read more about pagination of results [here](newsapi.aylien.com/docs/pagination-of-results)

Returns:

  • (Array<(Stories, Integer, Hash)>)

    Stories data, response status code and response headers



2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
# File 'lib/aylien_news_api/api/default_api.rb', line 2087

def list_stories_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_stories ...'
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"language\", must include one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'not_language'] && !opts[:'not_language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_language\", must include one of #{allowable_values}"
  end
  allowable_values = ["iab-qag", "iptc-subjectcode"]
  if @api_client.config.client_side_validation && opts[:'categories_taxonomy'] && !allowable_values.include?(opts[:'categories_taxonomy'])
    fail ArgumentError, "invalid value for \"categories_taxonomy\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_title_polarity'] && !allowable_values.include?(opts[:'sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_title_polarity'] && !allowable_values.include?(opts[:'not_sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_body_polarity'] && !allowable_values.include?(opts[:'sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_body_polarity'] && !allowable_values.include?(opts[:'not_sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'media_images_format'] && !opts[:'media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"media_images_format\", must include one of #{allowable_values}"
  end
  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'not_media_images_format'] && !opts[:'not_media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'source_scopes_level'] && !opts[:'source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"source_scopes_level\", must include one of #{allowable_values}"
  end
  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'not_source_scopes_level'] && !opts[:'not_source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_stories, must be greater than 0.'
  end

  allowable_values = ["id", "title", "body", "summary", "source", "author", "entities", "keywords", "hashtags", "characters_count", "words_count", "sentences_count", "paragraphs_count", "categories", "social_shares_count", "media", "sentiment", "language", "published_at", "links"]
  if @api_client.config.client_side_validation && opts[:'_return'] && !opts[:'_return'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"_return\", must include one of #{allowable_values}"
  end
  allowable_values = ["relevance", "recency", "hotness", "published_at", "social_shares_count", "social_shares_count.facebook", "social_shares_count.linkedin", "social_shares_count.google_plus", "social_shares_count.reddit", "media.images.count", "media.videos.count", "source.links_in_count", "source.rankings.alexa.rank", "source.rankings.alexa.rank.AF", "source.rankings.alexa.rank.AX", "source.rankings.alexa.rank.AL", "source.rankings.alexa.rank.DZ", "source.rankings.alexa.rank.AS", "source.rankings.alexa.rank.AD", "source.rankings.alexa.rank.AO", "source.rankings.alexa.rank.AI", "source.rankings.alexa.rank.AQ", "source.rankings.alexa.rank.AG", "source.rankings.alexa.rank.AR", "source.rankings.alexa.rank.AM", "source.rankings.alexa.rank.AW", "source.rankings.alexa.rank.AU", "source.rankings.alexa.rank.AT", "source.rankings.alexa.rank.AZ", "source.rankings.alexa.rank.BS", "source.rankings.alexa.rank.BH", "source.rankings.alexa.rank.BD", "source.rankings.alexa.rank.BB", "source.rankings.alexa.rank.BY", "source.rankings.alexa.rank.BE", "source.rankings.alexa.rank.BZ", "source.rankings.alexa.rank.BJ", "source.rankings.alexa.rank.BM", "source.rankings.alexa.rank.BT", "source.rankings.alexa.rank.BO", "source.rankings.alexa.rank.BQ", "source.rankings.alexa.rank.BA", "source.rankings.alexa.rank.BW", "source.rankings.alexa.rank.BV", "source.rankings.alexa.rank.BR", "source.rankings.alexa.rank.IO", "source.rankings.alexa.rank.BN", "source.rankings.alexa.rank.BG", "source.rankings.alexa.rank.BF", "source.rankings.alexa.rank.BI", "source.rankings.alexa.rank.KH", "source.rankings.alexa.rank.CM", "source.rankings.alexa.rank.CA", "source.rankings.alexa.rank.CV", "source.rankings.alexa.rank.KY", "source.rankings.alexa.rank.CF", "source.rankings.alexa.rank.TD", "source.rankings.alexa.rank.CL", "source.rankings.alexa.rank.CN", "source.rankings.alexa.rank.CX", "source.rankings.alexa.rank.CC", "source.rankings.alexa.rank.CO", "source.rankings.alexa.rank.KM", "source.rankings.alexa.rank.CG", "source.rankings.alexa.rank.CD", "source.rankings.alexa.rank.CK", "source.rankings.alexa.rank.CR", "source.rankings.alexa.rank.CI", "source.rankings.alexa.rank.HR", "source.rankings.alexa.rank.CU", "source.rankings.alexa.rank.CW", "source.rankings.alexa.rank.CY", "source.rankings.alexa.rank.CZ", "source.rankings.alexa.rank.DK", "source.rankings.alexa.rank.DJ", "source.rankings.alexa.rank.DM", "source.rankings.alexa.rank.DO", "source.rankings.alexa.rank.EC", "source.rankings.alexa.rank.EG", "source.rankings.alexa.rank.SV", "source.rankings.alexa.rank.GQ", "source.rankings.alexa.rank.ER", "source.rankings.alexa.rank.EE", "source.rankings.alexa.rank.ET", "source.rankings.alexa.rank.FK", "source.rankings.alexa.rank.FO", "source.rankings.alexa.rank.FJ", "source.rankings.alexa.rank.FI", "source.rankings.alexa.rank.FR", "source.rankings.alexa.rank.GF", "source.rankings.alexa.rank.PF", "source.rankings.alexa.rank.TF", "source.rankings.alexa.rank.GA", "source.rankings.alexa.rank.GM", "source.rankings.alexa.rank.GE", "source.rankings.alexa.rank.DE", "source.rankings.alexa.rank.GH", "source.rankings.alexa.rank.GI", "source.rankings.alexa.rank.GR", "source.rankings.alexa.rank.GL", "source.rankings.alexa.rank.GD", "source.rankings.alexa.rank.GP", "source.rankings.alexa.rank.GU", "source.rankings.alexa.rank.GT", "source.rankings.alexa.rank.GG", "source.rankings.alexa.rank.GN", "source.rankings.alexa.rank.GW", "source.rankings.alexa.rank.GY", "source.rankings.alexa.rank.HT", "source.rankings.alexa.rank.HM", "source.rankings.alexa.rank.VA", "source.rankings.alexa.rank.HN", "source.rankings.alexa.rank.HK", "source.rankings.alexa.rank.HU", "source.rankings.alexa.rank.IS", "source.rankings.alexa.rank.IN", "source.rankings.alexa.rank.ID", "source.rankings.alexa.rank.IR", "source.rankings.alexa.rank.IQ", "source.rankings.alexa.rank.IE", "source.rankings.alexa.rank.IM", "source.rankings.alexa.rank.IL", "source.rankings.alexa.rank.IT", "source.rankings.alexa.rank.JM", "source.rankings.alexa.rank.JP", "source.rankings.alexa.rank.JE", "source.rankings.alexa.rank.JO", "source.rankings.alexa.rank.KZ", "source.rankings.alexa.rank.KE", "source.rankings.alexa.rank.KI", "source.rankings.alexa.rank.KP", "source.rankings.alexa.rank.KR", "source.rankings.alexa.rank.KW", "source.rankings.alexa.rank.KG", "source.rankings.alexa.rank.LA", "source.rankings.alexa.rank.LV", "source.rankings.alexa.rank.LB", "source.rankings.alexa.rank.LS", "source.rankings.alexa.rank.LR", "source.rankings.alexa.rank.LY", "source.rankings.alexa.rank.LI", "source.rankings.alexa.rank.LT", "source.rankings.alexa.rank.LU", "source.rankings.alexa.rank.MO", "source.rankings.alexa.rank.MK", "source.rankings.alexa.rank.MG", "source.rankings.alexa.rank.MW", "source.rankings.alexa.rank.MY", "source.rankings.alexa.rank.MV", "source.rankings.alexa.rank.ML", "source.rankings.alexa.rank.MT", "source.rankings.alexa.rank.MH", "source.rankings.alexa.rank.MQ", "source.rankings.alexa.rank.MR", "source.rankings.alexa.rank.MU", "source.rankings.alexa.rank.YT", "source.rankings.alexa.rank.MX", "source.rankings.alexa.rank.FM", "source.rankings.alexa.rank.MD", "source.rankings.alexa.rank.MC", "source.rankings.alexa.rank.MN", "source.rankings.alexa.rank.ME", "source.rankings.alexa.rank.MS", "source.rankings.alexa.rank.MA", "source.rankings.alexa.rank.MZ", "source.rankings.alexa.rank.MM", "source.rankings.alexa.rank.NA", "source.rankings.alexa.rank.NR", "source.rankings.alexa.rank.NP", "source.rankings.alexa.rank.NL", "source.rankings.alexa.rank.NC", "source.rankings.alexa.rank.NZ", "source.rankings.alexa.rank.NI", "source.rankings.alexa.rank.NE", "source.rankings.alexa.rank.NG", "source.rankings.alexa.rank.NU", "source.rankings.alexa.rank.NF", "source.rankings.alexa.rank.MP", "source.rankings.alexa.rank.NO", "source.rankings.alexa.rank.OM", "source.rankings.alexa.rank.PK", "source.rankings.alexa.rank.PW", "source.rankings.alexa.rank.PS", "source.rankings.alexa.rank.PA", "source.rankings.alexa.rank.PG", "source.rankings.alexa.rank.PY", "source.rankings.alexa.rank.PE", "source.rankings.alexa.rank.PH", "source.rankings.alexa.rank.PN", "source.rankings.alexa.rank.PL", "source.rankings.alexa.rank.PT", "source.rankings.alexa.rank.PR", "source.rankings.alexa.rank.QA", "source.rankings.alexa.rank.RE", "source.rankings.alexa.rank.RO", "source.rankings.alexa.rank.RU", "source.rankings.alexa.rank.RW", "source.rankings.alexa.rank.BL", "source.rankings.alexa.rank.SH", "source.rankings.alexa.rank.KN", "source.rankings.alexa.rank.LC", "source.rankings.alexa.rank.MF", "source.rankings.alexa.rank.PM", "source.rankings.alexa.rank.VC", "source.rankings.alexa.rank.WS", "source.rankings.alexa.rank.SM", "source.rankings.alexa.rank.ST", "source.rankings.alexa.rank.SA", "source.rankings.alexa.rank.SN", "source.rankings.alexa.rank.RS", "source.rankings.alexa.rank.SC", "source.rankings.alexa.rank.SL", "source.rankings.alexa.rank.SG", "source.rankings.alexa.rank.SX", "source.rankings.alexa.rank.SK", "source.rankings.alexa.rank.SI", "source.rankings.alexa.rank.SB", "source.rankings.alexa.rank.SO", "source.rankings.alexa.rank.ZA", "source.rankings.alexa.rank.GS", "source.rankings.alexa.rank.SS", "source.rankings.alexa.rank.ES", "source.rankings.alexa.rank.LK", "source.rankings.alexa.rank.SD", "source.rankings.alexa.rank.SR", "source.rankings.alexa.rank.SJ", "source.rankings.alexa.rank.SZ", "source.rankings.alexa.rank.SE", "source.rankings.alexa.rank.CH", "source.rankings.alexa.rank.SY", "source.rankings.alexa.rank.TW", "source.rankings.alexa.rank.TJ", "source.rankings.alexa.rank.TZ", "source.rankings.alexa.rank.TH", "source.rankings.alexa.rank.TL", "source.rankings.alexa.rank.TG", "source.rankings.alexa.rank.TK", "source.rankings.alexa.rank.TO", "source.rankings.alexa.rank.TT", "source.rankings.alexa.rank.TN", "source.rankings.alexa.rank.TR", "source.rankings.alexa.rank.TM", "source.rankings.alexa.rank.TC", "source.rankings.alexa.rank.TV", "source.rankings.alexa.rank.UG", "source.rankings.alexa.rank.UA", "source.rankings.alexa.rank.AE", "source.rankings.alexa.rank.GB", "source.rankings.alexa.rank.US", "source.rankings.alexa.rank.UM", "source.rankings.alexa.rank.UY", "source.rankings.alexa.rank.UZ", "source.rankings.alexa.rank.VU", "source.rankings.alexa.rank.VE", "source.rankings.alexa.rank.VN", "source.rankings.alexa.rank.VG", "source.rankings.alexa.rank.VI", "source.rankings.alexa.rank.WF", "source.rankings.alexa.rank.EH", "source.rankings.alexa.rank.YE", "source.rankings.alexa.rank.ZM", "source.rankings.alexa.rank.ZW"]
  if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
    fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
  end
  allowable_values = ["asc", "desc"]
  if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
    fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_stories, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_stories, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/stories'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'!id'] = opts[:'not_id'] if !opts[:'not_id'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
  query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
  query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
  query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
  query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
  query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
  query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
  query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
  query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
  query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
  query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
  query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
  query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
  query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
  query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
  query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
  query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
  query_params[:'entities.id'] = opts[:'entities_id'] if !opts[:'entities_id'].nil?
  query_params[:'!entities.id'] = opts[:'not_entities_id'] if !opts[:'not_entities_id'].nil?
  query_params[:'entities.links.wikipedia'] = opts[:'entities_links_wikipedia'] if !opts[:'entities_links_wikipedia'].nil?
  query_params[:'!entities.links.wikipedia'] = opts[:'not_entities_links_wikipedia'] if !opts[:'not_entities_links_wikipedia'].nil?
  query_params[:'entities.links.wikidata'] = opts[:'entities_links_wikidata'] if !opts[:'entities_links_wikidata'].nil?
  query_params[:'!entities.links.wikidata'] = opts[:'not_entities_links_wikidata'] if !opts[:'not_entities_links_wikidata'].nil?
  query_params[:'entities.types'] = opts[:'entities_types'] if !opts[:'entities_types'].nil?
  query_params[:'!entities.types'] = opts[:'not_entities_types'] if !opts[:'not_entities_types'].nil?
  query_params[:'entities.stock_tickers'] = opts[:'entities_stock_tickers'] if !opts[:'entities_stock_tickers'].nil?
  query_params[:'!entities.body.stock_tickers'] = opts[:'entities_body_stock_tickers'] if !opts[:'entities_body_stock_tickers'].nil?
  query_params[:'entities.surface_forms.text'] = opts[:'entities_surface_forms_text'] if !opts[:'entities_surface_forms_text'].nil?
  query_params[:'!entities.surface_forms.text'] = opts[:'not_entities_surface_forms_text'] if !opts[:'not_entities_surface_forms_text'].nil?
  query_params[:'entities.title.surface_forms.text'] = opts[:'entities_title_surface_forms_text'] if !opts[:'entities_title_surface_forms_text'].nil?
  query_params[:'!entities.title.surface_forms.text'] = opts[:'not_entities_title_surface_forms_text'] if !opts[:'not_entities_title_surface_forms_text'].nil?
  query_params[:'entities.body.surface_forms.text'] = opts[:'entities_body_surface_forms_text'] if !opts[:'entities_body_surface_forms_text'].nil?
  query_params[:'!entities.body.surface_forms.text'] = opts[:'not_entities_body_surface_forms_text'] if !opts[:'not_entities_body_surface_forms_text'].nil?
  query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
  query_params[:'!sentiment.title.polarity'] = opts[:'not_sentiment_title_polarity'] if !opts[:'not_sentiment_title_polarity'].nil?
  query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
  query_params[:'!sentiment.body.polarity'] = opts[:'not_sentiment_body_polarity'] if !opts[:'not_sentiment_body_polarity'].nil?
  query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
  query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
  query_params[:'media.images.width.min'] = opts[:'media_images_width_min'] if !opts[:'media_images_width_min'].nil?
  query_params[:'media.images.width.max'] = opts[:'media_images_width_max'] if !opts[:'media_images_width_max'].nil?
  query_params[:'media.images.height.min'] = opts[:'media_images_height_min'] if !opts[:'media_images_height_min'].nil?
  query_params[:'media.images.height.max'] = opts[:'media_images_height_max'] if !opts[:'media_images_height_max'].nil?
  query_params[:'media.images.content_length.min'] = opts[:'media_images_content_length_min'] if !opts[:'media_images_content_length_min'].nil?
  query_params[:'media.images.content_length.max'] = opts[:'media_images_content_length_max'] if !opts[:'media_images_content_length_max'].nil?
  query_params[:'media.images.format'] = opts[:'media_images_format'] if !opts[:'media_images_format'].nil?
  query_params[:'!media.images.format'] = opts[:'not_media_images_format'] if !opts[:'not_media_images_format'].nil?
  query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
  query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
  query_params[:'author.id'] = opts[:'author_id'] if !opts[:'author_id'].nil?
  query_params[:'!author.id'] = opts[:'not_author_id'] if !opts[:'not_author_id'].nil?
  query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
  query_params[:'!author.name'] = opts[:'not_author_name'] if !opts[:'not_author_name'].nil?
  query_params[:'source.id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
  query_params[:'!source.id'] = opts[:'not_source_id'] if !opts[:'not_source_id'].nil?
  query_params[:'source.name'] = opts[:'source_name'] if !opts[:'source_name'].nil?
  query_params[:'!source.name'] = opts[:'not_source_name'] if !opts[:'not_source_name'].nil?
  query_params[:'source.domain'] = opts[:'source_domain'] if !opts[:'source_domain'].nil?
  query_params[:'!source.domain'] = opts[:'not_source_domain'] if !opts[:'not_source_domain'].nil?
  query_params[:'source.locations.country'] = opts[:'source_locations_country'] if !opts[:'source_locations_country'].nil?
  query_params[:'!source.locations.country'] = opts[:'not_source_locations_country'] if !opts[:'not_source_locations_country'].nil?
  query_params[:'source.locations.state'] = opts[:'source_locations_state'] if !opts[:'source_locations_state'].nil?
  query_params[:'!source.locations.state'] = opts[:'not_source_locations_state'] if !opts[:'not_source_locations_state'].nil?
  query_params[:'source.locations.city'] = opts[:'source_locations_city'] if !opts[:'source_locations_city'].nil?
  query_params[:'!source.locations.city'] = opts[:'not_source_locations_city'] if !opts[:'not_source_locations_city'].nil?
  query_params[:'source.scopes.country'] = opts[:'source_scopes_country'] if !opts[:'source_scopes_country'].nil?
  query_params[:'!source.scopes.country'] = opts[:'not_source_scopes_country'] if !opts[:'not_source_scopes_country'].nil?
  query_params[:'source.scopes.state'] = opts[:'source_scopes_state'] if !opts[:'source_scopes_state'].nil?
  query_params[:'!source.scopes.state'] = opts[:'not_source_scopes_state'] if !opts[:'not_source_scopes_state'].nil?
  query_params[:'source.scopes.city'] = opts[:'source_scopes_city'] if !opts[:'source_scopes_city'].nil?
  query_params[:'!source.scopes.city'] = opts[:'not_source_scopes_city'] if !opts[:'not_source_scopes_city'].nil?
  query_params[:'source.scopes.level'] = opts[:'source_scopes_level'] if !opts[:'source_scopes_level'].nil?
  query_params[:'!source.scopes.level'] = opts[:'not_source_scopes_level'] if !opts[:'not_source_scopes_level'].nil?
  query_params[:'source.links_in_count.min'] = opts[:'source_links_in_count_min'] if !opts[:'source_links_in_count_min'].nil?
  query_params[:'source.links_in_count.max'] = opts[:'source_links_in_count_max'] if !opts[:'source_links_in_count_max'].nil?
  query_params[:'source.rankings.alexa.rank.min'] = opts[:'source_rankings_alexa_rank_min'] if !opts[:'source_rankings_alexa_rank_min'].nil?
  query_params[:'source.rankings.alexa.rank.max'] = opts[:'source_rankings_alexa_rank_max'] if !opts[:'source_rankings_alexa_rank_max'].nil?
  query_params[:'source.rankings.alexa.country'] = opts[:'source_rankings_alexa_country'] if !opts[:'source_rankings_alexa_country'].nil?
  query_params[:'social_shares_count.facebook.min'] = opts[:'social_shares_count_facebook_min'] if !opts[:'social_shares_count_facebook_min'].nil?
  query_params[:'social_shares_count.facebook.max'] = opts[:'social_shares_count_facebook_max'] if !opts[:'social_shares_count_facebook_max'].nil?
  query_params[:'social_shares_count.google_plus.min'] = opts[:'social_shares_count_google_plus_min'] if !opts[:'social_shares_count_google_plus_min'].nil?
  query_params[:'social_shares_count.google_plus.max'] = opts[:'social_shares_count_google_plus_max'] if !opts[:'social_shares_count_google_plus_max'].nil?
  query_params[:'social_shares_count.linkedin.min'] = opts[:'social_shares_count_linkedin_min'] if !opts[:'social_shares_count_linkedin_min'].nil?
  query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
  query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
  query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
  query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
  query_params[:'return'] = opts[:'_return'] if !opts[:'_return'].nil?
  query_params[:'aql'] = opts[:'aql'] if !opts[:'aql'].nil?
  query_params[:'aql_default_field'] = opts[:'aql_default_field'] if !opts[:'aql_default_field'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Stories' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_stories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_time_series(opts = {}) ⇒ TimeSeriesList

List time series The time series endpoint allows you to track information contained in stories over time. This information can be anything from mentions of a topic or entities, sentiment about a topic, or the volume of stories published by a source, to name but a few. The full list of parameters is given below. Using the [Date Math Syntax](newsapi.aylien.com/docs/working-with-dates), you can easily set your query to return information from any time period, from the current point in time to when the News API started collecting stories. The returned information can be rounded to a time also specified by you, for example by setting the results into hourly, daily, or weekly data points.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories). (default to true)

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’)

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates). (default to ‘NOW-7DAYS/DAY’)

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates). (default to ‘NOW/DAY’)

  • :period (String)

    The size of each date range is expressed as an interval to be added to the lower bound. It supports Date Math Syntax. Valid options are &#x60;+&#x60; following an integer number greater than 0 and one of the Date Math keywords. e.g. &#x60;+1DAY&#x60;, &#x60;+2MINUTES&#x60; and &#x60;+1MONTH&#x60;. Here are [Supported keywords](newsapi.aylien.com/docs/working-with-dates#date-math). (default to ‘+1DAY’)

Returns:



2480
2481
2482
2483
# File 'lib/aylien_news_api/api/default_api.rb', line 2480

def list_time_series(opts = {})
  data, _status_code, _headers = list_time_series_with_http_info(opts)
  data
end

#list_time_series_with_http_info(opts = {}) ⇒ Array<(TimeSeriesList, Integer, Hash)>

List time series The time series endpoint allows you to track information contained in stories over time. This information can be anything from mentions of a topic or entities, sentiment about a topic, or the volume of stories published by a source, to name but a few. The full list of parameters is given below. Using the [Date Math Syntax](newsapi.aylien.com/docs/working-with-dates), you can easily set your query to return information from any time period, from the current point in time to when the News API started collecting stories. The returned information can be rounded to a time also specified by you, for example by setting the results into hourly, daily, or weekly data points.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query.

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :period (String)

    The size of each date range is expressed as an interval to be added to the lower bound. It supports Date Math Syntax. Valid options are &#x60;+&#x60; following an integer number greater than 0 and one of the Date Math keywords. e.g. &#x60;+1DAY&#x60;, &#x60;+2MINUTES&#x60; and &#x60;+1MONTH&#x60;. Here are [Supported keywords](newsapi.aylien.com/docs/working-with-dates#date-math).

Returns:

  • (Array<(TimeSeriesList, Integer, Hash)>)

    TimeSeriesList data, response status code and response headers



2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
# File 'lib/aylien_news_api/api/default_api.rb', line 2583

def list_time_series_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_time_series ...'
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"language\", must include one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'not_language'] && !opts[:'not_language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_language\", must include one of #{allowable_values}"
  end
  allowable_values = ["iab-qag", "iptc-subjectcode"]
  if @api_client.config.client_side_validation && opts[:'categories_taxonomy'] && !allowable_values.include?(opts[:'categories_taxonomy'])
    fail ArgumentError, "invalid value for \"categories_taxonomy\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_title_polarity'] && !allowable_values.include?(opts[:'sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_title_polarity'] && !allowable_values.include?(opts[:'not_sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_body_polarity'] && !allowable_values.include?(opts[:'sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_body_polarity'] && !allowable_values.include?(opts[:'not_sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'media_images_format'] && !opts[:'media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"media_images_format\", must include one of #{allowable_values}"
  end
  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'not_media_images_format'] && !opts[:'not_media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'source_scopes_level'] && !opts[:'source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"source_scopes_level\", must include one of #{allowable_values}"
  end
  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'not_source_scopes_level'] && !opts[:'not_source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_time_series, must be greater than 0.'
  end

  # resource path
  local_var_path = '/time_series'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'!id'] = opts[:'not_id'] if !opts[:'not_id'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
  query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
  query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
  query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
  query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
  query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
  query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
  query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
  query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
  query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
  query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
  query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
  query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
  query_params[:'entities.id'] = opts[:'entities_id'] if !opts[:'entities_id'].nil?
  query_params[:'!entities.id'] = opts[:'not_entities_id'] if !opts[:'not_entities_id'].nil?
  query_params[:'entities.links.wikipedia'] = opts[:'entities_links_wikipedia'] if !opts[:'entities_links_wikipedia'].nil?
  query_params[:'!entities.links.wikipedia'] = opts[:'not_entities_links_wikipedia'] if !opts[:'not_entities_links_wikipedia'].nil?
  query_params[:'entities.links.wikidata'] = opts[:'entities_links_wikidata'] if !opts[:'entities_links_wikidata'].nil?
  query_params[:'!entities.links.wikidata'] = opts[:'not_entities_links_wikidata'] if !opts[:'not_entities_links_wikidata'].nil?
  query_params[:'entities.types'] = opts[:'entities_types'] if !opts[:'entities_types'].nil?
  query_params[:'!entities.types'] = opts[:'not_entities_types'] if !opts[:'not_entities_types'].nil?
  query_params[:'entities.stock_tickers'] = opts[:'entities_stock_tickers'] if !opts[:'entities_stock_tickers'].nil?
  query_params[:'!entities.body.stock_tickers'] = opts[:'entities_body_stock_tickers'] if !opts[:'entities_body_stock_tickers'].nil?
  query_params[:'entities.surface_forms.text'] = opts[:'entities_surface_forms_text'] if !opts[:'entities_surface_forms_text'].nil?
  query_params[:'!entities.surface_forms.text'] = opts[:'not_entities_surface_forms_text'] if !opts[:'not_entities_surface_forms_text'].nil?
  query_params[:'entities.title.surface_forms.text'] = opts[:'entities_title_surface_forms_text'] if !opts[:'entities_title_surface_forms_text'].nil?
  query_params[:'!entities.title.surface_forms.text'] = opts[:'not_entities_title_surface_forms_text'] if !opts[:'not_entities_title_surface_forms_text'].nil?
  query_params[:'entities.body.surface_forms.text'] = opts[:'entities_body_surface_forms_text'] if !opts[:'entities_body_surface_forms_text'].nil?
  query_params[:'!entities.body.surface_forms.text'] = opts[:'not_entities_body_surface_forms_text'] if !opts[:'not_entities_body_surface_forms_text'].nil?
  query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
  query_params[:'!sentiment.title.polarity'] = opts[:'not_sentiment_title_polarity'] if !opts[:'not_sentiment_title_polarity'].nil?
  query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
  query_params[:'!sentiment.body.polarity'] = opts[:'not_sentiment_body_polarity'] if !opts[:'not_sentiment_body_polarity'].nil?
  query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
  query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
  query_params[:'media.images.width.min'] = opts[:'media_images_width_min'] if !opts[:'media_images_width_min'].nil?
  query_params[:'media.images.width.max'] = opts[:'media_images_width_max'] if !opts[:'media_images_width_max'].nil?
  query_params[:'media.images.height.min'] = opts[:'media_images_height_min'] if !opts[:'media_images_height_min'].nil?
  query_params[:'media.images.height.max'] = opts[:'media_images_height_max'] if !opts[:'media_images_height_max'].nil?
  query_params[:'media.images.content_length.min'] = opts[:'media_images_content_length_min'] if !opts[:'media_images_content_length_min'].nil?
  query_params[:'media.images.content_length.max'] = opts[:'media_images_content_length_max'] if !opts[:'media_images_content_length_max'].nil?
  query_params[:'media.images.format'] = opts[:'media_images_format'] if !opts[:'media_images_format'].nil?
  query_params[:'!media.images.format'] = opts[:'not_media_images_format'] if !opts[:'not_media_images_format'].nil?
  query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
  query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
  query_params[:'author.id'] = opts[:'author_id'] if !opts[:'author_id'].nil?
  query_params[:'!author.id'] = opts[:'not_author_id'] if !opts[:'not_author_id'].nil?
  query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
  query_params[:'!author.name'] = opts[:'not_author_name'] if !opts[:'not_author_name'].nil?
  query_params[:'source.id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
  query_params[:'!source.id'] = opts[:'not_source_id'] if !opts[:'not_source_id'].nil?
  query_params[:'source.name'] = opts[:'source_name'] if !opts[:'source_name'].nil?
  query_params[:'!source.name'] = opts[:'not_source_name'] if !opts[:'not_source_name'].nil?
  query_params[:'source.domain'] = opts[:'source_domain'] if !opts[:'source_domain'].nil?
  query_params[:'!source.domain'] = opts[:'not_source_domain'] if !opts[:'not_source_domain'].nil?
  query_params[:'source.locations.country'] = opts[:'source_locations_country'] if !opts[:'source_locations_country'].nil?
  query_params[:'!source.locations.country'] = opts[:'not_source_locations_country'] if !opts[:'not_source_locations_country'].nil?
  query_params[:'source.locations.state'] = opts[:'source_locations_state'] if !opts[:'source_locations_state'].nil?
  query_params[:'!source.locations.state'] = opts[:'not_source_locations_state'] if !opts[:'not_source_locations_state'].nil?
  query_params[:'source.locations.city'] = opts[:'source_locations_city'] if !opts[:'source_locations_city'].nil?
  query_params[:'!source.locations.city'] = opts[:'not_source_locations_city'] if !opts[:'not_source_locations_city'].nil?
  query_params[:'source.scopes.country'] = opts[:'source_scopes_country'] if !opts[:'source_scopes_country'].nil?
  query_params[:'!source.scopes.country'] = opts[:'not_source_scopes_country'] if !opts[:'not_source_scopes_country'].nil?
  query_params[:'source.scopes.state'] = opts[:'source_scopes_state'] if !opts[:'source_scopes_state'].nil?
  query_params[:'!source.scopes.state'] = opts[:'not_source_scopes_state'] if !opts[:'not_source_scopes_state'].nil?
  query_params[:'source.scopes.city'] = opts[:'source_scopes_city'] if !opts[:'source_scopes_city'].nil?
  query_params[:'!source.scopes.city'] = opts[:'not_source_scopes_city'] if !opts[:'not_source_scopes_city'].nil?
  query_params[:'source.scopes.level'] = opts[:'source_scopes_level'] if !opts[:'source_scopes_level'].nil?
  query_params[:'!source.scopes.level'] = opts[:'not_source_scopes_level'] if !opts[:'not_source_scopes_level'].nil?
  query_params[:'source.links_in_count.min'] = opts[:'source_links_in_count_min'] if !opts[:'source_links_in_count_min'].nil?
  query_params[:'source.links_in_count.max'] = opts[:'source_links_in_count_max'] if !opts[:'source_links_in_count_max'].nil?
  query_params[:'source.rankings.alexa.rank.min'] = opts[:'source_rankings_alexa_rank_min'] if !opts[:'source_rankings_alexa_rank_min'].nil?
  query_params[:'source.rankings.alexa.rank.max'] = opts[:'source_rankings_alexa_rank_max'] if !opts[:'source_rankings_alexa_rank_max'].nil?
  query_params[:'source.rankings.alexa.country'] = opts[:'source_rankings_alexa_country'] if !opts[:'source_rankings_alexa_country'].nil?
  query_params[:'social_shares_count.facebook.min'] = opts[:'social_shares_count_facebook_min'] if !opts[:'social_shares_count_facebook_min'].nil?
  query_params[:'social_shares_count.facebook.max'] = opts[:'social_shares_count_facebook_max'] if !opts[:'social_shares_count_facebook_max'].nil?
  query_params[:'social_shares_count.google_plus.min'] = opts[:'social_shares_count_google_plus_min'] if !opts[:'social_shares_count_google_plus_min'].nil?
  query_params[:'social_shares_count.google_plus.max'] = opts[:'social_shares_count_google_plus_max'] if !opts[:'social_shares_count_google_plus_max'].nil?
  query_params[:'social_shares_count.linkedin.min'] = opts[:'social_shares_count_linkedin_min'] if !opts[:'social_shares_count_linkedin_min'].nil?
  query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
  query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
  query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
  query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
  query_params[:'aql'] = opts[:'aql'] if !opts[:'aql'].nil?
  query_params[:'aql_default_field'] = opts[:'aql_default_field'] if !opts[:'aql_default_field'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
  query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TimeSeriesList' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_time_series\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

List trends The trends endpoint allows you to identify the most-mentioned entities, concepts and keywords relevant to your query. For example, this endpoint allows you to set parameters like a time period, a subject category, or an entity, and your request will return the most mentioned entities or keywords that are mentioned in relation to your query.

Parameters:

  • field (String)

    This parameter is used to specify the trend field.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories). (default to true)

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’)

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

Returns:



2952
2953
2954
2955
# File 'lib/aylien_news_api/api/default_api.rb', line 2952

def list_trends(field, opts = {})
  data, _status_code, _headers = list_trends_with_http_info(field, opts)
  data
end

List trends The trends endpoint allows you to identify the most-mentioned entities, concepts and keywords relevant to your query. For example, this endpoint allows you to set parameters like a time period, a subject category, or an entity, and your request will return the most mentioned entities or keywords that are mentioned in relation to your query.

Parameters:

  • field (String)

    This parameter is used to specify the trend field.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (Array<Integer>)

    This parameter is used for finding stories by story id.

  • :not_id (Array<Integer>)

    This parameter is used for excluding stories by story id.

  • :title (String)

    This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :body (String)

    This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :text (String)

    This parameter is used for finding stories whose title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_title (String)

    This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_body (String)

    This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :translations_en_text (String)

    This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators).

  • :links_permalink (Array<String>)

    This parameter is used to find stories based on their url.

  • :not_links_permalink (Array<String>)

    This parameter is used to exclude stories based on their url.

  • :language (Array<String>)

    This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :not_language (Array<String>)

    This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.

  • :published_at_start (String)

    This parameter is used for finding stories whose published at time is greater than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :published_at_end (String)

    This parameter is used for finding stories whose published at time is less than the specified value. [Here](newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](newsapi.aylien.com/docs/working-with-dates).

  • :categories_taxonomy (String)

    This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_confident (Boolean)

    This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_id (Array<String>)

    This parameter is used for finding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_id (Array<String>)

    This parameter is used for excluding stories by categories id. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_label (Array<String>)

    This parameter is used for finding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_label (Array<String>)

    This parameter is used for excluding stories by categories label. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :categories_level (Array<Integer>)

    This parameter is used for finding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :not_categories_level (Array<Integer>)

    This parameter is used for excluding stories by categories level. You can read more about working with categories [here](newsapi.aylien.com/docs/working-with-categories).

  • :entities_id (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_id (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;id&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikipedia (Array<String>)

    This parameter is used to find stories based on the specified entities wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikipedia (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikipedia URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_links_wikidata (Array<String>)

    This parameter is used to find stories based on the specified entities wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_links_wikidata (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s Wikidata URL. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_types (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_types (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;types&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_stock_tickers (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;stock_tickers&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_stock_tickers (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;stock_tickers&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60;. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_title_surface_forms_text (String)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_title_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in story titles. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :entities_body_surface_forms_text (Array<String>)

    This parameter is used to find stories based on the specified entities &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :not_entities_body_surface_forms_text (Array<String>)

    This parameter is used to exclude stories based on the specified entity&#39;s &#x60;surface_form&#x60; in the body of stories. You can read more about working with entities [here](newsapi.aylien.com/docs/working-with-entities).

  • :sentiment_title_polarity (String)

    This parameter is used for finding stories whose title sentiment is the specified value.

  • :not_sentiment_title_polarity (String)

    This parameter is used for excluding stories whose title sentiment is the specified value.

  • :sentiment_body_polarity (String)

    This parameter is used for finding stories whose body sentiment is the specified value.

  • :not_sentiment_body_polarity (String)

    This parameter is used for excluding stories whose body sentiment is the specified value.

  • :media_images_count_min (Integer)

    This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

  • :media_images_count_max (Integer)

    This parameter is used for finding stories whose number of images is less than or equal to the specified value.

  • :media_images_width_min (Integer)

    This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

  • :media_images_width_max (Integer)

    This parameter is used for finding stories whose width of images are less than or equal to the specified value.

  • :media_images_height_min (Integer)

    This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

  • :media_images_height_max (Integer)

    This parameter is used for finding stories whose height of images are less than or equal to the specified value.

  • :media_images_content_length_min (Integer)

    This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

  • :media_images_content_length_max (Integer)

    This parameter is used for finding stories whose images content length are less than or equal to the specified value.

  • :media_images_format (Array<String>)

    This parameter is used for finding stories whose images format are the specified value.

  • :not_media_images_format (Array<String>)

    This parameter is used for excluding stories whose images format are the specified value.

  • :media_videos_count_min (Integer)

    This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

  • :media_videos_count_max (Integer)

    This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

  • :author_id (Array<Integer>)

    This parameter is used for finding stories whose author id is the specified value.

  • :not_author_id (Array<Integer>)

    This parameter is used for excluding stories whose author id is the specified value.

  • :author_name (String)

    This parameter is used for finding stories whose author full name contains the specified value.

  • :not_author_name (String)

    This parameter is used for excluding stories whose author full name contains the specified value.

  • :source_id (Array<Integer>)

    This parameter is used for finding stories whose source id is the specified value.

  • :not_source_id (Array<Integer>)

    This parameter is used for excluding stories whose source id is the specified value.

  • :source_name (Array<String>)

    This parameter is used for finding stories whose source name contains the specified value.

  • :not_source_name (Array<String>)

    This parameter is used for excluding stories whose source name contains the specified value.

  • :source_domain (Array<String>)

    This parameter is used for finding stories whose source domain is the specified value.

  • :not_source_domain (Array<String>)

    This parameter is used for excluding stories whose source domain is the specified value.

  • :source_locations_country (Array<String>)

    This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_country (Array<String>)

    This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_state (Array<String>)

    This parameter is used for finding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_state (Array<String>)

    This parameter is used for excluding stories whose source state/province is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_locations_city (Array<String>)

    This parameter is used for finding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_locations_city (Array<String>)

    This parameter is used for excluding stories whose source city is the specified value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_country (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_country (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_state (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_state (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_city (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_city (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified city value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_scopes_level (Array<String>)

    This parameter is used for finding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :not_source_scopes_level (Array<String>)

    This parameter is used for excluding stories whose source scopes is the specified level value. [Here](newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](newsapi.aylien.com/docs/working-with-locations).

  • :source_links_in_count_min (Integer)

    This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_links_in_count_max (Integer)

    This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](newsapi.aylien.com/docs/working-with-links-in-count).

  • :source_rankings_alexa_rank_min (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_rank_max (Integer)

    This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :source_rankings_alexa_country (Array<String>)

    This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](newsapi.aylien.com/docs/working-with-alexa-ranks).

  • :social_shares_count_facebook_min (Integer)

    This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

  • :social_shares_count_facebook_max (Integer)

    This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

  • :social_shares_count_google_plus_min (Integer)

    This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

  • :social_shares_count_google_plus_max (Integer)

    This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

  • :social_shares_count_linkedin_min (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

  • :social_shares_count_linkedin_max (Integer)

    This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

  • :social_shares_count_reddit_min (Integer)

    This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

  • :social_shares_count_reddit_max (Integer)

    This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

  • :clusters (Array<String>)

    This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](newsapi.aylien.com/docs/working-with-clustering).

  • :aql (String)

    This parameter is used to supply a query in AYLIEN Query Language.

  • :aql_default_field (String)

    This parameter is used to supply an optional default field name used in the AQL query.

  • :query (String)

    This parameter is used to make an advanced query using $and, $or, $not logical operators and $eq for exact match, $text for a text search and $lt, $gt, $lte, $gte for range queries. value must be a json string.

Returns:

  • (Array<(Trends, Integer, Hash)>)

    Trends data, response status code and response headers



3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
# File 'lib/aylien_news_api/api/default_api.rb', line 3057

def list_trends_with_http_info(field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_trends ...'
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling DefaultApi.list_trends"
  end
  # verify enum value
  allowable_values = ["author.name", "source.name", "source.domain", "keywords", "entities.id", "entities.surface_forms.text", "entities.links.wikipedia", "entities.links.wikidata", "entities.title.surface_forms.text", "entities.body.surface_forms.text", "hashtags", "categories.id", "sentiment.title.polarity", "sentiment.body.polarity", "clusters"]
  if @api_client.config.client_side_validation && !allowable_values.include?(field)
    fail ArgumentError, "invalid value for \"field\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"language\", must include one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "it", "es", "pt"]
  if @api_client.config.client_side_validation && opts[:'not_language'] && !opts[:'not_language'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_language\", must include one of #{allowable_values}"
  end
  allowable_values = ["iab-qag", "iptc-subjectcode"]
  if @api_client.config.client_side_validation && opts[:'categories_taxonomy'] && !allowable_values.include?(opts[:'categories_taxonomy'])
    fail ArgumentError, "invalid value for \"categories_taxonomy\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_title_polarity'] && !allowable_values.include?(opts[:'sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_title_polarity'] && !allowable_values.include?(opts[:'not_sentiment_title_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_title_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'sentiment_body_polarity'] && !allowable_values.include?(opts[:'sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  allowable_values = ["positive", "neutral", "negative"]
  if @api_client.config.client_side_validation && opts[:'not_sentiment_body_polarity'] && !allowable_values.include?(opts[:'not_sentiment_body_polarity'])
    fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'media_images_format'] && !opts[:'media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"media_images_format\", must include one of #{allowable_values}"
  end
  allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
  if @api_client.config.client_side_validation && opts[:'not_media_images_format'] && !opts[:'not_media_images_format'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'source_scopes_level'] && !opts[:'source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"source_scopes_level\", must include one of #{allowable_values}"
  end
  allowable_values = ["international", "national", "local"]
  if @api_client.config.client_side_validation && opts[:'not_source_scopes_level'] && !opts[:'not_source_scopes_level'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
    fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_trends, must be greater than 0.'
  end

  # resource path
  local_var_path = '/trends'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'field'] = field
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'!id'] = opts[:'not_id'] if !opts[:'not_id'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
  query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
  query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
  query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
  query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
  query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
  query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
  query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
  query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
  query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
  query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
  query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
  query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
  query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
  query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
  query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
  query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
  query_params[:'entities.id'] = opts[:'entities_id'] if !opts[:'entities_id'].nil?
  query_params[:'!entities.id'] = opts[:'not_entities_id'] if !opts[:'not_entities_id'].nil?
  query_params[:'entities.links.wikipedia'] = opts[:'entities_links_wikipedia'] if !opts[:'entities_links_wikipedia'].nil?
  query_params[:'!entities.links.wikipedia'] = opts[:'not_entities_links_wikipedia'] if !opts[:'not_entities_links_wikipedia'].nil?
  query_params[:'entities.links.wikidata'] = opts[:'entities_links_wikidata'] if !opts[:'entities_links_wikidata'].nil?
  query_params[:'!entities.links.wikidata'] = opts[:'not_entities_links_wikidata'] if !opts[:'not_entities_links_wikidata'].nil?
  query_params[:'entities.types'] = opts[:'entities_types'] if !opts[:'entities_types'].nil?
  query_params[:'!entities.types'] = opts[:'not_entities_types'] if !opts[:'not_entities_types'].nil?
  query_params[:'entities.stock_tickers'] = opts[:'entities_stock_tickers'] if !opts[:'entities_stock_tickers'].nil?
  query_params[:'!entities.body.stock_tickers'] = opts[:'entities_body_stock_tickers'] if !opts[:'entities_body_stock_tickers'].nil?
  query_params[:'entities.surface_forms.text'] = opts[:'entities_surface_forms_text'] if !opts[:'entities_surface_forms_text'].nil?
  query_params[:'!entities.surface_forms.text'] = opts[:'not_entities_surface_forms_text'] if !opts[:'not_entities_surface_forms_text'].nil?
  query_params[:'entities.title.surface_forms.text'] = opts[:'entities_title_surface_forms_text'] if !opts[:'entities_title_surface_forms_text'].nil?
  query_params[:'!entities.title.surface_forms.text'] = opts[:'not_entities_title_surface_forms_text'] if !opts[:'not_entities_title_surface_forms_text'].nil?
  query_params[:'entities.body.surface_forms.text'] = opts[:'entities_body_surface_forms_text'] if !opts[:'entities_body_surface_forms_text'].nil?
  query_params[:'!entities.body.surface_forms.text'] = opts[:'not_entities_body_surface_forms_text'] if !opts[:'not_entities_body_surface_forms_text'].nil?
  query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
  query_params[:'!sentiment.title.polarity'] = opts[:'not_sentiment_title_polarity'] if !opts[:'not_sentiment_title_polarity'].nil?
  query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
  query_params[:'!sentiment.body.polarity'] = opts[:'not_sentiment_body_polarity'] if !opts[:'not_sentiment_body_polarity'].nil?
  query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
  query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
  query_params[:'media.images.width.min'] = opts[:'media_images_width_min'] if !opts[:'media_images_width_min'].nil?
  query_params[:'media.images.width.max'] = opts[:'media_images_width_max'] if !opts[:'media_images_width_max'].nil?
  query_params[:'media.images.height.min'] = opts[:'media_images_height_min'] if !opts[:'media_images_height_min'].nil?
  query_params[:'media.images.height.max'] = opts[:'media_images_height_max'] if !opts[:'media_images_height_max'].nil?
  query_params[:'media.images.content_length.min'] = opts[:'media_images_content_length_min'] if !opts[:'media_images_content_length_min'].nil?
  query_params[:'media.images.content_length.max'] = opts[:'media_images_content_length_max'] if !opts[:'media_images_content_length_max'].nil?
  query_params[:'media.images.format'] = opts[:'media_images_format'] if !opts[:'media_images_format'].nil?
  query_params[:'!media.images.format'] = opts[:'not_media_images_format'] if !opts[:'not_media_images_format'].nil?
  query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
  query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
  query_params[:'author.id'] = opts[:'author_id'] if !opts[:'author_id'].nil?
  query_params[:'!author.id'] = opts[:'not_author_id'] if !opts[:'not_author_id'].nil?
  query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
  query_params[:'!author.name'] = opts[:'not_author_name'] if !opts[:'not_author_name'].nil?
  query_params[:'source.id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
  query_params[:'!source.id'] = opts[:'not_source_id'] if !opts[:'not_source_id'].nil?
  query_params[:'source.name'] = opts[:'source_name'] if !opts[:'source_name'].nil?
  query_params[:'!source.name'] = opts[:'not_source_name'] if !opts[:'not_source_name'].nil?
  query_params[:'source.domain'] = opts[:'source_domain'] if !opts[:'source_domain'].nil?
  query_params[:'!source.domain'] = opts[:'not_source_domain'] if !opts[:'not_source_domain'].nil?
  query_params[:'source.locations.country'] = opts[:'source_locations_country'] if !opts[:'source_locations_country'].nil?
  query_params[:'!source.locations.country'] = opts[:'not_source_locations_country'] if !opts[:'not_source_locations_country'].nil?
  query_params[:'source.locations.state'] = opts[:'source_locations_state'] if !opts[:'source_locations_state'].nil?
  query_params[:'!source.locations.state'] = opts[:'not_source_locations_state'] if !opts[:'not_source_locations_state'].nil?
  query_params[:'source.locations.city'] = opts[:'source_locations_city'] if !opts[:'source_locations_city'].nil?
  query_params[:'!source.locations.city'] = opts[:'not_source_locations_city'] if !opts[:'not_source_locations_city'].nil?
  query_params[:'source.scopes.country'] = opts[:'source_scopes_country'] if !opts[:'source_scopes_country'].nil?
  query_params[:'!source.scopes.country'] = opts[:'not_source_scopes_country'] if !opts[:'not_source_scopes_country'].nil?
  query_params[:'source.scopes.state'] = opts[:'source_scopes_state'] if !opts[:'source_scopes_state'].nil?
  query_params[:'!source.scopes.state'] = opts[:'not_source_scopes_state'] if !opts[:'not_source_scopes_state'].nil?
  query_params[:'source.scopes.city'] = opts[:'source_scopes_city'] if !opts[:'source_scopes_city'].nil?
  query_params[:'!source.scopes.city'] = opts[:'not_source_scopes_city'] if !opts[:'not_source_scopes_city'].nil?
  query_params[:'source.scopes.level'] = opts[:'source_scopes_level'] if !opts[:'source_scopes_level'].nil?
  query_params[:'!source.scopes.level'] = opts[:'not_source_scopes_level'] if !opts[:'not_source_scopes_level'].nil?
  query_params[:'source.links_in_count.min'] = opts[:'source_links_in_count_min'] if !opts[:'source_links_in_count_min'].nil?
  query_params[:'source.links_in_count.max'] = opts[:'source_links_in_count_max'] if !opts[:'source_links_in_count_max'].nil?
  query_params[:'source.rankings.alexa.rank.min'] = opts[:'source_rankings_alexa_rank_min'] if !opts[:'source_rankings_alexa_rank_min'].nil?
  query_params[:'source.rankings.alexa.rank.max'] = opts[:'source_rankings_alexa_rank_max'] if !opts[:'source_rankings_alexa_rank_max'].nil?
  query_params[:'source.rankings.alexa.country'] = opts[:'source_rankings_alexa_country'] if !opts[:'source_rankings_alexa_country'].nil?
  query_params[:'social_shares_count.facebook.min'] = opts[:'social_shares_count_facebook_min'] if !opts[:'social_shares_count_facebook_min'].nil?
  query_params[:'social_shares_count.facebook.max'] = opts[:'social_shares_count_facebook_max'] if !opts[:'social_shares_count_facebook_max'].nil?
  query_params[:'social_shares_count.google_plus.min'] = opts[:'social_shares_count_google_plus_min'] if !opts[:'social_shares_count_google_plus_min'].nil?
  query_params[:'social_shares_count.google_plus.max'] = opts[:'social_shares_count_google_plus_max'] if !opts[:'social_shares_count_google_plus_max'].nil?
  query_params[:'social_shares_count.linkedin.min'] = opts[:'social_shares_count_linkedin_min'] if !opts[:'social_shares_count_linkedin_min'].nil?
  query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
  query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
  query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
  query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
  query_params[:'aql'] = opts[:'aql'] if !opts[:'aql'].nil?
  query_params[:'aql_default_field'] = opts[:'aql_default_field'] if !opts[:'aql_default_field'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Trends' 

  # auth_names
  auth_names = opts[:auth_names] || ['app_id', 'app_key']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list_trends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end