aylien_news_api 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -4
  3. data/README.md +8 -7
  4. data/aylien_news_api.gemspec +15 -2
  5. data/docs/CategoryLinks.md +2 -2
  6. data/docs/Coverages.md +1 -0
  7. data/docs/DefaultApi.md +315 -252
  8. data/docs/Media.md +1 -1
  9. data/docs/RelatedStories.md +1 -0
  10. data/docs/Scope.md +4 -4
  11. data/docs/Story.md +5 -5
  12. data/lib/aylien_news_api/api/default_api.rb +615 -549
  13. data/lib/aylien_news_api/api_client.rb +2 -2
  14. data/lib/aylien_news_api/configuration.rb +8 -0
  15. data/lib/aylien_news_api/models/author.rb +25 -6
  16. data/lib/aylien_news_api/models/autocomplete.rb +23 -5
  17. data/lib/aylien_news_api/models/autocompletes.rb +21 -4
  18. data/lib/aylien_news_api/models/category.rb +57 -12
  19. data/lib/aylien_news_api/models/category_links.rb +25 -7
  20. data/lib/aylien_news_api/models/coverages.rb +45 -12
  21. data/lib/aylien_news_api/models/entities.rb +23 -5
  22. data/lib/aylien_news_api/models/entity.rb +49 -8
  23. data/lib/aylien_news_api/models/entity_links.rb +21 -4
  24. data/lib/aylien_news_api/models/error.rb +31 -9
  25. data/lib/aylien_news_api/models/error_links.rb +21 -4
  26. data/lib/aylien_news_api/models/errors.rb +21 -4
  27. data/lib/aylien_news_api/models/histogram_interval.rb +23 -5
  28. data/lib/aylien_news_api/models/histograms.rb +29 -8
  29. data/lib/aylien_news_api/models/location.rb +25 -6
  30. data/lib/aylien_news_api/models/media.rb +50 -9
  31. data/lib/aylien_news_api/models/related_stories.rb +43 -11
  32. data/lib/aylien_news_api/models/scope.rb +57 -14
  33. data/lib/aylien_news_api/models/sentiment.rb +69 -8
  34. data/lib/aylien_news_api/models/sentiments.rb +23 -5
  35. data/lib/aylien_news_api/models/share_count.rb +23 -5
  36. data/lib/aylien_news_api/models/share_counts.rb +27 -7
  37. data/lib/aylien_news_api/models/source.rb +31 -9
  38. data/lib/aylien_news_api/models/stories.rb +25 -6
  39. data/lib/aylien_news_api/models/story.rb +64 -28
  40. data/lib/aylien_news_api/models/story_cluster.rb +29 -8
  41. data/lib/aylien_news_api/models/story_links.rb +25 -6
  42. data/lib/aylien_news_api/models/summary.rb +21 -4
  43. data/lib/aylien_news_api/models/time_series.rb +23 -5
  44. data/lib/aylien_news_api/models/time_series_list.rb +27 -7
  45. data/lib/aylien_news_api/models/trend.rb +23 -5
  46. data/lib/aylien_news_api/models/trends.rb +23 -5
  47. data/lib/aylien_news_api/version.rb +1 -1
  48. data/spec/api_client_spec.rb +306 -0
  49. data/spec/configuration_spec.rb +39 -0
  50. data/spec/spec_helper.rb +113 -0
  51. metadata +34 -49
  52. data/Rakefile +0 -8
  53. data/aylien_news_api-0.0.1.gem +0 -0
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **type** | **String** | Type of the media | [optional]
6
+ **type** | **String** | The type of media | [optional]
7
7
  **url** | **String** | A URL which points to the media file | [optional]
8
8
 
9
9
 
@@ -7,5 +7,6 @@ Name | Type | Description | Notes
7
7
  **story_body** | **String** | The input story body | [optional]
8
8
  **story_language** | **String** | The input story language | [optional]
9
9
  **related_stories** | [**Array<Story>**](Story.md) | An array of related stories for the input story | [optional]
10
+ **clusters** | [**Array<StoryCluster>**](StoryCluster.md) | An array of clusters | [optional]
10
11
 
11
12
 
@@ -3,9 +3,9 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **country** | **String** | The country code of the scope. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
7
- **state** | **String** | The state of the scope | [optional]
8
- **city** | **String** | The city of the scope | [optional]
9
- **level** | **String** | The level of the scope | [optional]
6
+ **country** | **String** | The source scope by country code. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
7
+ **state** | **String** | The scope by state | [optional]
8
+ **city** | **String** | The scope by city | [optional]
9
+ **level** | **String** | The scope by level | [optional]
10
10
 
11
11
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **id** | **Integer** | ID of the story which is unique identification | [optional]
6
+ **id** | **Integer** | ID of the story which is a unique identification | [optional]
7
7
  **title** | **String** | Title of the story | [optional]
8
8
  **body** | **String** | Body of the story | [optional]
9
9
  **summary** | [**Summary**](Summary.md) | The suggested story summary | [optional]
@@ -12,10 +12,10 @@ Name | Type | Description | Notes
12
12
  **entities** | [**Entities**](Entities.md) | Extracted entities from the story title or body | [optional]
13
13
  **keywords** | **Array<String>** | Extracted keywords mentioned in the story title or body | [optional]
14
14
  **hashtags** | **Array<String>** | An array of suggested Story hashtags | [optional]
15
- **characters_count** | **Integer** | Characters count of the story body | [optional]
16
- **words_count** | **Integer** | Words count of the story body | [optional]
17
- **sentences_count** | **Integer** | Sentences count of the story body | [optional]
18
- **paragraphs_count** | **Integer** | Paragraphs count of the story body | [optional]
15
+ **characters_count** | **Integer** | Character count of the story body | [optional]
16
+ **words_count** | **Integer** | Word count of the story body | [optional]
17
+ **sentences_count** | **Integer** | Sentence count of the story body | [optional]
18
+ **paragraphs_count** | **Integer** | Paragraph count of the story body | [optional]
19
19
  **categories** | [**Array<Category>**](Category.md) | Suggested categories for the story | [optional]
20
20
  **social_shares_count** | [**ShareCounts**](ShareCounts.md) | Social shares count for the story | [optional]
21
21
  **media** | [**Array<Media>**](Media.md) | An array of extracted media such as images and videos | [optional]
@@ -25,10 +25,10 @@ module AylienNewsApi
25
25
  # List autocompletes
26
26
  # This endpoint is used for getting list of autocompletes by providing a specific term and type.
27
27
  # @param type This parameter is used for defining the type of autocompletes.
28
- # @param term This parameter is used for finding autocomplete objects whose contains the specified value.
28
+ # @param term This parameter is used for finding autocomplete objects that contain the specified value.
29
29
  # @param [Hash] opts the optional parameters
30
30
  # @option opts [String] :language This parameter is used for autocompletes whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. (default to en)
31
- # @option opts [Integer] :per_page This parameter is used for specifying number of the items in each page. (default to 3)
31
+ # @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 3)
32
32
  # @return [Autocompletes]
33
33
  def list_autocompletes(type, term, opts = {})
34
34
  data, _status_code, _headers = list_autocompletes_with_http_info(type, term, opts)
@@ -38,29 +38,28 @@ module AylienNewsApi
38
38
  # List autocompletes
39
39
  # This endpoint is used for getting list of autocompletes by providing a specific term and type.
40
40
  # @param type This parameter is used for defining the type of autocompletes.
41
- # @param term This parameter is used for finding autocomplete objects whose contains the specified value.
41
+ # @param term This parameter is used for finding autocomplete objects that contain the specified value.
42
42
  # @param [Hash] opts the optional parameters
43
43
  # @option opts [String] :language This parameter is used for autocompletes whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
44
- # @option opts [Integer] :per_page This parameter is used for specifying number of the items in each page.
44
+ # @option opts [Integer] :per_page This parameter is used for specifying number of items in each page.
45
45
  # @return [Array<(Autocompletes, Fixnum, Hash)>] Autocompletes data, response status code and response headers
46
46
  def list_autocompletes_with_http_info(type, term, opts = {})
47
47
  if @api_client.config.debugging
48
- @api_client.config.logger.debug "Calling API: DefaultApi#list_autocompletes ..."
48
+ @api_client.config.logger.debug "Calling API: DefaultApi.list_autocompletes ..."
49
49
  end
50
-
51
50
  # verify the required parameter 'type' is set
52
- fail "Missing the required parameter 'type' when calling list_autocompletes" if type.nil?
51
+ fail ArgumentError, "Missing the required parameter 'type' when calling DefaultApi.list_autocompletes" if type.nil?
52
+ # verify enum value
53
53
  unless ['source_names', 'source_domains', 'entity_types', 'dbpedia_resources'].include?(type)
54
- fail "invalid value for 'type', must be one of source_names, source_domains, entity_types, dbpedia_resources"
54
+ fail ArgumentError, "invalid value for 'type', must be one of source_names, source_domains, entity_types, dbpedia_resources"
55
55
  end
56
-
57
56
  # verify the required parameter 'term' is set
58
- fail "Missing the required parameter 'term' when calling list_autocompletes" if term.nil?
59
-
57
+ fail ArgumentError, "Missing the required parameter 'term' when calling DefaultApi.list_autocompletes" if term.nil?
58
+
60
59
  if opts[:'language'] && !['en', 'de', 'fr', 'it', 'es', 'pt'].include?(opts[:'language'])
61
- fail 'invalid value for "language", must be one of en, de, fr, it, es, pt'
60
+ fail ArgumentError, 'invalid value for "language", must be one of en, de, fr, it, es, pt'
62
61
  end
63
-
62
+
64
63
  # resource path
65
64
  local_var_path = "/autocompletes".sub('{format}','json')
66
65
 
@@ -68,8 +67,8 @@ module AylienNewsApi
68
67
  query_params = {}
69
68
  query_params[:'type'] = type
70
69
  query_params[:'term'] = term
71
- query_params[:'language'] = opts[:'language'] if opts[:'language']
72
- query_params[:'per_page'] = opts[:'per_page'] if opts[:'per_page']
70
+ query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
71
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
73
72
 
74
73
  # header parameters
75
74
  header_params = {}
@@ -87,7 +86,7 @@ module AylienNewsApi
87
86
 
88
87
  # http body (model)
89
88
  post_body = nil
90
- auth_names = ['app_key', 'app_id']
89
+ auth_names = ['app_key', 'app_id']
91
90
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
92
91
  :header_params => header_params,
93
92
  :query_params => query_params,
@@ -102,47 +101,53 @@ module AylienNewsApi
102
101
  end
103
102
 
104
103
  # List coverages
105
- # This endpoint is used for finding story coverages based on provided parameters. The number of coverages to return, up to a maximum of 100.
104
+ # This endpoint is used for finding story coverages based on the parameters provided. The maximum number of related stories returned is 100.
106
105
  # @param [Hash] opts the optional parameters
