class AylienNewsApi::DefaultApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/aylien_news_api/api/default_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

advanced_list_stories(unknown_base_type, opts = {}) click to toggle source

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. @param unknown_base_type [UNKNOWN_BASE_TYPE] /stories body schema to perform an advanced search with logical operators and nested objects. @param [Hash] opts the optional parameters @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [Array<String>] :_return This parameter is used for specifying return fields. @option opts [String] :sort_by 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’) @option opts [String] :sort_direction 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’) @option opts [String] :cursor 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 ‘*’) @option opts [Integer] :per_page 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) @return [Stories]

# 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 = {}) click to toggle source

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. @param unknown_base_type [UNKNOWN_BASE_TYPE] /stories body schema to perform an advanced search with logical operators and nested objects. @param [Hash] opts the optional parameters @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [Array<String>] :_return This parameter is used for specifying return fields. @option opts [String] :sort_by 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). @option opts [String] :sort_direction 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). @option opts [String] :cursor 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). @option opts [Integer] :per_page 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) @return [Array<(Stories, Integer, Hash)>] Stories data, response status code and response headers

# 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 = {}) click to toggle source

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. @param type [String] This parameter is used for defining the type of autocompletes. @param term [String] This parameter is used for finding autocomplete objects that contain the specified value. @param [Hash] opts the optional parameters @option opts [String] :language 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’) @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 3) @return [Autocompletes]

# 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 = {}) click to toggle source

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. @param type [String] This parameter is used for defining the type of autocompletes. @param term [String] This parameter is used for finding autocomplete objects that contain the specified value. @param [Hash] opts the optional parameters @option opts [String] :language 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. @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. @return [Array<(Autocompletes, Integer, Hash)>] Autocompletes data, response status code and response headers

# 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 = {}) click to toggle source

List Clusters The clusters endpoint is used to return clusters based on parameters you set in your query. @param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding clusters by cluster id. @option opts [Array<Integer>] :not_id This parameter is used for excluding clusters by cluster id. @option opts [Integer] :story_count_min This parameter is used for finding clusters with more than or equal to a specific amount of stories associated with them. @option opts [Integer] :story_count_max This parameter is used for finding clusters with less than or equal to a specific amount of stories associated with them. @option opts [String] :time_start This parameter is used for finding clusters whose creation 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). @option opts [String] :time_end This parameter is used for finding clusters whose creation 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). @option opts [String] :earliest_story_start This parameter is used for finding clusters whose publication date of its earliest story 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). @option opts [String] :earliest_story_end This parameter is used for finding clusters whose publication date of its earliest story 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). @option opts [String] :latest_story_start This parameter is used for finding clusters whose publication date of its latest story 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). @option opts [String] :latest_story_end This parameter is used for finding clusters whose publication date of its latest story 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). @option opts [Array<String>] :location_country This parameter is used for finding clusters belonging to a specific country. 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). @option opts [Array<String>] :not_location_country This parameter is used for excluding clusters belonging to a specific country. 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). @option opts [Array<String>] :_return This parameter is used for specifying return fields. @option opts [String] :sort_by 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’) @option opts [String] :sort_direction 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’) @option opts [String] :cursor 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 ‘*’) @option opts [Integer] :per_page 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) @return [Clusters]

# 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 = {}) click to toggle source

List Clusters The clusters endpoint is used to return clusters based on parameters you set in your query. @param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding clusters by cluster id. @option opts [Array<Integer>] :not_id This parameter is used for excluding clusters by cluster id. @option opts [Integer] :story_count_min This parameter is used for finding clusters with more than or equal to a specific amount of stories associated with them. @option opts [Integer] :story_count_max This parameter is used for finding clusters with less than or equal to a specific amount of stories associated with them. @option opts [String] :time_start This parameter is used for finding clusters whose creation 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). @option opts [String] :time_end This parameter is used for finding clusters whose creation 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). @option opts [String] :earliest_story_start This parameter is used for finding clusters whose publication date of its earliest story 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). @option opts [String] :earliest_story_end This parameter is used for finding clusters whose publication date of its earliest story 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). @option opts [String] :latest_story_start This parameter is used for finding clusters whose publication date of its latest story 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). @option opts [String] :latest_story_end This parameter is used for finding clusters whose publication date of its latest story 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). @option opts [Array<String>] :location_country This parameter is used for finding clusters belonging to a specific country. 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). @option opts [Array<String>] :not_location_country This parameter is used for excluding clusters belonging to a specific country. 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). @option opts [Array<String>] :_return This parameter is used for specifying return fields. @option opts [String] :sort_by 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). @option opts [String] :sort_direction 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). @option opts [String] :cursor 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). @option opts [Integer] :per_page 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) @return [Array<(Clusters, Integer, Hash)>] Clusters data, response status code and response headers

# 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 = {}) click to toggle source

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. @param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding stories by story id. @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id. @option opts [String] :title This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :body This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :text 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). @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_text 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). @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url. @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url. @option opts [Array<String>] :language 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. @option opts [Array<String>] :not_language 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. @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [String] :categories_taxonomy 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). @option opts [Boolean] :categories_confident 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) @option opts [Array<String>] :categories_id 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). @option opts [Array<String>] :not_categories_id 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). @option opts [Array<String>] :categories_label 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). @option opts [Array<String>] :not_categories_label 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). @option opts [Array<Integer>] :categories_level 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). @option opts [Array<Integer>] :not_categories_level 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). @option opts [Array<String>] :entities_id 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). @option opts [Array<String>] :not_entities_id 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). @option opts [Array<String>] :entities_links_wikipedia 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). @option opts [Array<String>] :not_entities_links_wikipedia 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). @option opts [Array<String>] :entities_links_wikidata 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). @option opts [Array<String>] :not_entities_links_wikidata 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). @option opts [Array<String>] :entities_types 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). @option opts [Array<String>] :not_entities_types 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). @option opts [Array<String>] :entities_stock_tickers 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). @option opts [Array<String>] :entities_body_stock_tickers 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). @option opts [Array<String>] :entities_surface_forms_text 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). @option opts [Array<String>] :not_entities_surface_forms_text 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). @option opts [String] :entities_title_surface_forms_text 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). @option opts [Array<String>] :not_entities_title_surface_forms_text 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). @option opts [Array<String>] :entities_body_surface_forms_text 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). @option opts [Array<String>] :not_entities_body_surface_forms_text 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). @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value. @option opts [String] :not_sentiment_title_polarity This parameter is used for excluding stories whose title sentiment is the specified value. @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value. @option opts [String] :not_sentiment_body_polarity This parameter is used for excluding stories whose body sentiment is the specified value. @option opts [Integer] :media_images_count_min This parameter is used for finding stories whose number of images is greater than or equal to the specified value. @option opts [Integer] :media_images_count_max This parameter is used for finding stories whose number of images is less than or equal to the specified value. @option opts [Integer] :media_images_width_min This parameter is used for finding stories whose width of images are greater than or equal to the specified value. @option opts [Integer] :media_images_width_max This parameter is used for finding stories whose width of images are less than or equal to the specified value. @option opts [Integer] :media_images_height_min This parameter is used for finding stories whose height of images are greater than or equal to the specified value. @option opts [Integer] :media_images_height_max This parameter is used for finding stories whose height of images are less than or equal to the specified value. @option opts [Integer] :media_images_content_length_min This parameter is used for finding stories whose images content length are greater than or equal to the specified value. @option opts [Integer] :media_images_content_length_max This parameter is used for finding stories whose images content length are less than or equal to the specified value. @option opts [Array<String>] :media_images_format This parameter is used for finding stories whose images format are the specified value. @option opts [Array<String>] :not_media_images_format This parameter is used for excluding stories whose images format are the specified value. @option opts [Integer] :media_videos_count_min This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. @option opts [Integer] :media_videos_count_max This parameter is used for finding stories whose number of videos is less than or equal to the specified value. @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value. @option opts [Array<Integer>] :not_author_id This parameter is used for excluding stories whose author id is the specified value. @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value. @option opts [String] :not_author_name This parameter is used for excluding stories whose author full name contains the specified value. @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value. @option opts [Array<Integer>] :not_source_id This parameter is used for excluding stories whose source id is the specified value. @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value. @option opts [Array<String>] :not_source_name This parameter is used for excluding stories whose source name contains the specified value. @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value. @option opts [Array<String>] :not_source_domain This parameter is used for excluding stories whose source domain is the specified value. @option opts [Array<String>] :source_locations_country 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). @option opts [Array<String>] :not_source_locations_country 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). @option opts [Array<String>] :source_locations_state 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). @option opts [Array<String>] :not_source_locations_state 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). @option opts [Array<String>] :source_locations_city 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). @option opts [Array<String>] :not_source_locations_city 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). @option opts [Array<String>] :source_scopes_country 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). @option opts [Array<String>] :not_source_scopes_country 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). @option opts [Array<String>] :source_scopes_state 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). @option opts [Array<String>] :not_source_scopes_state 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). @option opts [Array<String>] :source_scopes_city 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). @option opts [Array<String>] :not_source_scopes_city 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). @option opts [Array<String>] :source_scopes_level 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). @option opts [Array<String>] :not_source_scopes_level 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). @option opts [Integer] :source_links_in_count_min 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). @option opts [Integer] :source_links_in_count_max 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). @option opts [Integer] :source_rankings_alexa_rank_min 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). @option opts [Integer] :source_rankings_alexa_rank_max 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). @option opts [Array<String>] :source_rankings_alexa_country 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). @option opts [Integer] :social_shares_count_facebook_min This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_facebook_max This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_min This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_max This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_min This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. @option opts [Array<String>] :clusters 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). @option opts [String] :aql This parameter is used to supply a query in AYLIEN Query Language. @option opts [String] :aql_default_field This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’) @option opts [String] :query 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. @option opts [Integer] :interval_start This parameter is used for setting the start data point of histogram intervals. @option opts [Integer] :interval_end This parameter is used for setting the end data point of histogram intervals. @option opts [Integer] :interval_width This parameter is used for setting the width of histogram intervals. @option opts [String] :field This parameter is used for specifying the y-axis variable for the histogram. (default to ‘social_shares_count’) @return [Histograms]