107
106
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
108
107
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
109
108
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
110
109
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
111
110
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
112
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
113
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
114
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
111
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
112
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
113
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
115
114
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident. (default to true)
116
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
117
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
118
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
119
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
120
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
121
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
122
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
123
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
115
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
116
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
117
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
118
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
119
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
120
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
121
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
122
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
124
123
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
125
124
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
125
+ # @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.
126
+ # @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.
127
+ # @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.
128
+ # @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.
126
129
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
127
130
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
128
131
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
129
132
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
130
133
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
131
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
132
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
133
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
134
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
135
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
136
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
137
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
134
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
135
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
136
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
137
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
138
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
139
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
140
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
141
+ # @option opts [BOOLEAN] :cluster This parameter enables clustering for the returned stories. (default to false)
142
+ # @option opts [String] :cluster_algorithm This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms. (default to lingo)
138
143
  # @option opts [Array<String>] :_return This parameter is used for specifying return fields.
139
144
  # @option opts [Integer] :story_id A story id
140
145
  # @option opts [String] :story_url An article or webpage
141
146
  # @option opts [String] :story_title Title of the article
142
147
  # @option opts [String] :story_body Body of the article
143
- # @option opts [DateTime] :story_published_at Publish date of the article. If you use url or title and body for getting coverages, this parameter is required. The format used is a restricted form of the canonical representation of dateTime in the [XML Schema specification (ISO 8601)](https://www.w3.org/TR/xmlschema-2/#dateTime).
144
- # @option opts [String] :story_language This parameter is used for setting language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. (default to auto)
145
- # @option opts [Integer] :per_page This parameter is used for specifying number of the items in each page. (default to 3)
148
+ # @option opts [DateTime] :story_published_at Publish date of the article. If you use a url or title and body of an article for getting coverages, this parameter is required. The format used is a restricted form of the canonical representation of dateTime in the [XML Schema specification (ISO 8601)](https://www.w3.org/TR/xmlschema-2/#dateTime).
149
+ # @option opts [String] :story_language This parameter is used for setting the language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. (default to auto)
150
+ # @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 3)
146
151
  # @return [Coverages]
147
152
  def list_coverages(opts = {})
148
153
  data, _status_code, _headers = list_coverages_with_http_info(opts)
@@ -150,69 +155,75 @@ module AylienNewsApi
150
155
  end
151
156
 
152
157
  # List coverages
153
- # This endpoint is used for finding story coverages based on provided parameters. The number of coverages to return, up to a maximum of 100.
158
+ # This endpoint is used for finding story coverages based on the parameters provided. The maximum number of related stories returned is 100.
154
159
  # @param [Hash] opts the optional parameters
155
160
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
156
161
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
157
162
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
158
163
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
159
164
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
160
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
161
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
162
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
165
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
166
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
167
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
163
168
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident.
164
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
165
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
166
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
167
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
168
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
169
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
170
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
171
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
169
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
170
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
171
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
172
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
173
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
174
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
175
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
176
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
172
177
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
173
178
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
179
+ # @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.
180
+ # @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.
181
+ # @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.
182
+ # @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.
174
183
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
175
184
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
176
185
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
177
186
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
178
187
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
179
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
180
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
181
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
182
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
183
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
184
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
185
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
188
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
189
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
190
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
191
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
192
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
193
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
194
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
195
+ # @option opts [BOOLEAN] :cluster This parameter enables clustering for the returned stories.
196
+ # @option opts [String] :cluster_algorithm This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms.
186
197
  # @option opts [Array<String>] :_return This parameter is used for specifying return fields.
187
198
  # @option opts [Integer] :story_id A story id
188
199
  # @option opts [String] :story_url An article or webpage
189
200
  # @option opts [String] :story_title Title of the article
190
201
  # @option opts [String] :story_body Body of the article
191
- # @option opts [DateTime] :story_published_at Publish date of the article. If you use url or title and body for getting coverages, this parameter is required. The format used is a restricted form of the canonical representation of dateTime in the [XML Schema specification (ISO 8601)](https://www.w3.org/TR/xmlschema-2/#dateTime).
192
- # @option opts [String] :story_language This parameter is used for setting language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
193
- # @option opts [Integer] :per_page This parameter is used for specifying number of the items in each page.
202
+ # @option opts [DateTime] :story_published_at Publish date of the article. If you use a url or title and body of an article for getting coverages, this parameter is required. The format used is a restricted form of the canonical representation of dateTime in the [XML Schema specification (ISO 8601)](https://www.w3.org/TR/xmlschema-2/#dateTime).
203
+ # @option opts [String] :story_language This parameter is used for setting the language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
204
+ # @option opts [Integer] :per_page This parameter is used for specifying number of items in each page.
194
205
  # @return [Array<(Coverages, Fixnum, Hash)>] Coverages data, response status code and response headers
195
206
  def list_coverages_with_http_info(opts = {})
196
207
  if @api_client.config.debugging
197
- @api_client.config.logger.debug "Calling API: DefaultApi#list_coverages ..."
208
+ @api_client.config.logger.debug "Calling API: DefaultApi.list_coverages ..."
198
209
  end
199
-
200
210
  if opts[:'categories_taxonomy'] && !['iab-qag', 'iptc-subjectcode'].include?(opts[:'categories_taxonomy'])
201
- fail 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
211
+ fail ArgumentError, 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
202
212
  end
203
-
204
213
  if opts[:'sentiment_title_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_title_polarity'])
205
- fail 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
214
+ fail ArgumentError, 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
206
215
  end
207
-
208
216
  if opts[:'sentiment_body_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_body_polarity'])
209
- fail 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
217
+ fail ArgumentError, 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
218
+ end
219
+
220
+ if opts[:'cluster_algorithm'] && !['stc', 'lingo', 'kmeans'].include?(opts[:'cluster_algorithm'])
221
+ fail ArgumentError, 'invalid value for "cluster_algorithm", must be one of stc, lingo, kmeans'
210
222
  end
211
-
212
223
  if opts[:'story_language'] && !['auto', 'en', 'de', 'fr', 'it', 'es', 'pt'].include?(opts[:'story_language'])
213
- fail 'invalid value for "story_language", must be one of auto, en, de, fr, it, es, pt'
224
+ fail ArgumentError, 'invalid value for "story_language", must be one of auto, en, de, fr, it, es, pt'
214
225
  end
215
-
226
+
216
227
  # resource path
217
228
  local_var_path = "/coverages".sub('{format}','json')
218
229
 
@@ -232,49 +243,55 @@ module AylienNewsApi
232
243
 
233
244
  # form parameters
234
245
  form_params = {}
235
- form_params["id[]"] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id']
236
- form_params["title"] = opts[:'title'] if opts[:'title']
237
- form_params["body"] = opts[:'body'] if opts[:'body']
238
- form_params["text"] = opts[:'text'] if opts[:'text']
239
- form_params["language[]"] = @api_client.build_collection_param(opts[:'language'], :multi) if opts[:'language']
240
- form_params["published_at.start"] = opts[:'published_at_start'] if opts[:'published_at_start']
241
- form_params["published_at.end"] = opts[:'published_at_end'] if opts[:'published_at_end']
242
- form_params["categories.taxonomy"] = opts[:'categories_taxonomy'] if opts[:'categories_taxonomy']
243
- form_params["categories.confident"] = opts[:'categories_confident'] if opts[:'categories_confident']
244
- form_params["categories.id[]"] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if opts[:'categories_id']
245
- form_params["categories.level[]"] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if opts[:'categories_level']
246
- form_params["entities.title.text[]"] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if opts[:'entities_title_text']
247
- form_params["entities.title.type[]"] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if opts[:'entities_title_type']
248
- form_params["entities.title.links.dbpedia[]"] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if opts[:'entities_title_links_dbpedia']
249
- form_params["entities.body.text[]"] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if opts[:'entities_body_text']
250
- form_params["entities.body.type[]"] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if opts[:'entities_body_type']
251
- form_params["entities.body.links.dbpedia[]"] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if opts[:'entities_body_links_dbpedia']
252
- form_params["sentiment.title.polarity"] = opts[:'sentiment_title_polarity'] if opts[:'sentiment_title_polarity']
253
- form_params["sentiment.body.polarity"] = opts[:'sentiment_body_polarity'] if opts[:'sentiment_body_polarity']
254
- form_params["author.id[]"] = @api_client.build_collection_param(opts[:'author_id'], :multi) if opts[:'author_id']
255
- form_params["author.name"] = opts[:'author_name'] if opts[:'author_name']
256
- form_params["source.id[]"] = @api_client.build_collection_param(opts[:'source_id'], :multi) if opts[:'source_id']
257
- form_params["source.name[]"] = @api_client.build_collection_param(opts[:'source_name'], :multi) if opts[:'source_name']
258
- form_params["source.domain[]"] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if opts[:'source_domain']
259
- form_params["source.locations.country[]"] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if opts[:'source_locations_country']
260
- form_params["source.locations.state[]"] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if opts[:'source_locations_state']
261
- form_params["source.locations.city[]"] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if opts[:'source_locations_city']
262
- form_params["source.scopes.country[]"] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if opts[:'source_scopes_country']
263
- form_params["source.scopes.state[]"] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if opts[:'source_scopes_state']
264
- form_params["source.scopes.city[]"] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if opts[:'source_scopes_city']
265
- form_params["source.scopes.level[]"] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if opts[:'source_scopes_level']
266
- form_params["return[]"] = @api_client.build_collection_param(opts[:'_return'], :multi) if opts[:'_return']
267
- form_params["story_id"] = opts[:'story_id'] if opts[:'story_id']
268
- form_params["story_url"] = opts[:'story_url'] if opts[:'story_url']
269
- form_params["story_title"] = opts[:'story_title'] if opts[:'story_title']
270
- form_params["story_body"] = opts[:'story_body'] if opts[:'story_body']
271
- form_params["story_published_at"] = opts[:'story_published_at'] if opts[:'story_published_at']
272
- form_params["story_language"] = opts[:'story_language'] if opts[:'story_language']
273
- form_params["per_page"] = opts[:'per_page'] if opts[:'per_page']
246
+ form_params["id[]"] = @api_client.build_collection_param(opts[:'id'], :multi) if !opts[:'id'].nil?
247
+ form_params["title"] = opts[:'title'] if !opts[:'title'].nil?
248
+ form_params["body"] = opts[:'body'] if !opts[:'body'].nil?
249
+ form_params["text"] = opts[:'text'] if !opts[:'text'].nil?
250
+ form_params["language[]"] = @api_client.build_collection_param(opts[:'language'], :multi) if !opts[:'language'].nil?
251
+ form_params["published_at.start"] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
252
+ form_params["published_at.end"] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
253
+ form_params["categories.taxonomy"] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
254
+ form_params["categories.confident"] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
255
+ form_params["categories.id[]"] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if !opts[:'categories_id'].nil?
256
+ form_params["categories.level[]"] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if !opts[:'categories_level'].nil?
257
+ form_params["entities.title.text[]"] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if !opts[:'entities_title_text'].nil?
258
+ form_params["entities.title.type[]"] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if !opts[:'entities_title_type'].nil?
259
+ form_params["entities.title.links.dbpedia[]"] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if !opts[:'entities_title_links_dbpedia'].nil?
260
+ form_params["entities.body.text[]"] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if !opts[:'entities_body_text'].nil?
261
+ form_params["entities.body.type[]"] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if !opts[:'entities_body_type'].nil?
262
+ form_params["entities.body.links.dbpedia[]"] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if !opts[:'entities_body_links_dbpedia'].nil?
263
+ form_params["sentiment.title.polarity"] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
264
+ form_params["sentiment.body.polarity"] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
265
+ form_params["media.images.count.min"] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
266
+ form_params["media.images.count.max"] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
267
+ form_params["media.videos.count.min"] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
268
+ form_params["media.videos.count.max"] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
269
+ form_params["author.id[]"] = @api_client.build_collection_param(opts[:'author_id'], :multi) if !opts[:'author_id'].nil?
270
+ form_params["author.name"] = opts[:'author_name'] if !opts[:'author_name'].nil?
271
+ form_params["source.id[]"] = @api_client.build_collection_param(opts[:'source_id'], :multi) if !opts[:'source_id'].nil?
272
+ form_params["source.name[]"] = @api_client.build_collection_param(opts[:'source_name'], :multi) if !opts[:'source_name'].nil?
273
+ form_params["source.domain[]"] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if !opts[:'source_domain'].nil?
274
+ form_params["source.locations.country[]"] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if !opts[:'source_locations_country'].nil?
275
+ form_params["source.locations.state[]"] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if !opts[:'source_locations_state'].nil?
276
+ form_params["source.locations.city[]"] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if !opts[:'source_locations_city'].nil?
277
+ form_params["source.scopes.country[]"] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if !opts[:'source_scopes_country'].nil?
278
+ form_params["source.scopes.state[]"] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if !opts[:'source_scopes_state'].nil?
279
+ form_params["source.scopes.city[]"] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if !opts[:'source_scopes_city'].nil?
280
+ form_params["source.scopes.level[]"] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if !opts[:'source_scopes_level'].nil?
281
+ form_params["cluster"] = opts[:'cluster'] if !opts[:'cluster'].nil?
282
+ form_params["cluster.algorithm"] = opts[:'cluster_algorithm'] if !opts[:'cluster_algorithm'].nil?
283
+ form_params["return[]"] = @api_client.build_collection_param(opts[:'_return'], :multi) if !opts[:'_return'].nil?
284
+ form_params["story_id"] = opts[:'story_id'] if !opts[:'story_id'].nil?
285
+ form_params["story_url"] = opts[:'story_url'] if !opts[:'story_url'].nil?
286
+ form_params["story_title"] = opts[:'story_title'] if !opts[:'story_title'].nil?
287
+ form_params["story_body"] = opts[:'story_body'] if !opts[:'story_body'].nil?
288
+ form_params["story_published_at"] = opts[:'story_published_at'] if !opts[:'story_published_at'].nil?
289
+ form_params["story_language"] = opts[:'story_language'] if !opts[:'story_language'].nil?
290
+ form_params["per_page"] = opts[:'per_page'] if !opts[:'per_page'].nil?
274
291
 