# 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 = {}) click to toggle source

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. @param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding stories by story id. @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id. @option opts [String] :title This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :body This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :text 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). @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_text 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). @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url. @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url. @option opts [Array<String>] :language 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. @option opts [Array<String>] :not_language 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. @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [String] :categories_taxonomy 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). @option opts [Boolean] :categories_confident 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). @option opts [Array<String>] :categories_id 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). @option opts [Array<String>] :not_categories_id 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). @option opts [Array<String>] :categories_label 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). @option opts [Array<String>] :not_categories_label 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). @option opts [Array<Integer>] :categories_level 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). @option opts [Array<Integer>] :not_categories_level 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). @option opts [Array<String>] :entities_id 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). @option opts [Array<String>] :not_entities_id 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). @option opts [Array<String>] :entities_links_wikipedia 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). @option opts [Array<String>] :not_entities_links_wikipedia 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). @option opts [Array<String>] :entities_links_wikidata 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). @option opts [Array<String>] :not_entities_links_wikidata 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). @option opts [Array<String>] :entities_types 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). @option opts [Array<String>] :not_entities_types 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). @option opts [Array<String>] :entities_stock_tickers 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). @option opts [Array<String>] :entities_body_stock_tickers 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). @option opts [Array<String>] :entities_surface_forms_text 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). @option opts [Array<String>] :not_entities_surface_forms_text 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). @option opts [String] :entities_title_surface_forms_text 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). @option opts [Array<String>] :not_entities_title_surface_forms_text 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). @option opts [Array<String>] :entities_body_surface_forms_text 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). @option opts [Array<String>] :not_entities_body_surface_forms_text 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). @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value. @option opts [String] :not_sentiment_title_polarity This parameter is used for excluding stories whose title sentiment is the specified value. @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value. @option opts [String] :not_sentiment_body_polarity This parameter is used for excluding stories whose body sentiment is the specified value. @option opts [Integer] :media_images_count_min This parameter is used for finding stories whose number of images is greater than or equal to the specified value. @option opts [Integer] :media_images_count_max This parameter is used for finding stories whose number of images is less than or equal to the specified value. @option opts [Integer] :media_images_width_min This parameter is used for finding stories whose width of images are greater than or equal to the specified value. @option opts [Integer] :media_images_width_max This parameter is used for finding stories whose width of images are less than or equal to the specified value. @option opts [Integer] :media_images_height_min This parameter is used for finding stories whose height of images are greater than or equal to the specified value. @option opts [Integer] :media_images_height_max This parameter is used for finding stories whose height of images are less than or equal to the specified value. @option opts [Integer] :media_images_content_length_min This parameter is used for finding stories whose images content length are greater than or equal to the specified value. @option opts [Integer] :media_images_content_length_max This parameter is used for finding stories whose images content length are less than or equal to the specified value. @option opts [Array<String>] :media_images_format This parameter is used for finding stories whose images format are the specified value. @option opts [Array<String>] :not_media_images_format This parameter is used for excluding stories whose images format are the specified value. @option opts [Integer] :media_videos_count_min This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. @option opts [Integer] :media_videos_count_max This parameter is used for finding stories whose number of videos is less than or equal to the specified value. @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value. @option opts [Array<Integer>] :not_author_id This parameter is used for excluding stories whose author id is the specified value. @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value. @option opts [String] :not_author_name This parameter is used for excluding stories whose author full name contains the specified value. @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value. @option opts [Array<Integer>] :not_source_id This parameter is used for excluding stories whose source id is the specified value. @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value. @option opts [Array<String>] :not_source_name This parameter is used for excluding stories whose source name contains the specified value. @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value. @option opts [Array<String>] :not_source_domain This parameter is used for excluding stories whose source domain is the specified value. @option opts [Array<String>] :source_locations_country 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). @option opts [Array<String>] :not_source_locations_country 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). @option opts [Array<String>] :source_locations_state 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). @option opts [Array<String>] :not_source_locations_state 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). @option opts [Array<String>] :source_locations_city 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). @option opts [Array<String>] :not_source_locations_city 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). @option opts [Array<String>] :source_scopes_country 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). @option opts [Array<String>] :not_source_scopes_country 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). @option opts [Array<String>] :source_scopes_state 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). @option opts [Array<String>] :not_source_scopes_state 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). @option opts [Array<String>] :source_scopes_city 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). @option opts [Array<String>] :not_source_scopes_city 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). @option opts [Array<String>] :source_scopes_level 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). @option opts [Array<String>] :not_source_scopes_level 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). @option opts [Integer] :source_links_in_count_min 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). @option opts [Integer] :source_links_in_count_max 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). @option opts [Integer] :source_rankings_alexa_rank_min 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). @option opts [Integer] :source_rankings_alexa_rank_max 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). @option opts [Array<String>] :source_rankings_alexa_country 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). @option opts [Integer] :social_shares_count_facebook_min This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_facebook_max This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_min This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_max This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_min This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. @option opts [Array<String>] :clusters 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). @option opts [String] :aql This parameter is used to supply a query in AYLIEN Query Language. @option opts [String] :aql_default_field This parameter is used to supply an optional default field name used in the AQL query. @option opts [String] :query 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. @option opts [Integer] :interval_start This parameter is used for setting the start data point of histogram intervals. @option opts [Integer] :interval_end This parameter is used for setting the end data point of histogram intervals. @option opts [Integer] :interval_width This parameter is used for setting the width of histogram intervals. @option opts [String] :field This parameter is used for specifying the y-axis variable for the histogram. @return [Array<(Histograms, Integer, Hash)>] Histograms data, response status code and response headers

# 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
list_related_stories_post(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding stories by story id. @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id. @option opts [String] :title This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :body This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :text 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). @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_text 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). @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url. @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url. @option opts [Array<String>] :language 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. @option opts [Array<String>] :not_language 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. @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [String] :categories_taxonomy 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). @option opts [Boolean] :categories_confident 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) @option opts [Array<String>] :categories_id 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). @option opts [Array<String>] :not_categories_id 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). @option opts [Array<String>] :categories_label 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). @option opts [Array<String>] :not_categories_label 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). @option opts [Array<Integer>] :categories_level 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). @option opts [Array<Integer>] :not_categories_level 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). @option opts [Array<String>] :entities_id 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). @option opts [Array<String>] :not_entities_id 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). @option opts [Array<String>] :entities_links_wikipedia 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). @option opts [Array<String>] :not_entities_links_wikipedia 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). @option opts [Array<String>] :entities_links_wikidata 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). @option opts [Array<String>] :not_entities_links_wikidata 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). @option opts [Array<String>] :entities_types 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). @option opts [Array<String>] :not_entities_types 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). @option opts [Array<String>] :entities_stock_tickers 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). @option opts [Array<String>] :entities_body_stock_tickers 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). @option opts [Array<String>] :entities_surface_forms_text 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). @option opts [Array<String>] :not_entities_surface_forms_text 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). @option opts [String] :entities_title_surface_forms_text 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). @option opts [Array<String>] :not_entities_title_surface_forms_text 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). @option opts [Array<String>] :entities_body_surface_forms_text 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). @option opts [Array<String>] :not_entities_body_surface_forms_text 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). @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value. @option opts [String] :not_sentiment_title_polarity This parameter is used for excluding stories whose title sentiment is the specified value. @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value. @option opts [String] :not_sentiment_body_polarity This parameter is used for excluding stories whose body sentiment is the specified value. @option opts [Integer] :media_images_count_min This parameter is used for finding stories whose number of images is greater than or equal to the specified value. @option opts [Integer] :media_images_count_max This parameter is used for finding stories whose number of images is less than or equal to the specified value. @option opts [Integer] :media_images_width_min This parameter is used for finding stories whose width of images are greater than or equal to the specified value. @option opts [Integer] :media_images_width_max This parameter is used for finding stories whose width of images are less than or equal to the specified value. @option opts [Integer] :media_images_height_min This parameter is used for finding stories whose height of images are greater than or equal to the specified value. @option opts [Integer] :media_images_height_max This parameter is used for finding stories whose height of images are less than or equal to the specified value. @option opts [Integer] :media_images_content_length_min This parameter is used for finding stories whose images content length are greater than or equal to the specified value. @option opts [Integer] :media_images_content_length_max This parameter is used for finding stories whose images content length are less than or equal to the specified value. @option opts [Array<String>] :media_images_format This parameter is used for finding stories whose images format are the specified value. @option opts [Array<String>] :not_media_images_format This parameter is used for excluding stories whose images format are the specified value. @option opts [Integer] :media_videos_count_min This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. @option opts [Integer] :media_videos_count_max This parameter is used for finding stories whose number of videos is less than or equal to the specified value. @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value. @option opts [Array<Integer>] :not_author_id This parameter is used for excluding stories whose author id is the specified value. @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value. @option opts [String] :not_author_name This parameter is used for excluding stories whose author full name contains the specified value. @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value. @option opts [Array<Integer>] :not_source_id This parameter is used for excluding stories whose source id is the specified value. @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value. @option opts [Array<String>] :not_source_name This parameter is used for excluding stories whose source name contains the specified value. @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value. @option opts [Array<String>] :not_source_domain This parameter is used for excluding stories whose source domain is the specified value. @option opts [Array<String>] :source_locations_country 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). @option opts [Array<String>] :not_source_locations_country 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). @option opts [Array<String>] :source_locations_state 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). @option opts [Array<String>] :not_source_locations_state 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). @option opts [Array<String>] :source_locations_city 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). @option opts [Array<String>] :not_source_locations_city 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). @option opts [Array<String>] :source_scopes_country 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). @option opts [Array<String>] :not_source_scopes_country 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). @option opts [Array<String>] :source_scopes_state 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). @option opts [Array<String>] :not_source_scopes_state 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). @option opts [Array<String>] :source_scopes_city 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). @option opts [Array<String>] :not_source_scopes_city 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). @option opts [Array<String>] :source_scopes_level 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). @option opts [Array<String>] :not_source_scopes_level 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). @option opts [Integer] :source_links_in_count_min 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). @option opts [Integer] :source_links_in_count_max 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). @option opts [Integer] :source_rankings_alexa_rank_min 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). @option opts [Integer] :source_rankings_alexa_rank_max 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). @option opts [Array<String>] :source_rankings_alexa_country 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). @option opts [Integer] :social_shares_count_facebook_min This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_facebook_max This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_min This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_max This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_min This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. @option opts [Array<String>] :clusters 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). @option opts [Array<String>] :_return This parameter is used for specifying return fields. @option opts [Integer] :story_id A story id @option opts [String] :story_url An article or webpage @option opts [String] :story_title Title of the article @option opts [String] :story_body Body of the article @option opts [String] :aql This parameter is used to supply a query in AYLIEN Query Language. @option opts [String] :aql_default_field This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’) @option opts [String] :query 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. @option opts [String] :boost_by This parameter is used for boosting the result by the specified value. @option opts [String] :story_language 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’) @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 3) @return [RelatedStories]

# 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 = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding stories by story id. @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id. @option opts [String] :title This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :body This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :text 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). @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_text 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). @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url. @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url. @option opts [Array<String>] :language 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. @option opts [Array<String>] :not_language 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. @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [String] :categories_taxonomy 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). @option opts [Boolean] :categories_confident 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). @option opts [Array<String>] :categories_id 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). @option opts [Array<String>] :not_categories_id 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). @option opts [Array<String>] :categories_label 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). @option opts [Array<String>] :not_categories_label 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). @option opts [Array<Integer>] :categories_level 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). @option opts [Array<Integer>] :not_categories_level 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). @option opts [Array<String>] :entities_id 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). @option opts [Array<String>] :not_entities_id 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). @option opts [Array<String>] :entities_links_wikipedia 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). @option opts [Array<String>] :not_entities_links_wikipedia 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). @option opts [Array<String>] :entities_links_wikidata 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). @option opts [Array<String>] :not_entities_links_wikidata 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). @option opts [Array<String>] :entities_types 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). @option opts [Array<String>] :not_entities_types 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). @option opts [Array<String>] :entities_stock_tickers 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). @option opts [Array<String>] :entities_body_stock_tickers 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). @option opts [Array<String>] :entities_surface_forms_text 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). @option opts [Array<String>] :not_entities_surface_forms_text 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). @option opts [String] :entities_title_surface_forms_text 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). @option opts [Array<String>] :not_entities_title_surface_forms_text 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). @option opts [Array<String>] :entities_body_surface_forms_text 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). @option opts [Array<String>] :not_entities_body_surface_forms_text 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). @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value. @option opts [String] :not_sentiment_title_polarity This parameter is used for excluding stories whose title sentiment is the specified value. @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value. @option opts [String] :not_sentiment_body_polarity This parameter is used for excluding stories whose body sentiment is the specified value. @option opts [Integer] :media_images_count_min This parameter is used for finding stories whose number of images is greater than or equal to the specified value. @option opts [Integer] :media_images_count_max This parameter is used for finding stories whose number of images is less than or equal to the specified value. @option opts [Integer] :media_images_width_min This parameter is used for finding stories whose width of images are greater than or equal to the specified value. @option opts [Integer] :media_images_width_max This parameter is used for finding stories whose width of images are less than or equal to the specified value. @option opts [Integer] :media_images_height_min This parameter is used for finding stories whose height of images are greater than or equal to the specified value. @option opts [Integer] :media_images_height_max This parameter is used for finding stories whose height of images are less than or equal to the specified value. @option opts [Integer] :media_images_content_length_min This parameter is used for finding stories whose images content length are greater than or equal to the specified value. @option opts [Integer] :media_images_content_length_max This parameter is used for finding stories whose images content length are less than or equal to the specified value. @option opts [Array<String>] :media_images_format This parameter is used for finding stories whose images format are the specified value. @option opts [Array<String>] :not_media_images_format This parameter is used for excluding stories whose images format are the specified value. @option opts [Integer] :media_videos_count_min This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. @option opts [Integer] :media_videos_count_max This parameter is used for finding stories whose number of videos is less than or equal to the specified value. @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value. @option opts [Array<Integer>] :not_author_id This parameter is used for excluding stories whose author id is the specified value. @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value. @option opts [String] :not_author_name This parameter is used for excluding stories whose author full name contains the specified value. @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value. @option opts [Array<Integer>] :not_source_id This parameter is used for excluding stories whose source id is the specified value. @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value. @option opts [Array<String>] :not_source_name This parameter is used for excluding stories whose source name contains the specified value. @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value. @option opts [Array<String>] :not_source_domain This parameter is used for excluding stories whose source domain is the specified value. @option opts [Array<String>] :source_locations_country 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). @option opts [Array<String>] :not_source_locations_country 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). @option opts [Array<String>] :source_locations_state 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). @option opts [Array<String>] :not_source_locations_state 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). @option opts [Array<String>] :source_locations_city 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). @option opts [Array<String>] :not_source_locations_city 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). @option opts [Array<String>] :source_scopes_country 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). @option opts [Array<String>] :not_source_scopes_country 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). @option opts [Array<String>] :source_scopes_state 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). @option opts [Array<String>] :not_source_scopes_state 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). @option opts [Array<String>] :source_scopes_city 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). @option opts [Array<String>] :not_source_scopes_city 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). @option opts [Array<String>] :source_scopes_level 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). @option opts [Array<String>] :not_source_scopes_level 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). @option opts [Integer] :source_links_in_count_min 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). @option opts [Integer] :source_links_in_count_max 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). @option opts [Integer] :source_rankings_alexa_rank_min 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). @option opts [Integer] :source_rankings_alexa_rank_max 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). @option opts [Array<String>] :source_rankings_alexa_country 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). @option opts [Integer] :social_shares_count_facebook_min This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_facebook_max This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_min This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_max This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_min This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. @option opts [Array<String>] :clusters 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). @option opts [Array<String>] :_return This parameter is used for specifying return fields. @option opts [Integer] :story_id A story id @option opts [String] :story_url An article or webpage @option opts [String] :story_title Title of the article @option opts [String] :story_body Body of the article @option opts [String] :aql This parameter is used to supply a query in AYLIEN Query Language. @option opts [String] :aql_default_field This parameter is used to supply an optional default field name used in the AQL query. @option opts [String] :query 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. @option opts [String] :boost_by This parameter is used for boosting the result by the specified value. @option opts [String] :story_language 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. @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. @return [Array<(RelatedStories, Integer, Hash)>] RelatedStories data, response status code and response headers