275
292
  # http body (model)
276
293
  post_body = nil
277
- auth_names = ['app_key', 'app_id']
294
+ auth_names = ['app_key', 'app_id']
278
295
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
279
296
  :header_params => header_params,
280
297
  :query_params => query_params,
@@ -289,39 +306,43 @@ module AylienNewsApi
289
306
  end
290
307
 
291
308
  # List histograms
292
- # This endpoint is used for getting histograms based on the field parameter is passed.
309
+ # This endpoint is used for getting histograms based on the `field` parameter passed to the API.
293
310
  # @param [Hash] opts the optional parameters
294
311
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
295
312
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
296
313
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
297
314
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
298
315
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
299
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
300
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
301
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
316
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
317
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
318
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
302
319
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident. (default to true)
303
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
304
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
305
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
306
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
307
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
308
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
309
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
310
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
320
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
321
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
322
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
323
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
324
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
325
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
326
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
327
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
311
328
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
312
329
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
330
+ # @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.
331
+ # @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.
332
+ # @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.
333
+ # @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.
313
334
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
314
335
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
315
336
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
316
337
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
317
338
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
318
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
319
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
320
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
321
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
322
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
323
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
324
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
339
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
340
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
341
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
342
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
343
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
344
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
345
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
325
346
  # @option opts [Integer] :interval_start This parameter is used for setting the start data point of histogram intervals.
326
347
  # @option opts [Integer] :interval_end This parameter is used for setting the end data point of histogram intervals.
327
348
  # @option opts [Integer] :interval_width This parameter is used for setting the width of histogram intervals.
@@ -333,39 +354,43 @@ module AylienNewsApi
333
354
  end
334
355
 
335
356
  # List histograms
336
- # This endpoint is used for getting histograms based on the field parameter is passed.
357
+ # This endpoint is used for getting histograms based on the &#x60;field&#x60; parameter passed to the API.
337
358
  # @param [Hash] opts the optional parameters
338
359
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
339
360
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
340
361
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
341
362
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
342
363
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
343
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
344
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
345
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
364
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
365
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
366
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
346
367
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident.
347
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
348
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
349
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
350
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
351
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
352
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
353
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
354
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
368
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
369
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
370
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
371
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
372
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
373
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
374
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
375
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
355
376
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
356
377
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
378
+ # @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.
379
+ # @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.
380
+ # @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.
381
+ # @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.
357
382
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
358
383
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
359
384
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
360
385
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
361
386
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
362
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
363
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
364
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
365
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
366
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
367
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
368
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
387
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
388
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
389
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
390
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
391
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
392
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
393
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
369
394
  # @option opts [Integer] :interval_start This parameter is used for setting the start data point of histogram intervals.
370
395
  # @option opts [Integer] :interval_end This parameter is used for setting the end data point of histogram intervals.
371
396
  # @option opts [Integer] :interval_width This parameter is used for setting the width of histogram intervals.
@@ -373,65 +398,65 @@ module AylienNewsApi
373
398
  # @return [Array<(Histograms, Fixnum, Hash)>] Histograms data, response status code and response headers
374
399
  def list_histograms_with_http_info(opts = {})
375
400
  if @api_client.config.debugging
376
- @api_client.config.logger.debug "Calling API: DefaultApi#list_histograms ..."
401
+ @api_client.config.logger.debug "Calling API: DefaultApi.list_histograms ..."
377
402
  end
378
-
379
403
  if opts[:'categories_taxonomy'] && !['iab-qag', 'iptc-subjectcode'].include?(opts[:'categories_taxonomy'])
380
- fail 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
404
+ fail ArgumentError, 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
381
405
  end
382
-
383
406
  if opts[:'sentiment_title_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_title_polarity'])
384
- fail 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
407
+ fail ArgumentError, 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
385
408
  end
386
-
387
409
  if opts[:'sentiment_body_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_body_polarity'])
388
- fail 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
410
+ fail ArgumentError, 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
389
411
  end
390
-
391
- if opts[:'field'] && !['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'].include?(opts[:'field'])
392
- fail 'invalid value for "field", must be one of 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'
412
+
413
+ if opts[:'field'] && !['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'].include?(opts[:'field'])
414
+ fail ArgumentError, 'invalid value for "field", must be one of 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'
393
415
  end
394
-
395
416
  # resource path
396
417
  local_var_path = "/histograms".sub('{format}','json')
397
418
 
398
419
  # query parameters
399
420
  query_params = {}