# 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 = {}) click to toggle source

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. @param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding stories by story id. @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id. @option opts [String] :title This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :body This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :text 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). @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_text 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). @option opts [Array<String>] :language 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. @option opts [Array<String>] :not_language 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. @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url. @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url. @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [String] :categories_taxonomy 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). @option opts [Boolean] :categories_confident 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) @option opts [Array<String>] :categories_id 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). @option opts [Array<String>] :not_categories_id 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). @option opts [Array<String>] :categories_label 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). @option opts [Array<String>] :not_categories_label 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). @option opts [Array<Integer>] :categories_level 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). @option opts [Array<Integer>] :not_categories_level 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). @option opts [Array<String>] :entities_id 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). @option opts [Array<String>] :not_entities_id 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). @option opts [Array<String>] :entities_links_wikipedia 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). @option opts [Array<String>] :not_entities_links_wikipedia 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). @option opts [Array<String>] :entities_links_wikidata 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). @option opts [Array<String>] :not_entities_links_wikidata 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). @option opts [Array<String>] :entities_types 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). @option opts [Array<String>] :not_entities_types 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). @option opts [Array<String>] :entities_stock_tickers 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). @option opts [Array<String>] :entities_body_stock_tickers 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). @option opts [Array<String>] :entities_surface_forms_text 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). @option opts [Array<String>] :not_entities_surface_forms_text 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). @option opts [String] :entities_title_surface_forms_text 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). @option opts [Array<String>] :not_entities_title_surface_forms_text 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). @option opts [Array<String>] :entities_body_surface_forms_text 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). @option opts [Array<String>] :not_entities_body_surface_forms_text 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). @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value. @option opts [String] :not_sentiment_title_polarity This parameter is used for excluding stories whose title sentiment is the specified value. @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value. @option opts [String] :not_sentiment_body_polarity This parameter is used for excluding stories whose body sentiment is the specified value. @option opts [Integer] :media_images_count_min This parameter is used for finding stories whose number of images is greater than or equal to the specified value. @option opts [Integer] :media_images_count_max This parameter is used for finding stories whose number of images is less than or equal to the specified value. @option opts [Integer] :media_images_width_min This parameter is used for finding stories whose width of images are greater than or equal to the specified value. @option opts [Integer] :media_images_width_max This parameter is used for finding stories whose width of images are less than or equal to the specified value. @option opts [Integer] :media_images_height_min This parameter is used for finding stories whose height of images are greater than or equal to the specified value. @option opts [Integer] :media_images_height_max This parameter is used for finding stories whose height of images are less than or equal to the specified value. @option opts [Integer] :media_images_content_length_min This parameter is used for finding stories whose images content length are greater than or equal to the specified value. @option opts [Integer] :media_images_content_length_max This parameter is used for finding stories whose images content length are less than or equal to the specified value. @option opts [Array<String>] :media_images_format This parameter is used for finding stories whose images format are the specified value. @option opts [Array<String>] :not_media_images_format This parameter is used for excluding stories whose images format are the specified value. @option opts [Integer] :media_videos_count_min This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. @option opts [Integer] :media_videos_count_max This parameter is used for finding stories whose number of videos is less than or equal to the specified value. @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value. @option opts [Array<Integer>] :not_author_id This parameter is used for excluding stories whose author id is the specified value. @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value. @option opts [String] :not_author_name This parameter is used for excluding stories whose author full name contains the specified value. @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value. @option opts [Array<Integer>] :not_source_id This parameter is used for excluding stories whose source id is the specified value. @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value. @option opts [Array<String>] :not_source_name This parameter is used for excluding stories whose source name contains the specified value. @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value. @option opts [Array<String>] :not_source_domain This parameter is used for excluding stories whose source domain is the specified value. @option opts [Array<String>] :source_locations_country 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). @option opts [Array<String>] :not_source_locations_country 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). @option opts [Array<String>] :source_locations_state 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). @option opts [Array<String>] :not_source_locations_state 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). @option opts [Array<String>] :source_locations_city 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). @option opts [Array<String>] :not_source_locations_city 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). @option opts [Array<String>] :source_scopes_country 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). @option opts [Array<String>] :not_source_scopes_country 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). @option opts [Array<String>] :source_scopes_state 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). @option opts [Array<String>] :not_source_scopes_state 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). @option opts [Array<String>] :source_scopes_city 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). @option opts [Array<String>] :not_source_scopes_city 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). @option opts [Array<String>] :source_scopes_level 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). @option opts [Array<String>] :not_source_scopes_level 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). @option opts [Integer] :source_links_in_count_min 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). @option opts [Integer] :source_links_in_count_max 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). @option opts [Integer] :source_rankings_alexa_rank_min 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). @option opts [Integer] :source_rankings_alexa_rank_max 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). @option opts [Array<String>] :source_rankings_alexa_country 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). @option opts [Integer] :social_shares_count_facebook_min This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_facebook_max This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_min This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_max This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_min This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. @option opts [Array<String>] :clusters 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). @option opts [Array<String>] :_return This parameter is used for specifying return fields. @option opts [String] :aql This parameter is used to supply a query in AYLIEN Query Language. @option opts [String] :aql_default_field This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’) @option opts [String] :query 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. @option opts [String] :sort_by 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’) @option opts [String] :sort_direction 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’) @option opts [String] :cursor 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 ‘*’) @option opts [Integer] :per_page 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) @return [Stories]

# 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 = {}) click to toggle source

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. @param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding stories by story id. @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id. @option opts [String] :title This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :body This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :text 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). @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_text 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). @option opts [Array<String>] :language 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. @option opts [Array<String>] :not_language 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. @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url. @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url. @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [String] :categories_taxonomy 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). @option opts [Boolean] :categories_confident 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). @option opts [Array<String>] :categories_id 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). @option opts [Array<String>] :not_categories_id 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). @option opts [Array<String>] :categories_label 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). @option opts [Array<String>] :not_categories_label 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). @option opts [Array<Integer>] :categories_level 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). @option opts [Array<Integer>] :not_categories_level 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). @option opts [Array<String>] :entities_id 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). @option opts [Array<String>] :not_entities_id 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). @option opts [Array<String>] :entities_links_wikipedia 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). @option opts [Array<String>] :not_entities_links_wikipedia 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). @option opts [Array<String>] :entities_links_wikidata 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). @option opts [Array<String>] :not_entities_links_wikidata 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). @option opts [Array<String>] :entities_types 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). @option opts [Array<String>] :not_entities_types 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). @option opts [Array<String>] :entities_stock_tickers 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). @option opts [Array<String>] :entities_body_stock_tickers 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). @option opts [Array<String>] :entities_surface_forms_text 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). @option opts [Array<String>] :not_entities_surface_forms_text 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). @option opts [String] :entities_title_surface_forms_text 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). @option opts [Array<String>] :not_entities_title_surface_forms_text 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). @option opts [Array<String>] :entities_body_surface_forms_text 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). @option opts [Array<String>] :not_entities_body_surface_forms_text 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). @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value. @option opts [String] :not_sentiment_title_polarity This parameter is used for excluding stories whose title sentiment is the specified value. @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value. @option opts [String] :not_sentiment_body_polarity This parameter is used for excluding stories whose body sentiment is the specified value. @option opts [Integer] :media_images_count_min This parameter is used for finding stories whose number of images is greater than or equal to the specified value. @option opts [Integer] :media_images_count_max This parameter is used for finding stories whose number of images is less than or equal to the specified value. @option opts [Integer] :media_images_width_min This parameter is used for finding stories whose width of images are greater than or equal to the specified value. @option opts [Integer] :media_images_width_max This parameter is used for finding stories whose width of images are less than or equal to the specified value. @option opts [Integer] :media_images_height_min This parameter is used for finding stories whose height of images are greater than or equal to the specified value. @option opts [Integer] :media_images_height_max This parameter is used for finding stories whose height of images are less than or equal to the specified value. @option opts [Integer] :media_images_content_length_min This parameter is used for finding stories whose images content length are greater than or equal to the specified value. @option opts [Integer] :media_images_content_length_max This parameter is used for finding stories whose images content length are less than or equal to the specified value. @option opts [Array<String>] :media_images_format This parameter is used for finding stories whose images format are the specified value. @option opts [Array<String>] :not_media_images_format This parameter is used for excluding stories whose images format are the specified value. @option opts [Integer] :media_videos_count_min This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. @option opts [Integer] :media_videos_count_max This parameter is used for finding stories whose number of videos is less than or equal to the specified value. @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value. @option opts [Array<Integer>] :not_author_id This parameter is used for excluding stories whose author id is the specified value. @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value. @option opts [String] :not_author_name This parameter is used for excluding stories whose author full name contains the specified value. @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value. @option opts [Array<Integer>] :not_source_id This parameter is used for excluding stories whose source id is the specified value. @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value. @option opts [Array<String>] :not_source_name This parameter is used for excluding stories whose source name contains the specified value. @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value. @option opts [Array<String>] :not_source_domain This parameter is used for excluding stories whose source domain is the specified value. @option opts [Array<String>] :source_locations_country 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). @option opts [Array<String>] :not_source_locations_country 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). @option opts [Array<String>] :source_locations_state 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). @option opts [Array<String>] :not_source_locations_state 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). @option opts [Array<String>] :source_locations_city 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). @option opts [Array<String>] :not_source_locations_city 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). @option opts [Array<String>] :source_scopes_country 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). @option opts [Array<String>] :not_source_scopes_country 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). @option opts [Array<String>] :source_scopes_state 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). @option opts [Array<String>] :not_source_scopes_state 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). @option opts [Array<String>] :source_scopes_city 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). @option opts [Array<String>] :not_source_scopes_city 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). @option opts [Array<String>] :source_scopes_level 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). @option opts [Array<String>] :not_source_scopes_level 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). @option opts [Integer] :source_links_in_count_min 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). @option opts [Integer] :source_links_in_count_max 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). @option opts [Integer] :source_rankings_alexa_rank_min 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). @option opts [Integer] :source_rankings_alexa_rank_max 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). @option opts [Array<String>] :source_rankings_alexa_country 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). @option opts [Integer] :social_shares_count_facebook_min This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_facebook_max This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_min This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_max This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_min This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. @option opts [Array<String>] :clusters 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). @option opts [Array<String>] :_return This parameter is used for specifying return fields. @option opts [String] :aql This parameter is used to supply a query in AYLIEN Query Language. @option opts [String] :aql_default_field This parameter is used to supply an optional default field name used in the AQL query. @option opts [String] :query 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. @option opts [String] :sort_by 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). @option opts [String] :sort_direction 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). @option opts [String] :cursor 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). @option opts [Integer] :per_page 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) @return [Array<(Stories, Integer, Hash)>] Stories data, response status code and response headers