400
- query_params[:'id[]'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id']
401
- query_params[:'title'] = opts[:'title'] if opts[:'title']
402
- query_params[:'body'] = opts[:'body'] if opts[:'body']
403
- query_params[:'text'] = opts[:'text'] if opts[:'text']
404
- query_params[:'language[]'] = @api_client.build_collection_param(opts[:'language'], :multi) if opts[:'language']
405
- query_params[:'published_at.start'] = opts[:'published_at_start'] if opts[:'published_at_start']
406
- query_params[:'published_at.end'] = opts[:'published_at_end'] if opts[:'published_at_end']
407
- query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if opts[:'categories_taxonomy']
408
- query_params[:'categories.confident'] = opts[:'categories_confident'] if opts[:'categories_confident']
409
- query_params[:'categories.id[]'] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if opts[:'categories_id']
410
- query_params[:'categories.level[]'] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if opts[:'categories_level']
411
- query_params[:'entities.title.text[]'] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if opts[:'entities_title_text']
412
- query_params[:'entities.title.type[]'] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if opts[:'entities_title_type']
413
- query_params[:'entities.title.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if opts[:'entities_title_links_dbpedia']
414
- query_params[:'entities.body.text[]'] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if opts[:'entities_body_text']
415
- query_params[:'entities.body.type[]'] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if opts[:'entities_body_type']
416
- query_params[:'entities.body.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if opts[:'entities_body_links_dbpedia']
417
- query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if opts[:'sentiment_title_polarity']
418
- query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if opts[:'sentiment_body_polarity']
419
- query_params[:'author.id[]'] = @api_client.build_collection_param(opts[:'author_id'], :multi) if opts[:'author_id']
420
- query_params[:'author.name'] = opts[:'author_name'] if opts[:'author_name']
421
- query_params[:'source.id[]'] = @api_client.build_collection_param(opts[:'source_id'], :multi) if opts[:'source_id']
422
- query_params[:'source.name[]'] = @api_client.build_collection_param(opts[:'source_name'], :multi) if opts[:'source_name']
423
- query_params[:'source.domain[]'] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if opts[:'source_domain']
424
- query_params[:'source.locations.country[]'] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if opts[:'source_locations_country']
425
- query_params[:'source.locations.state[]'] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if opts[:'source_locations_state']
426
- query_params[:'source.locations.city[]'] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if opts[:'source_locations_city']
427
- query_params[:'source.scopes.country[]'] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if opts[:'source_scopes_country']
428
- query_params[:'source.scopes.state[]'] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if opts[:'source_scopes_state']
429
- query_params[:'source.scopes.city[]'] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if opts[:'source_scopes_city']
430
- query_params[:'source.scopes.level[]'] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if opts[:'source_scopes_level']
431
- query_params[:'interval.start'] = opts[:'interval_start'] if opts[:'interval_start']
432
- query_params[:'interval.end'] = opts[:'interval_end'] if opts[:'interval_end']
433
- query_params[:'interval.width'] = opts[:'interval_width'] if opts[:'interval_width']
434
- query_params[:'field'] = opts[:'field'] if opts[:'field']
421
+ query_params[:'id[]'] = @api_client.build_collection_param(opts[:'id'], :multi) if !opts[:'id'].nil?
422
+ query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
423
+ query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
424
+ query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
425
+ query_params[:'language[]'] = @api_client.build_collection_param(opts[:'language'], :multi) if !opts[:'language'].nil?
426
+ query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
427
+ query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
428
+ query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
429
+ query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
430
+ query_params[:'categories.id[]'] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if !opts[:'categories_id'].nil?
431
+ query_params[:'categories.level[]'] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if !opts[:'categories_level'].nil?
432
+ query_params[:'entities.title.text[]'] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if !opts[:'entities_title_text'].nil?
433
+ query_params[:'entities.title.type[]'] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if !opts[:'entities_title_type'].nil?
434
+ query_params[:'entities.title.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if !opts[:'entities_title_links_dbpedia'].nil?
435
+ query_params[:'entities.body.text[]'] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if !opts[:'entities_body_text'].nil?
436
+ query_params[:'entities.body.type[]'] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if !opts[:'entities_body_type'].nil?
437
+ query_params[:'entities.body.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if !opts[:'entities_body_links_dbpedia'].nil?
438
+ query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
439
+ query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
440
+ query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
441
+ query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
442
+ query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
443
+ query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
444
+ query_params[:'author.id[]'] = @api_client.build_collection_param(opts[:'author_id'], :multi) if !opts[:'author_id'].nil?
445
+ query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
446
+ query_params[:'source.id[]'] = @api_client.build_collection_param(opts[:'source_id'], :multi) if !opts[:'source_id'].nil?
447
+ query_params[:'source.name[]'] = @api_client.build_collection_param(opts[:'source_name'], :multi) if !opts[:'source_name'].nil?
448
+ query_params[:'source.domain[]'] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if !opts[:'source_domain'].nil?
449
+ query_params[:'source.locations.country[]'] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if !opts[:'source_locations_country'].nil?
450
+ query_params[:'source.locations.state[]'] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if !opts[:'source_locations_state'].nil?
451
+ query_params[:'source.locations.city[]'] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if !opts[:'source_locations_city'].nil?
452
+ query_params[:'source.scopes.country[]'] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if !opts[:'source_scopes_country'].nil?
453
+ query_params[:'source.scopes.state[]'] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if !opts[:'source_scopes_state'].nil?
454
+ query_params[:'source.scopes.city[]'] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if !opts[:'source_scopes_city'].nil?
455
+ query_params[:'source.scopes.level[]'] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if !opts[:'source_scopes_level'].nil?
456
+ query_params[:'interval.start'] = opts[:'interval_start'] if !opts[:'interval_start'].nil?
457
+ query_params[:'interval.end'] = opts[:'interval_end'] if !opts[:'interval_end'].nil?
458
+ query_params[:'interval.width'] = opts[:'interval_width'] if !opts[:'interval_width'].nil?
459
+ query_params[:'field'] = opts[:'field'] if !opts[:'field'].nil?
435
460
 
436
461
  # header parameters
437
462
  header_params = {}
@@ -449,7 +474,7 @@ module AylienNewsApi
449
474
 
450
475
  # http body (model)
451
476
  post_body = nil
452
- auth_names = ['app_key', 'app_id']
477
+ auth_names = ['app_key', 'app_id']
453
478
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
454
479
  :header_params => header_params,
455
480
  :query_params => query_params,
@@ -464,47 +489,53 @@ module AylienNewsApi
464
489
  end
465
490
 
466
491
  # List related stories
467
- # This endpoint is used for finding related stories based on provided parameters. The number of related stories to return, up to a maximum of 100.
492
+ # This endpoint is used for finding related stories based on the parameters provided. The maximum number of related stories returned is 100.
468
493
  # @param [Hash] opts the optional parameters
469
494
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
470
495
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
471
496
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
472
497
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
473
498
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
474
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
475
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
476
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
499
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
500
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
501
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
477
502
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident. (default to true)
478
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
479
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
480
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
481
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
482
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
483
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
484
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
485
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
503
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
504
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
505
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
506
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
507
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
508
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
509
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
510
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
486
511
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
487
512
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
513
+ # @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.
514
+ # @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.
515
+ # @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.
516
+ # @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.
488
517
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
489
518
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
490
519
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
491
520
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
492
521
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
493
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
494
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
495
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
496
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
497
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
498
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
499
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
522
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
523
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
524
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
525
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
526
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
527
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
528
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
529
+ # @option opts [BOOLEAN] :cluster This parameter enables clustering for the returned stories. (default to false)
530
+ # @option opts [String] :cluster_algorithm This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms. (default to lingo)
500
531
  # @option opts [Array<String>] :_return This parameter is used for specifying return fields.
501
532
  # @option opts [Integer] :story_id A story id
502
533
  # @option opts [String] :story_url An article or webpage
503
534
  # @option opts [String] :story_title Title of the article
504
535
  # @option opts [String] :story_body Body of the article
505
- # @option opts [String] :boost_by This parameter is used for boosting result by the specified value.
506
- # @option opts [String] :story_language This parameter is used for setting language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. (default to auto)
507
- # @option opts [Integer] :per_page This parameter is used for specifying number of the items in each page. (default to 3)
536
+ # @option opts [String] :boost_by This parameter is used for boosting the result by the specified value.
537
+ # @option opts [String] :story_language This parameter is used for setting the language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. (default to auto)
538
+ # @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 3)
508
539
  # @return [RelatedStories]
509
540
  def list_related_stories(opts = {})
510
541
  data, _status_code, _headers = list_related_stories_with_http_info(opts)
@@ -512,73 +543,78 @@ module AylienNewsApi
512
543
  end
513
544
 
514
545
  # List related stories
515
- # This endpoint is used for finding related stories based on provided parameters. The number of related stories to return, up to a maximum of 100.
546
+ # This endpoint is used for finding related stories based on the parameters provided. The maximum number of related stories returned is 100.
516
547
  # @param [Hash] opts the optional parameters
517
548
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
518
549
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
519
550
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
520
551
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
521
552
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
522
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
523
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
524
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
553
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
554
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
555
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
525
556
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident.
526
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
527
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
528
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
529
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
530
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
531
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
532
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
533
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
557
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
558
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
559
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
560
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
561
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
562
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
563
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
564
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
534
565
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
535
566
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
567
+ # @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.
568
+ # @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.
569
+ # @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.
570
+ # @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.
536
571
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
537
572
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
538
573
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
539
574
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
540
575
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
541
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
542
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
543
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
544
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
545
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
546
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
547
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
576
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
577
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
578
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
579
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
580
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
581
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
582
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
583
+ # @option opts [BOOLEAN] :cluster This parameter enables clustering for the returned stories.
584
+ # @option opts [String] :cluster_algorithm This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms.
548
585
  # @option opts [Array<String>] :_return This parameter is used for specifying return fields.
549
586
  # @option opts [Integer] :story_id A story id
550
587
  # @option opts [String] :story_url An article or webpage
551
588
  # @option opts [String] :story_title Title of the article
552
589
  # @option opts [String] :story_body Body of the article
553
- # @option opts [String] :boost_by This parameter is used for boosting result by the specified value.
554
- # @option opts [String] :story_language This parameter is used for setting language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
555
- # @option opts [Integer] :per_page This parameter is used for specifying number of the items in each page.
590
+ # @option opts [String] :boost_by This parameter is used for boosting the result by the specified value.
591
+ # @option opts [String] :story_language This parameter is used for setting the language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
592
+ # @option opts [Integer] :per_page This parameter is used for specifying number of items in each page.
556
593
  # @return [Array<(RelatedStories, Fixnum, Hash)>] RelatedStories data, response status code and response headers
557
594
  def list_related_stories_with_http_info(opts = {})
558
595
  if @api_client.config.debugging
559
- @api_client.config.logger.debug "Calling API: DefaultApi#list_related_stories ..."
596
+ @api_client.config.logger.debug "Calling API: DefaultApi.list_related_stories ..."
560
597
  end
561
-
562
598
  if opts[:'categories_taxonomy'] && !['iab-qag', 'iptc-subjectcode'].include?(opts[:'categories_taxonomy'])
563
- fail 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
599
+ fail ArgumentError, 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
564
600
  end
565
-
566
601
  if opts[:'sentiment_title_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_title_polarity'])
567
- fail 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
602
+ fail ArgumentError, 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
568
603
  end
569
-
570
604
  if opts[:'sentiment_body_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_body_polarity'])
571
- fail 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
605
+ fail ArgumentError, 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
606
+ end
607
+
608
+ if opts[:'cluster_algorithm'] && !['stc', 'lingo', 'kmeans'].include?(opts[:'cluster_algorithm'])
609
+ fail ArgumentError, 'invalid value for "cluster_algorithm", must be one of stc, lingo, kmeans'
572
610
  end
573
-
574
611
  if opts[:'boost_by'] && !['recency', 'popularity'].include?(opts[:'boost_by'])
575
- fail 'invalid value for "boost_by", must be one of recency, popularity'
612
+ fail ArgumentError, 'invalid value for "boost_by", must be one of recency, popularity'
576
613
  end
577
-
578
614
  if opts[:'story_language'] && !['auto', 'en', 'de', 'fr', 'it', 'es', 'pt'].include?(opts[:'story_language'])
579
- fail 'invalid value for "story_language", must be one of auto, en, de, fr, it, es, pt'
615
+ fail ArgumentError, 'invalid value for "story_language", must be one of auto, en, de, fr, it, es, pt'
580
616
  end
581
-
617
+
582
618
  # resource path
583
619
  local_var_path = "/related_stories".sub('{format}','json')
584
620
 
@@ -598,49 +634,55 @@ module AylienNewsApi
598
634
 
599
635
  # form parameters
600
636
  form_params = {}
601
- form_params["id[]"] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id']
602
- form_params["title"] = opts[:'title'] if opts[:'title']
603
- form_params["body"] = opts[:'body'] if opts[:'body']
604
- form_params["text"] = opts[:'text'] if opts[:'text']
605
- form_params["language[]"] = @api_client.build_collection_param(opts[:'language'], :multi) if opts[:'language']
606
- form_params["published_at.start"] = opts[:'published_at_start'] if opts[:'published_at_start']
607
- form_params["published_at.end"] = opts[:'published_at_end'] if opts[:'published_at_end']
608
- form_params["categories.taxonomy"] = opts[:'categories_taxonomy'] if opts[:'categories_taxonomy']
609
- form_params["categories.confident"] = opts[:'categories_confident'] if opts[:'categories_confident']
610
- form_params["categories.id[]"] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if opts[:'categories_id']
611
- form_params["categories.level[]"] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if opts[:'categories_level']
612
- form_params["entities.title.text[]"] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if opts[:'entities_title_text']
613
- form_params["entities.title.type[]"] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if opts[:'entities_title_type']
614
- form_params["entities.title.links.dbpedia[]"] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if opts[:'entities_title_links_dbpedia']
615
- form_params["entities.body.text[]"] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if opts[:'entities_body_text']
616
- form_params["entities.body.type[]"] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if opts[:'entities_body_type']
617
- form_params["entities.body.links.dbpedia[]"] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if opts[:'entities_body_links_dbpedia']
618
- form_params["sentiment.title.polarity"] = opts[:'sentiment_title_polarity'] if opts[:'sentiment_title_polarity']
619
- form_params["sentiment.body.polarity"] = opts[:'sentiment_body_polarity'] if opts[:'sentiment_body_polarity']
620
- form_params["author.id[]"] = @api_client.build_collection_param(opts[:'author_id'], :multi) if opts[:'author_id']
621
- form_params["author.name"] = opts[:'author_name'] if opts[:'author_name']
622
- form_params["source.id[]"] = @api_client.build_collection_param(opts[:'source_id'], :multi) if opts[:'source_id']
623
- form_params["source.name[]"] = @api_client.build_collection_param(opts[:'source_name'], :multi) if opts[:'source_name']
624
- form_params["source.domain[]"] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if opts[:'source_domain']
625
- form_params["source.locations.country[]"] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if opts[:'source_locations_country']
626
- form_params["source.locations.state[]"] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if opts[:'source_locations_state']
627
- form_params["source.locations.city[]"] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if opts[:'source_locations_city']
628
- form_params["source.scopes.country[]"] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if opts[:'source_scopes_country']
629
- form_params["source.scopes.state[]"] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if opts[:'source_scopes_state']
630
- form_params["source.scopes.city[]"] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if opts[:'source_scopes_city']
631
- form_params["source.scopes.level[]"] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if opts[:'source_scopes_level']
632
- form_params["return[]"] = @api_client.build_collection_param(opts[:'_return'], :multi) if opts[:'_return']
633
- form_params["story_id"] = opts[:'story_id'] if opts[:'story_id']
634
- form_params["story_url"] = opts[:'story_url'] if opts[:'story_url']
635
- form_params["story_title"] = opts[:'story_title'] if opts[:'story_title']
636
- form_params["story_body"] = opts[:'story_body'] if opts[:'story_body']
637
- form_params["boost_by"] = opts[:'boost_by'] if opts[:'boost_by']
638
- form_params["story_language"] = opts[:'story_language'] if opts[:'story_language']
639
- form_params["per_page"] = opts[:'per_page'] if opts[:'per_page']
637
+ form_params["id[]"] = @api_client.build_collection_param(opts[:'id'], :multi) if !opts[:'id'].nil?
638
+ form_params["title"] = opts[:'title'] if !opts[:'title'].nil?
639
+ form_params["body"] = opts[:'body'] if !opts[:'body'].nil?
640
+ form_params["text"] = opts[:'text'] if !opts[:'text'].nil?
641
+ form_params["language[]"] = @api_client.build_collection_param(opts[:'language'], :multi) if !opts[:'language'].nil?
642
+ form_params["published_at.start"] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
643
+ form_params["published_at.end"] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
644
+ form_params["categories.taxonomy"] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
645
+ form_params["categories.confident"] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
646
+ form_params["categories.id[]"] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if !opts[:'categories_id'].nil?
647
+ form_params["categories.level[]"] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if !opts[:'categories_level'].nil?
648
+ form_params["entities.title.text[]"] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if !opts[:'entities_title_text'].nil?
649
+ form_params["entities.title.type[]"] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if !opts[:'entities_title_type'].nil?
650
+ form_params["entities.title.links.dbpedia[]"] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if !opts[:'entities_title_links_dbpedia'].nil?
651
+ form_params["entities.body.text[]"] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if !opts[:'entities_body_text'].nil?
652
+ form_params["entities.body.type[]"] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if !opts[:'entities_body_type'].nil?
653
+ form_params["entities.body.links.dbpedia[]"] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if !opts[:'entities_body_links_dbpedia'].nil?
654
+ form_params["sentiment.title.polarity"] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
655
+ form_params["sentiment.body.polarity"] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
656
+ form_params["media.images.count.min"] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
657
+ form_params["media.images.count.max"] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
658
+ form_params["media.videos.count.min"] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
659
+ form_params["media.videos.count.max"] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
660
+ form_params["author.id[]"] = @api_client.build_collection_param(opts[:'author_id'], :multi) if !opts[:'author_id'].nil?
661
+ form_params["author.name"] = opts[:'author_name'] if !opts[:'author_name'].nil?
662
+ form_params["source.id[]"] = @api_client.build_collection_param(opts[:'source_id'], :multi) if !opts[:'source_id'].nil?
663
+ form_params["source.name[]"] = @api_client.build_collection_param(opts[:'source_name'], :multi) if !opts[:'source_name'].nil?
664
+ form_params["source.domain[]"] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if !opts[:'source_domain'].nil?
665
+ form_params["source.locations.country[]"] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if !opts[:'source_locations_country'].nil?
666
+ form_params["source.locations.state[]"] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if !opts[:'source_locations_state'].nil?
667
+ form_params["source.locations.city[]"] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if !opts[:'source_locations_city'].nil?
668
+ form_params["source.scopes.country[]"] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if !opts[:'source_scopes_country'].nil?
669
+ form_params["source.scopes.state[]"] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if !opts[:'source_scopes_state'].nil?
670
+ form_params["source.scopes.city[]"] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if !opts[:'source_scopes_city'].nil?
671
+ form_params["source.scopes.level[]"] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if !opts[:'source_scopes_level'].nil?
672
+ form_params["cluster"] = opts[:'cluster'] if !opts[:'cluster'].nil?
673
+ form_params["cluster.algorithm"] = opts[:'cluster_algorithm'] if !opts[:'cluster_algorithm'].nil?
674
+ form_params["return[]"] = @api_client.build_collection_param(opts[:'_return'], :multi) if !opts[:'_return'].nil?
675
+ form_params["story_id"] = opts[:'story_id'] if !opts[:'story_id'].nil?
676
+ form_params["story_url"] = opts[:'story_url'] if !opts[:'story_url'].nil?
677
+ form_params["story_title"] = opts[:'story_title'] if !opts[:'story_title'].nil?
678
+ form_params["story_body"] = opts[:'story_body'] if !opts[:'story_body'].nil?
679
+ form_params["boost_by"] = opts[:'boost_by'] if !opts[:'boost_by'].nil?
680
+ form_params["story_language"] = opts[:'story_language'] if !opts[:'story_language'].nil?
681
+ form_params["per_page"] = opts[:'per_page'] if !opts[:'per_page'].nil?
640
682
 
641
683
  # http body (model)
642
684
  post_body = nil
643
- auth_names = ['app_key', 'app_id']
685
+ auth_names = ['app_key', 'app_id']
644
686
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
645
687
  :header_params => header_params,
646
688
  :query_params => query_params,
@@ -655,46 +697,50 @@ module AylienNewsApi
655
697
  end
656
698
 
657
699
  # List Stories
658
- # This endpoint is used for getting list of stories.
700
+ # This endpoint is used for getting a list of stories.
659
701
  # @param [Hash] opts the optional parameters
660
702
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
661
703
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
662
704
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
663
705
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
664
706
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
665
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
666
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
667
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
707
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
708
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
709
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
668
710
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident. (default to true)
669
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
670
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
671
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
672
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
673
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
674
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
675
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
676
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
711
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
712
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
713
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
714
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
715
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
716
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
717
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
718
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
677
719
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
678
720
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
721
+ # @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.
722
+ # @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.
723
+ # @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.
724
+ # @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.
679
725
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
680
726
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
681
727
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
682
728
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
683
729
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
684
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
685
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
686
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
687
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
688
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
689
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
690
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
730
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
731
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
732
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
733
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
734
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
735
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
736
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
691
737
  # @option opts [BOOLEAN] :cluster This parameter enables clustering for the returned stories. (default to false)
692
- # @option opts [String] :cluster_algorithm This parameter is used for specifying the clustering algorithm. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms. (default to lingo)
738
+ # @option opts [String] :cluster_algorithm This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms. (default to lingo)
693
739
  # @option opts [Array<String>] :_return This parameter is used for specifying return fields.
694
- # @option opts [String] :sort_by This parameter is used for changing the order column of the result. (default to published_at)
740
+ # @option opts [String] :sort_by This parameter is used for changing the order column of the results. (default to published_at)
695
741
  # @option opts [String] :sort_direction This parameter is used for changing the order direction of the result. (default to desc)
696
742
  # @option opts [String] :cursor This parameter is used for finding a specific page. (default to *)
697
- # @option opts [Integer] :per_page This parameter is used for specifying number of the items in each page. (default to 10)
743
+ # @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 10)
698
744
  # @return [Stories]
699
745
  def list_stories(opts = {})
700
746
  data, _status_code, _headers = list_stories_with_http_info(opts)
@@ -702,119 +748,122 @@ module AylienNewsApi
702
748
  end
703
749
 
704
750
  # List Stories
705
- # This endpoint is used for getting list of stories.
751
+ # This endpoint is used for getting a list of stories.
706
752
  # @param [Hash] opts the optional parameters
707
753
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
708
754
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
709
755
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
710
756
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
711
757
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
712
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
713
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
714
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
758
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
759
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
760
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
715
761
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident.
716
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
717
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
718
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
719
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
720
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
721
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
722
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
723
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
762
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
763
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
764
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
765
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
766
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
767
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
768
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
769
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
724
770
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
725
771
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
772
+ # @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.
773
+ # @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.
774
+ # @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.
775
+ # @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.
726
776
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
727
777
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
728
778
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
729
779
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
730
780
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
731
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
732
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
733
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
734
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
735
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
736
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
737
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
781
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
782
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
783
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
784
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
785
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
786
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
787
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
738
788
  # @option opts [BOOLEAN] :cluster This parameter enables clustering for the returned stories.
739
- # @option opts [String] :cluster_algorithm This parameter is used for specifying the clustering algorithm. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms.
789
+ # @option opts [String] :cluster_algorithm This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms.
740
790
  # @option opts [Array<String>] :_return This parameter is used for specifying return fields.
741
- # @option opts [String] :sort_by This parameter is used for changing the order column of the result.
791
+ # @option opts [String] :sort_by This parameter is used for changing the order column of the results.
742
792
  # @option opts [String] :sort_direction This parameter is used for changing the order direction of the result.
743
793
  # @option opts [String] :cursor This parameter is used for finding a specific page.
744
- # @option opts [Integer] :per_page This parameter is used for specifying number of the items in each page.
794
+ # @option opts [Integer] :per_page This parameter is used for specifying number of items in each page.
745
795
  # @return [Array<(Stories, Fixnum, Hash)>] Stories data, response status code and response headers
746
796
  def list_stories_with_http_info(opts = {})
747
797
  if @api_client.config.debugging
748
- @api_client.config.logger.debug "Calling API: DefaultApi#list_stories ..."
798
+ @api_client.config.logger.debug "Calling API: DefaultApi.list_stories ..."
749
799
  end
750
-
751
800
  if opts[:'categories_taxonomy'] && !['iab-qag', 'iptc-subjectcode'].include?(opts[:'categories_taxonomy'])
752
- fail 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
801
+ fail ArgumentError, 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
753
802
  end
754
-
755
803
  if opts[:'sentiment_title_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_title_polarity'])
756
- fail 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
804
+ fail ArgumentError, 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
757
805
  end
758
-
759
806
  if opts[:'sentiment_body_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_body_polarity'])
760
- fail 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
807
+ fail ArgumentError, 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
761
808
  end
762
-
809
+
763
810
  if opts[:'cluster_algorithm'] && !['stc', 'lingo', 'kmeans'].include?(opts[:'cluster_algorithm'])
764
- fail 'invalid value for "cluster_algorithm", must be one of stc, lingo, kmeans'
811
+ fail ArgumentError, 'invalid value for "cluster_algorithm", must be one of stc, lingo, kmeans'
765
812
  end
766
-
767
- if opts[:'sort_by'] && !['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'].include?(opts[:'sort_by'])
768
- fail 'invalid value for "sort_by", must be one of 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'
813
+ if opts[:'sort_by'] && !['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'].include?(opts[:'sort_by'])
814
+ fail ArgumentError, 'invalid value for "sort_by", must be one of 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'
769
815
  end
770
-
771
816
  if opts[:'sort_direction'] && !['asc', 'desc'].include?(opts[:'sort_direction'])
772
- fail 'invalid value for "sort_direction", must be one of asc, desc'
817
+ fail ArgumentError, 'invalid value for "sort_direction", must be one of asc, desc'
773
818
  end
774
-
819
+
775
820
  # resource path
776
821
  local_var_path = "/stories".sub('{format}','json')
777
822
 
778
823
  # query parameters
779
824
  query_params = {}
780
- query_params[:'id[]'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id']
781
- query_params[:'title'] = opts[:'title'] if opts[:'title']
782
- query_params[:'body'] = opts[:'body'] if opts[:'body']
783
- query_params[:'text'] = opts[:'text'] if opts[:'text']
784
- query_params[:'language[]'] = @api_client.build_collection_param(opts[:'language'], :multi) if opts[:'language']
785
- query_params[:'published_at.start'] = opts[:'published_at_start'] if opts[:'published_at_start']
786
- query_params[:'published_at.end'] = opts[:'published_at_end'] if opts[:'published_at_end']
787
- query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if opts[:'categories_taxonomy']
788
- query_params[:'categories.confident'] = opts[:'categories_confident'] if opts[:'categories_confident']
789
- query_params[:'categories.id[]'] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if opts[:'categories_id']
790
- query_params[:'categories.level[]'] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if opts[:'categories_level']
791
- query_params[:'entities.title.text[]'] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if opts[:'entities_title_text']
792
- query_params[:'entities.title.type[]'] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if opts[:'entities_title_type']
793
- query_params[:'entities.title.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if opts[:'entities_title_links_dbpedia']
794
- query_params[:'entities.body.text[]'] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if opts[:'entities_body_text']
795
- query_params[:'entities.body.type[]'] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if opts[:'entities_body_type']
796
- query_params[:'entities.body.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if opts[:'entities_body_links_dbpedia']
797
- query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if opts[:'sentiment_title_polarity']
798
- query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if opts[:'sentiment_body_polarity']
799
- query_params[:'author.id[]'] = @api_client.build_collection_param(opts[:'author_id'], :multi) if opts[:'author_id']
800
- query_params[:'author.name'] = opts[:'author_name'] if opts[:'author_name']
801
- query_params[:'source.id[]'] = @api_client.build_collection_param(opts[:'source_id'], :multi) if opts[:'source_id']
802
- query_params[:'source.name[]'] = @api_client.build_collection_param(opts[:'source_name'], :multi) if opts[:'source_name']
803
- query_params[:'source.domain[]'] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if opts[:'source_domain']
804
- query_params[:'source.locations.country[]'] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if opts[:'source_locations_country']
805
- query_params[:'source.locations.state[]'] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if opts[:'source_locations_state']
806
- query_params[:'source.locations.city[]'] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if opts[:'source_locations_city']
807
- query_params[:'source.scopes.country[]'] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if opts[:'source_scopes_country']
808
- query_params[:'source.scopes.state[]'] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if opts[:'source_scopes_state']
809
- query_params[:'source.scopes.city[]'] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if opts[:'source_scopes_city']
810
- query_params[:'source.scopes.level[]'] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if opts[:'source_scopes_level']
811
- query_params[:'cluster'] = opts[:'cluster'] if opts[:'cluster']
812
- query_params[:'cluster.algorithm'] = opts[:'cluster_algorithm'] if opts[:'cluster_algorithm']
813
- query_params[:'return[]'] = @api_client.build_collection_param(opts[:'_return'], :multi) if opts[:'_return']
814
- query_params[:'sort_by'] = opts[:'sort_by'] if opts[:'sort_by']
815
- query_params[:'sort_direction'] = opts[:'sort_direction'] if opts[:'sort_direction']
816
- query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor']
817
- query_params[:'per_page'] = opts[:'per_page'] if opts[:'per_page']
825
+ query_params[:'id[]'] = @api_client.build_collection_param(opts[:'id'], :multi) if !opts[:'id'].nil?
826
+ query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
827
+ query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
828
+ query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
829
+ query_params[:'language[]'] = @api_client.build_collection_param(opts[:'language'], :multi) if !opts[:'language'].nil?
830
+ query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
831
+ query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
832
+ query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
833
+ query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
834
+ query_params[:'categories.id[]'] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if !opts[:'categories_id'].nil?
835
+ query_params[:'categories.level[]'] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if !opts[:'categories_level'].nil?
836
+ query_params[:'entities.title.text[]'] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if !opts[:'entities_title_text'].nil?
837
+ query_params[:'entities.title.type[]'] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if !opts[:'entities_title_type'].nil?
838
+ query_params[:'entities.title.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if !opts[:'entities_title_links_dbpedia'].nil?
839
+ query_params[:'entities.body.text[]'] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if !opts[:'entities_body_text'].nil?
840
+ query_params[:'entities.body.type[]'] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if !opts[:'entities_body_type'].nil?
841
+ query_params[:'entities.body.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if !opts[:'entities_body_links_dbpedia'].nil?
842
+ query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
843
+ query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
844
+ query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
845
+ query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
846
+ query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
847
+ query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
848
+ query_params[:'author.id[]'] = @api_client.build_collection_param(opts[:'author_id'], :multi) if !opts[:'author_id'].nil?
849
+ query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
850
+ query_params[:'source.id[]'] = @api_client.build_collection_param(opts[:'source_id'], :multi) if !opts[:'source_id'].nil?
851
+ query_params[:'source.name[]'] = @api_client.build_collection_param(opts[:'source_name'], :multi) if !opts[:'source_name'].nil?
852
+ query_params[:'source.domain[]'] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if !opts[:'source_domain'].nil?
853
+ query_params[:'source.locations.country[]'] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if !opts[:'source_locations_country'].nil?
854
+ query_params[:'source.locations.state[]'] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if !opts[:'source_locations_state'].nil?
855
+ query_params[:'source.locations.city[]'] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if !opts[:'source_locations_city'].nil?
856
+ query_params[:'source.scopes.country[]'] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if !opts[:'source_scopes_country'].nil?
857
+ query_params[:'source.scopes.state[]'] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if !opts[:'source_scopes_state'].nil?
858
+ query_params[:'source.scopes.city[]'] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if !opts[:'source_scopes_city'].nil?
859
+ query_params[:'source.scopes.level[]'] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if !opts[:'source_scopes_level'].nil?
860
+ query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
861
+ query_params[:'cluster.algorithm'] = opts[:'cluster_algorithm'] if !opts[:'cluster_algorithm'].nil?
862
+ query_params[:'return[]'] = @api_client.build_collection_param(opts[:'_return'], :multi) if !opts[:'_return'].nil?
863
+ query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
864
+ query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
865
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
866
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
818
867
 
819
868
  # header parameters
820
869
  header_params = {}
@@ -832,7 +881,7 @@ module AylienNewsApi
832
881
 
833
882
  # http body (model)
834
883
  post_body = nil
835
- auth_names = ['app_key', 'app_id']
884
+ auth_names = ['app_key', 'app_id']
836
885
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
837
886
  :header_params => header_params,
838
887
  :query_params => query_params,
@@ -854,33 +903,37 @@ module AylienNewsApi
854
903
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
855
904
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
856
905
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
857
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
906
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
858
907
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident. (default to true)
859
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
860
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
861
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
862
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
863
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
864
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
865
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
866
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
908
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
909
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
910
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
911
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
912
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
913
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
914
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
915
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
867
916
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
868
917
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
918
+ # @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.
919
+ # @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.
920
+ # @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.
921
+ # @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.
869
922
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
870
923
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
871
924
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
872
925
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
873
926
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
874
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
875
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
876
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
877
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
878
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
879
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
880
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
881
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). (default to NOW-7DAYS/DAY)
882
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). (default to NOW/DAY)
883
- # @option opts [String] :period The size of each date range 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](https://newsapi.aylien.com/docs/working-with-dates#date-math). (default to +1DAY)
927
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
928
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
929
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
930
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
931
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
932
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
933
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
934
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). (default to NOW-7DAYS/DAY)
935
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). (default to NOW/DAY)
936
+ # @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](https://newsapi.aylien.com/docs/working-with-dates#date-math). (default to +1DAY)
884
937
  # @return [TimeSeriesList]
885
938
  def list_time_series(opts = {})
886
939
  data, _status_code, _headers = list_time_series_with_http_info(opts)
@@ -895,88 +948,93 @@ module AylienNewsApi
895
948
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
896
949
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
897
950
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
898
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
951
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
899
952
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident.
900
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
901
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
902
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
903
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
904
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
905
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
906
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
907
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
953
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
954
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
955
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
956
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
957
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
958
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
959
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
960
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
908
961
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
909
962
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
963
+ # @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.
964
+ # @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.
965
+ # @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.
966
+ # @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.
910
967
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
911
968
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
912
969
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
913
970
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
914
971
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
915
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
916
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
917
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
918
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
919
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
920
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
921
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
922
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
923
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
924
- # @option opts [String] :period The size of each date range 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](https://newsapi.aylien.com/docs/working-with-dates#date-math).
972
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
973
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
974
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
975
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
976
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
977
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
978
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
979
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
980
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
981
+ # @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](https://newsapi.aylien.com/docs/working-with-dates#date-math).
925
982
  # @return [Array<(TimeSeriesList, Fixnum, Hash)>] TimeSeriesList data, response status code and response headers
926
983
  def list_time_series_with_http_info(opts = {})
927
984
  if @api_client.config.debugging
928
- @api_client.config.logger.debug "Calling API: DefaultApi#list_time_series ..."
985
+ @api_client.config.logger.debug "Calling API: DefaultApi.list_time_series ..."
929
986
  end
930
-
931
987
  if opts[:'categories_taxonomy'] && !['iab-qag', 'iptc-subjectcode'].include?(opts[:'categories_taxonomy'])
932
- fail 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
988
+ fail ArgumentError, 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
933
989
  end
934
-
935
990
  if opts[:'sentiment_title_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_title_polarity'])
936
- fail 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
991
+ fail ArgumentError, 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
937
992
  end
938
-
939
993
  if opts[:'sentiment_body_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_body_polarity'])