# 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 = {}) click to toggle source

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. @param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding stories by story id. @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id. @option opts [String] :title This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :body This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :text 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). @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_text 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). @option opts [Array<String>] :language 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. @option opts [Array<String>] :not_language 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. @option opts [String] :categories_taxonomy 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). @option opts [Boolean] :categories_confident 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) @option opts [Array<String>] :categories_id 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). @option opts [Array<String>] :not_categories_id 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). @option opts [Array<String>] :categories_label 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). @option opts [Array<String>] :not_categories_label 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). @option opts [Array<Integer>] :categories_level 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). @option opts [Array<Integer>] :not_categories_level 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). @option opts [Array<String>] :entities_id 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). @option opts [Array<String>] :not_entities_id 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). @option opts [Array<String>] :entities_links_wikipedia 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). @option opts [Array<String>] :not_entities_links_wikipedia 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). @option opts [Array<String>] :entities_links_wikidata 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). @option opts [Array<String>] :not_entities_links_wikidata 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). @option opts [Array<String>] :entities_types 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). @option opts [Array<String>] :not_entities_types 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). @option opts [Array<String>] :entities_stock_tickers 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). @option opts [Array<String>] :entities_body_stock_tickers 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). @option opts [Array<String>] :entities_surface_forms_text 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). @option opts [Array<String>] :not_entities_surface_forms_text 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). @option opts [String] :entities_title_surface_forms_text 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). @option opts [Array<String>] :not_entities_title_surface_forms_text 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). @option opts [Array<String>] :entities_body_surface_forms_text 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). @option opts [Array<String>] :not_entities_body_surface_forms_text 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). @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value. @option opts [String] :not_sentiment_title_polarity This parameter is used for excluding stories whose title sentiment is the specified value. @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value. @option opts [String] :not_sentiment_body_polarity This parameter is used for excluding stories whose body sentiment is the specified value. @option opts [Integer] :media_images_count_min This parameter is used for finding stories whose number of images is greater than or equal to the specified value. @option opts [Integer] :media_images_count_max This parameter is used for finding stories whose number of images is less than or equal to the specified value. @option opts [Integer] :media_images_width_min This parameter is used for finding stories whose width of images are greater than or equal to the specified value. @option opts [Integer] :media_images_width_max This parameter is used for finding stories whose width of images are less than or equal to the specified value. @option opts [Integer] :media_images_height_min This parameter is used for finding stories whose height of images are greater than or equal to the specified value. @option opts [Integer] :media_images_height_max This parameter is used for finding stories whose height of images are less than or equal to the specified value. @option opts [Integer] :media_images_content_length_min This parameter is used for finding stories whose images content length are greater than or equal to the specified value. @option opts [Integer] :media_images_content_length_max This parameter is used for finding stories whose images content length are less than or equal to the specified value. @option opts [Array<String>] :media_images_format This parameter is used for finding stories whose images format are the specified value. @option opts [Array<String>] :not_media_images_format This parameter is used for excluding stories whose images format are the specified value. @option opts [Integer] :media_videos_count_min This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. @option opts [Integer] :media_videos_count_max This parameter is used for finding stories whose number of videos is less than or equal to the specified value. @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value. @option opts [Array<Integer>] :not_author_id This parameter is used for excluding stories whose author id is the specified value. @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value. @option opts [String] :not_author_name This parameter is used for excluding stories whose author full name contains the specified value. @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value. @option opts [Array<Integer>] :not_source_id This parameter is used for excluding stories whose source id is the specified value. @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value. @option opts [Array<String>] :not_source_name This parameter is used for excluding stories whose source name contains the specified value. @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value. @option opts [Array<String>] :not_source_domain This parameter is used for excluding stories whose source domain is the specified value. @option opts [Array<String>] :source_locations_country 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). @option opts [Array<String>] :not_source_locations_country 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). @option opts [Array<String>] :source_locations_state 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). @option opts [Array<String>] :not_source_locations_state 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). @option opts [Array<String>] :source_locations_city 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). @option opts [Array<String>] :not_source_locations_city 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). @option opts [Array<String>] :source_scopes_country 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). @option opts [Array<String>] :not_source_scopes_country 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). @option opts [Array<String>] :source_scopes_state 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). @option opts [Array<String>] :not_source_scopes_state 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). @option opts [Array<String>] :source_scopes_city 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). @option opts [Array<String>] :not_source_scopes_city 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). @option opts [Array<String>] :source_scopes_level 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). @option opts [Array<String>] :not_source_scopes_level 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). @option opts [Integer] :source_links_in_count_min 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). @option opts [Integer] :source_links_in_count_max 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). @option opts [Integer] :source_rankings_alexa_rank_min 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). @option opts [Integer] :source_rankings_alexa_rank_max 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). @option opts [Array<String>] :source_rankings_alexa_country 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). @option opts [Integer] :social_shares_count_facebook_min This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_facebook_max This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_min This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_max This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_min This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. @option opts [Array<String>] :clusters 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). @option opts [String] :aql This parameter is used to supply a query in AYLIEN Query Language. @option opts [String] :aql_default_field This parameter is used to supply an optional default field name used in the AQL query. (default to ‘text’) @option opts [String] :query 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. @option opts [String] :published_at_start 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’) @option opts [String] :published_at_end 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’) @option opts [String] :period 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’) @return [TimeSeriesList]