940
- fail 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
994
+ fail ArgumentError, 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
941
995
  end
942
-
996
+
943
997
  # resource path
944
998
  local_var_path = "/time_series".sub('{format}','json')
945
999
 
946
1000
  # query parameters
947
1001
  query_params = {}
948
- query_params[:'id[]'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id']
949
- query_params[:'title'] = opts[:'title'] if opts[:'title']
950
- query_params[:'body'] = opts[:'body'] if opts[:'body']
951
- query_params[:'text'] = opts[:'text'] if opts[:'text']
952
- query_params[:'language[]'] = @api_client.build_collection_param(opts[:'language'], :multi) if opts[:'language']
953
- query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if opts[:'categories_taxonomy']
954
- query_params[:'categories.confident'] = opts[:'categories_confident'] if opts[:'categories_confident']
955
- query_params[:'categories.id[]'] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if opts[:'categories_id']
956
- query_params[:'categories.level[]'] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if opts[:'categories_level']
957
- query_params[:'entities.title.text[]'] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if opts[:'entities_title_text']
958
- query_params[:'entities.title.type[]'] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if opts[:'entities_title_type']
959
- query_params[:'entities.title.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if opts[:'entities_title_links_dbpedia']
960
- query_params[:'entities.body.text[]'] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if opts[:'entities_body_text']
961
- query_params[:'entities.body.type[]'] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if opts[:'entities_body_type']
962
- query_params[:'entities.body.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if opts[:'entities_body_links_dbpedia']
963
- query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if opts[:'sentiment_title_polarity']
964
- query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if opts[:'sentiment_body_polarity']
965
- query_params[:'author.id[]'] = @api_client.build_collection_param(opts[:'author_id'], :multi) if opts[:'author_id']
966
- query_params[:'author.name'] = opts[:'author_name'] if opts[:'author_name']
967
- query_params[:'source.id[]'] = @api_client.build_collection_param(opts[:'source_id'], :multi) if opts[:'source_id']
968
- query_params[:'source.name[]'] = @api_client.build_collection_param(opts[:'source_name'], :multi) if opts[:'source_name']
969
- query_params[:'source.domain[]'] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if opts[:'source_domain']
970
- query_params[:'source.locations.country[]'] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if opts[:'source_locations_country']
971
- query_params[:'source.locations.state[]'] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if opts[:'source_locations_state']
972
- query_params[:'source.locations.city[]'] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if opts[:'source_locations_city']
973
- query_params[:'source.scopes.country[]'] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if opts[:'source_scopes_country']
974
- query_params[:'source.scopes.state[]'] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if opts[:'source_scopes_state']
975
- query_params[:'source.scopes.city[]'] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if opts[:'source_scopes_city']
976
- query_params[:'source.scopes.level[]'] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if opts[:'source_scopes_level']
977
- query_params[:'published_at.start'] = opts[:'published_at_start'] if opts[:'published_at_start']
978
- query_params[:'published_at.end'] = opts[:'published_at_end'] if opts[:'published_at_end']
979
- query_params[:'period'] = opts[:'period'] if opts[:'period']
1002
+ query_params[:'id[]'] = @api_client.build_collection_param(opts[:'id'], :multi) if !opts[:'id'].nil?
1003
+ query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
1004
+ query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
1005
+ query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
1006
+ query_params[:'language[]'] = @api_client.build_collection_param(opts[:'language'], :multi) if !opts[:'language'].nil?
1007
+ query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
1008
+ query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
1009
+ query_params[:'categories.id[]'] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if !opts[:'categories_id'].nil?
1010
+ query_params[:'categories.level[]'] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if !opts[:'categories_level'].nil?
1011
+ query_params[:'entities.title.text[]'] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if !opts[:'entities_title_text'].nil?
1012
+ query_params[:'entities.title.type[]'] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if !opts[:'entities_title_type'].nil?
1013
+ query_params[:'entities.title.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if !opts[:'entities_title_links_dbpedia'].nil?
1014
+ query_params[:'entities.body.text[]'] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if !opts[:'entities_body_text'].nil?
1015
+ query_params[:'entities.body.type[]'] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if !opts[:'entities_body_type'].nil?
1016
+ query_params[:'entities.body.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if !opts[:'entities_body_links_dbpedia'].nil?
1017
+ query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
1018
+ query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
1019
+ query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
1020
+ query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
1021
+ query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
1022
+ query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
1023
+ query_params[:'author.id[]'] = @api_client.build_collection_param(opts[:'author_id'], :multi) if !opts[:'author_id'].nil?
1024
+ query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
1025
+ query_params[:'source.id[]'] = @api_client.build_collection_param(opts[:'source_id'], :multi) if !opts[:'source_id'].nil?
1026
+ query_params[:'source.name[]'] = @api_client.build_collection_param(opts[:'source_name'], :multi) if !opts[:'source_name'].nil?
1027
+ query_params[:'source.domain[]'] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if !opts[:'source_domain'].nil?
1028
+ query_params[:'source.locations.country[]'] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if !opts[:'source_locations_country'].nil?
1029
+ query_params[:'source.locations.state[]'] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if !opts[:'source_locations_state'].nil?
1030
+ query_params[:'source.locations.city[]'] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if !opts[:'source_locations_city'].nil?
1031
+ query_params[:'source.scopes.country[]'] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if !opts[:'source_scopes_country'].nil?
1032
+ query_params[:'source.scopes.state[]'] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if !opts[:'source_scopes_state'].nil?
1033
+ query_params[:'source.scopes.city[]'] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if !opts[:'source_scopes_city'].nil?
1034
+ query_params[:'source.scopes.level[]'] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if !opts[:'source_scopes_level'].nil?
1035
+ query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
1036
+ query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
1037
+ query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
980
1038
 
981
1039
  # header parameters
982
1040
  header_params = {}
@@ -994,7 +1052,7 @@ module AylienNewsApi
994
1052
 
995
1053
  # http body (model)
996
1054
  post_body = nil
997
- auth_names = ['app_key', 'app_id']
1055
+ auth_names = ['app_key', 'app_id']
998
1056
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
999
1057
  :header_params => header_params,
1000
1058
  :query_params => query_params,
@@ -1009,39 +1067,43 @@ module AylienNewsApi
1009
1067
  end
1010
1068
 
1011
1069
  # List trends
1012
- # This endpoint is used for finding news trendings based on stories resource.
1070
+ # This endpoint is used for finding trends based on stories.
1013
1071
  # @param [Hash] opts the optional parameters
1014
1072
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
1015
1073
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
1016
1074
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
1017
1075
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
1018
1076
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
1019
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
1020
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
1021
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
1077
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
1078
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
1079
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
1022
1080
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident. (default to true)
1023
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
1024
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
1025
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
1026
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
1027
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
1028
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
1029
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
1030
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
1081
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
1082
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
1083
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
1084
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
1085
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
1086
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
1087
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
1088
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
1031
1089
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
1032
1090
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
1091
+ # @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.
1092
+ # @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.
1093
+ # @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.
1094
+ # @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.
1033
1095
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
1034
1096
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
1035
1097
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
1036
1098
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
1037
1099
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
1038
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
1039
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
1040
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
1041
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
1042
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
1043
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
1044
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
1100
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1101
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1102
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1103
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1104
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1105
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1106
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1045
1107
  # @option opts [String] :field This parameter is used to specify the trend field.
1046
1108
  # @return [Trends]
1047
1109
  def list_trends(opts = {})
@@ -1050,99 +1112,103 @@ module AylienNewsApi
1050
1112
  end
1051
1113
 
1052
1114
  # List trends
1053
- # This endpoint is used for finding news trendings based on stories resource.
1115
+ # This endpoint is used for finding trends based on stories.
1054
1116
  # @param [Hash] opts the optional parameters
1055
1117
  # @option opts [Array<Integer>] :id This parameter is used for finding stroies by story id.
1056
1118
  # @option opts [String] :title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
1057
1119
  # @option opts [String] :body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
1058
1120
  # @option opts [String] :text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
1059
1121
  # @option opts [Array<String>] :language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
1060
- # @option opts [String] :published_at_start This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
1061
- # @option opts [String] :published_at_end This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
1062
- # @option opts [String] :categories_taxonomy This parameter is used for defining type of the taxonomy for the rest of categories queries.
1122
+ # @option opts [String] :published_at_start This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
1123
+ # @option opts [String] :published_at_end This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
1124
+ # @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries.
1063
1125
  # @option opts [BOOLEAN] :categories_confident This parameter is used for finding stories whose categories are confident.
1064
- # @option opts [Array<String>] :categories_id This parameter is used for finding stories whose categories id is the specified value.
1065
- # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories whose categories level is the specified value.
1066
- # @option opts [Array<String>] :entities_title_text This parameter is used for finding stories whose entities text in title is the specified value.
1067
- # @option opts [Array<String>] :entities_title_type This parameter is used for finding stories whose entities type in title is the specified value.
1068
- # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
1069
- # @option opts [Array<String>] :entities_body_text This parameter is used for finding stories whose entities text in body is the specified value.
1070
- # @option opts [Array<String>] :entities_body_type This parameter is used for finding stories whose entities type in body is the specified value.
1071
- # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
1126
+ # @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id.
1127
+ # @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level.
1128
+ # @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in story titles.
1129
+ # @option opts [Array<String>] :entities_title_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in story titles.
1130
+ # @option opts [Array<String>] :entities_title_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles.
1131
+ # @option opts [Array<String>] :entities_body_text This parameter is used to find stories based on the specified entities &#x60;text&#x60; in the body of stories.
1132
+ # @option opts [Array<String>] :entities_body_type This parameter is used to find stories based on the specified entities &#x60;type&#x60; in the body of stories.
1133
+ # @option opts [Array<String>] :entities_body_links_dbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories.
1072
1134
  # @option opts [String] :sentiment_title_polarity This parameter is used for finding stories whose title sentiment is the specified value.
1073
1135
  # @option opts [String] :sentiment_body_polarity This parameter is used for finding stories whose body sentiment is the specified value.
1136
+ # @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.
1137
+ # @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.
1138
+ # @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.
1139
+ # @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.
1074
1140
  # @option opts [Array<Integer>] :author_id This parameter is used for finding stories whose author id is the specified value.
1075
1141
  # @option opts [String] :author_name This parameter is used for finding stories whose author full name contains the specified value.
1076
1142
  # @option opts [Array<Integer>] :source_id This parameter is used for finding stories whose source id is the specified value.
1077
1143
  # @option opts [Array<String>] :source_name This parameter is used for finding stories whose source name contains the specified value.
1078
1144
  # @option opts [Array<String>] :source_domain This parameter is used for finding stories whose source domain is the specified value.
1079
- # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
1080
- # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value.
1081
- # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value.
1082
- # @option opts [Array<String>] :source_scopes_country This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
1083
- # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes state/province is the specified value.
1084
- # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes city is the specified value.
1085
- # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes level is the specified value.
1145
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1146
+ # @option opts [Array<String>] :source_locations_state This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1147
+ # @option opts [Array<String>] :source_locations_city This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1148
+ # @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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1149
+ # @option opts [Array<String>] :source_scopes_state This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1150
+ # @option opts [Array<String>] :source_scopes_city This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1151
+ # @option opts [Array<String>] :source_scopes_level This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations).
1086
1152
  # @option opts [String] :field This parameter is used to specify the trend field.
1087
1153
  # @return [Array<(Trends, Fixnum, Hash)>] Trends data, response status code and response headers
1088
1154
  def list_trends_with_http_info(opts = {})
1089
1155
  if @api_client.config.debugging
1090
- @api_client.config.logger.debug "Calling API: DefaultApi#list_trends ..."
1156
+ @api_client.config.logger.debug "Calling API: DefaultApi.list_trends ..."
1091
1157
  end
1092
-
1093
1158
  if opts[:'categories_taxonomy'] && !['iab-qag', 'iptc-subjectcode'].include?(opts[:'categories_taxonomy'])
1094
- fail 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
1159
+ fail ArgumentError, 'invalid value for "categories_taxonomy", must be one of iab-qag, iptc-subjectcode'
1095
1160
  end
1096
-
1097
1161
  if opts[:'sentiment_title_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_title_polarity'])
1098
- fail 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
1162
+ fail ArgumentError, 'invalid value for "sentiment_title_polarity", must be one of positive, neutral, negative'
1099
1163
  end
1100
-
1101
1164
  if opts[:'sentiment_body_polarity'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment_body_polarity'])
1102
- fail 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
1165
+ fail ArgumentError, 'invalid value for "sentiment_body_polarity", must be one of positive, neutral, negative'
1103
1166
  end
1104
-
1167
+
1105
1168
  if opts[:'field'] && !['author.name', 'source.name', 'source.domain', 'keywords', 'entities.title.text', 'entities.title.type', 'entities.title.links.dbpedia', 'entities.body.text', 'entities.body.type', 'entities.body.links.dbpedia', 'hashtags', 'categories.id', 'sentiment.title.polarity', 'sentiment.body.polarity'].include?(opts[:'field'])
1106
- fail 'invalid value for "field", must be one of author.name, source.name, source.domain, keywords, entities.title.text, entities.title.type, entities.title.links.dbpedia, entities.body.text, entities.body.type, entities.body.links.dbpedia, hashtags, categories.id, sentiment.title.polarity, sentiment.body.polarity'
1169
+ fail ArgumentError, 'invalid value for "field", must be one of author.name, source.name, source.domain, keywords, entities.title.text, entities.title.type, entities.title.links.dbpedia, entities.body.text, entities.body.type, entities.body.links.dbpedia, hashtags, categories.id, sentiment.title.polarity, sentiment.body.polarity'
1107
1170
  end
1108
-
1109
1171
  # resource path
1110
1172
  local_var_path = "/trends".sub('{format}','json')
1111
1173
 
1112
1174
  # query parameters
1113
1175
  query_params = {}
1114
- query_params[:'id[]'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id']
1115
- query_params[:'title'] = opts[:'title'] if opts[:'title']
1116
- query_params[:'body'] = opts[:'body'] if opts[:'body']
1117
- query_params[:'text'] = opts[:'text'] if opts[:'text']
1118
- query_params[:'language[]'] = @api_client.build_collection_param(opts[:'language'], :multi) if opts[:'language']
1119
- query_params[:'published_at.start'] = opts[:'published_at_start'] if opts[:'published_at_start']
1120
- query_params[:'published_at.end'] = opts[:'published_at_end'] if opts[:'published_at_end']
1121
- query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if opts[:'categories_taxonomy']
1122
- query_params[:'categories.confident'] = opts[:'categories_confident'] if opts[:'categories_confident']
1123
- query_params[:'categories.id[]'] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if opts[:'categories_id']
1124
- query_params[:'categories.level[]'] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if opts[:'categories_level']
1125
- query_params[:'entities.title.text[]'] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if opts[:'entities_title_text']
1126
- query_params[:'entities.title.type[]'] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if opts[:'entities_title_type']
1127
- query_params[:'entities.title.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if opts[:'entities_title_links_dbpedia']
1128
- query_params[:'entities.body.text[]'] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if opts[:'entities_body_text']
1129
- query_params[:'entities.body.type[]'] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if opts[:'entities_body_type']
1130
- query_params[:'entities.body.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if opts[:'entities_body_links_dbpedia']
1131
- query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if opts[:'sentiment_title_polarity']
1132
- query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if opts[:'sentiment_body_polarity']
1133
- query_params[:'author.id[]'] = @api_client.build_collection_param(opts[:'author_id'], :multi) if opts[:'author_id']
1134
- query_params[:'author.name'] = opts[:'author_name'] if opts[:'author_name']
1135
- query_params[:'source.id[]'] = @api_client.build_collection_param(opts[:'source_id'], :multi) if opts[:'source_id']
1136
- query_params[:'source.name[]'] = @api_client.build_collection_param(opts[:'source_name'], :multi) if opts[:'source_name']
1137
- query_params[:'source.domain[]'] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if opts[:'source_domain']
1138
- query_params[:'source.locations.country[]'] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if opts[:'source_locations_country']
1139
- query_params[:'source.locations.state[]'] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if opts[:'source_locations_state']
1140
- query_params[:'source.locations.city[]'] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if opts[:'source_locations_city']
1141
- query_params[:'source.scopes.country[]'] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if opts[:'source_scopes_country']
1142
- query_params[:'source.scopes.state[]'] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if opts[:'source_scopes_state']
1143
- query_params[:'source.scopes.city[]'] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if opts[:'source_scopes_city']
1144
- query_params[:'source.scopes.level[]'] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if opts[:'source_scopes_level']
1145
- query_params[:'field'] = opts[:'field'] if opts[:'field']
1176
+ query_params[:'id[]'] = @api_client.build_collection_param(opts[:'id'], :multi) if !opts[:'id'].nil?
1177
+ query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
1178
+ query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
1179
+ query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
1180
+ query_params[:'language[]'] = @api_client.build_collection_param(opts[:'language'], :multi) if !opts[:'language'].nil?
1181
+ query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
1182
+ query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
1183
+ query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
1184
+ query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
1185
+ query_params[:'categories.id[]'] = @api_client.build_collection_param(opts[:'categories_id'], :multi) if !opts[:'categories_id'].nil?
1186
+ query_params[:'categories.level[]'] = @api_client.build_collection_param(opts[:'categories_level'], :multi) if !opts[:'categories_level'].nil?
1187
+ query_params[:'entities.title.text[]'] = @api_client.build_collection_param(opts[:'entities_title_text'], :multi) if !opts[:'entities_title_text'].nil?
1188
+ query_params[:'entities.title.type[]'] = @api_client.build_collection_param(opts[:'entities_title_type'], :multi) if !opts[:'entities_title_type'].nil?
1189
+ query_params[:'entities.title.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_title_links_dbpedia'], :multi) if !opts[:'entities_title_links_dbpedia'].nil?
1190
+ query_params[:'entities.body.text[]'] = @api_client.build_collection_param(opts[:'entities_body_text'], :multi) if !opts[:'entities_body_text'].nil?
1191
+ query_params[:'entities.body.type[]'] = @api_client.build_collection_param(opts[:'entities_body_type'], :multi) if !opts[:'entities_body_type'].nil?
1192
+ query_params[:'entities.body.links.dbpedia[]'] = @api_client.build_collection_param(opts[:'entities_body_links_dbpedia'], :multi) if !opts[:'entities_body_links_dbpedia'].nil?
1193
+ query_params[:'sentiment.title.polarity'] = opts[:'sentiment_title_polarity'] if !opts[:'sentiment_title_polarity'].nil?
1194
+ query_params[:'sentiment.body.polarity'] = opts[:'sentiment_body_polarity'] if !opts[:'sentiment_body_polarity'].nil?
1195
+ query_params[:'media.images.count.min'] = opts[:'media_images_count_min'] if !opts[:'media_images_count_min'].nil?
1196
+ query_params[:'media.images.count.max'] = opts[:'media_images_count_max'] if !opts[:'media_images_count_max'].nil?
1197
+ query_params[:'media.videos.count.min'] = opts[:'media_videos_count_min'] if !opts[:'media_videos_count_min'].nil?
1198
+ query_params[:'media.videos.count.max'] = opts[:'media_videos_count_max'] if !opts[:'media_videos_count_max'].nil?
1199
+ query_params[:'author.id[]'] = @api_client.build_collection_param(opts[:'author_id'], :multi) if !opts[:'author_id'].nil?
1200
+ query_params[:'author.name'] = opts[:'author_name'] if !opts[:'author_name'].nil?
1201
+ query_params[:'source.id[]'] = @api_client.build_collection_param(opts[:'source_id'], :multi) if !opts[:'source_id'].nil?
1202
+ query_params[:'source.name[]'] = @api_client.build_collection_param(opts[:'source_name'], :multi) if !opts[:'source_name'].nil?
1203
+ query_params[:'source.domain[]'] = @api_client.build_collection_param(opts[:'source_domain'], :multi) if !opts[:'source_domain'].nil?
1204
+ query_params[:'source.locations.country[]'] = @api_client.build_collection_param(opts[:'source_locations_country'], :multi) if !opts[:'source_locations_country'].nil?
1205
+ query_params[:'source.locations.state[]'] = @api_client.build_collection_param(opts[:'source_locations_state'], :multi) if !opts[:'source_locations_state'].nil?
1206
+ query_params[:'source.locations.city[]'] = @api_client.build_collection_param(opts[:'source_locations_city'], :multi) if !opts[:'source_locations_city'].nil?
1207
+ query_params[:'source.scopes.country[]'] = @api_client.build_collection_param(opts[:'source_scopes_country'], :multi) if !opts[:'source_scopes_country'].nil?
1208
+ query_params[:'source.scopes.state[]'] = @api_client.build_collection_param(opts[:'source_scopes_state'], :multi) if !opts[:'source_scopes_state'].nil?
1209
+ query_params[:'source.scopes.city[]'] = @api_client.build_collection_param(opts[:'source_scopes_city'], :multi) if !opts[:'source_scopes_city'].nil?
1210
+ query_params[:'source.scopes.level[]'] = @api_client.build_collection_param(opts[:'source_scopes_level'], :multi) if !opts[:'source_scopes_level'].nil?
1211
+ query_params[:'field'] = opts[:'field'] if !opts[:'field'].nil?
1146
1212
 
1147
1213
  # header parameters
1148
1214
  header_params = {}
@@ -1160,7 +1226,7 @@ module AylienNewsApi
1160
1226
 
1161
1227
  # http body (model)
1162
1228
  post_body = nil
1163
- auth_names = ['app_key', 'app_id']
1229
+ auth_names = ['app_key', 'app_id']
1164
1230
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1165
1231
  :header_params => header_params,
1166
1232
  :query_params => query_params,