# 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 = {}) click to toggle source

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. @param [Hash] opts the optional parameters @option opts [Array<Integer>] :id This parameter is used for finding stories by story id. @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id. @option opts [String] :title This parameter is used for finding stories whose title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :body This parameter is used for finding stories whose body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :text 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). @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](newsapi.aylien.com/docs/boolean-operators). @option opts [String] :translations_en_text 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). @option opts [Array<String>] :language 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. @option opts [Array<String>] :not_language 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. @option opts [String] :categories_taxonomy 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). @option opts [Boolean] :categories_confident 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). @option opts [Array<String>] :categories_id 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). @option opts [Array<String>] :not_categories_id 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). @option opts [Array<String>] :categories_label 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). @option opts [Array<String>] :not_categories_label 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). @option opts [Array<Integer>] :categories_level 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). @option opts [Array<Integer>] :not_categories_level 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). @option opts [Array<String>] :entities_id 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). @option opts [Array<String>] :not_entities_id 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). @option opts [Array<String>] :entities_links_wikipedia 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). @option opts [Array<String>] :not_entities_links_wikipedia 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). @option opts [Array<String>] :entities_links_wikidata 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). @option opts [Array<String>] :not_entities_links_wikidata 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). @option opts [Array<String>] :entities_types 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). @option opts [Array<String>] :not_entities_types 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). @option opts [Array<String>] :entities_stock_tickers 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). @option opts [Array<String>] :entities_body_stock_tickers 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). @option opts [Array<String>] :entities_surface_forms_text 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). @option opts [Array<String>] :not_entities_surface_forms_text 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). @option opts [String] :entities_title_surface_forms_text 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). @option opts [Array<String>] :not_entities_title_surface_forms_text 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). @option opts [Array<String>] :entities_body_surface_forms_text 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). @option opts [Array<String>] :not_entities_body_surface_forms_text 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). @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value. @option opts [String] :not_sentiment_title_polarity This parameter is used for excluding stories whose title sentiment is the specified value. @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value. @option opts [String] :not_sentiment_body_polarity This parameter is used for excluding stories whose body sentiment is the specified value. @option opts [Integer] :media_images_count_min This parameter is used for finding stories whose number of images is greater than or equal to the specified value. @option opts [Integer] :media_images_count_max This parameter is used for finding stories whose number of images is less than or equal to the specified value. @option opts [Integer] :media_images_width_min This parameter is used for finding stories whose width of images are greater than or equal to the specified value. @option opts [Integer] :media_images_width_max This parameter is used for finding stories whose width of images are less than or equal to the specified value. @option opts [Integer] :media_images_height_min This parameter is used for finding stories whose height of images are greater than or equal to the specified value. @option opts [Integer] :media_images_height_max This parameter is used for finding stories whose height of images are less than or equal to the specified value. @option opts [Integer] :media_images_content_length_min This parameter is used for finding stories whose images content length are greater than or equal to the specified value. @option opts [Integer] :media_images_content_length_max This parameter is used for finding stories whose images content length are less than or equal to the specified value. @option opts [Array<String>] :media_images_format This parameter is used for finding stories whose images format are the specified value. @option opts [Array<String>] :not_media_images_format This parameter is used for excluding stories whose images format are the specified value. @option opts [Integer] :media_videos_count_min This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. @option opts [Integer] :media_videos_count_max This parameter is used for finding stories whose number of videos is less than or equal to the specified value. @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value. @option opts [Array<Integer>] :not_author_id This parameter is used for excluding stories whose author id is the specified value. @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value. @option opts [String] :not_author_name This parameter is used for excluding stories whose author full name contains the specified value. @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value. @option opts [Array<Integer>] :not_source_id This parameter is used for excluding stories whose source id is the specified value. @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value. @option opts [Array<String>] :not_source_name This parameter is used for excluding stories whose source name contains the specified value. @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value. @option opts [Array<String>] :not_source_domain This parameter is used for excluding stories whose source domain is the specified value. @option opts [Array<String>] :source_locations_country 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). @option opts [Array<String>] :not_source_locations_country 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). @option opts [Array<String>] :source_locations_state 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). @option opts [Array<String>] :not_source_locations_state 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). @option opts [Array<String>] :source_locations_city 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). @option opts [Array<String>] :not_source_locations_city 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). @option opts [Array<String>] :source_scopes_country 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). @option opts [Array<String>] :not_source_scopes_country 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). @option opts [Array<String>] :source_scopes_state 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). @option opts [Array<String>] :not_source_scopes_state 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). @option opts [Array<String>] :source_scopes_city 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). @option opts [Array<String>] :not_source_scopes_city 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). @option opts [Array<String>] :source_scopes_level 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). @option opts [Array<String>] :not_source_scopes_level 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). @option opts [Integer] :source_links_in_count_min 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). @option opts [Integer] :source_links_in_count_max 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). @option opts [Integer] :source_rankings_alexa_rank_min 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). @option opts [Integer] :source_rankings_alexa_rank_max 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). @option opts [Array<String>] :source_rankings_alexa_country 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). @option opts [Integer] :social_shares_count_facebook_min This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_facebook_max This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_min This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_google_plus_max This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_min This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. @option opts [Array<String>] :clusters 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). @option opts [String] :aql This parameter is used to supply a query in AYLIEN Query Language. @option opts [String] :aql_default_field This parameter is used to supply an optional default field name used in the AQL query. @option opts [String] :query 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. @option opts [String] :published_at_start 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). @option opts [String] :published_at_end 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). @option opts [String] :period 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). @return [Array<(TimeSeriesList, Integer, Hash)>] TimeSeriesList data, response status code and response headers

# 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