aylien_news_api 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/aylien_news_api.gemspec +1 -2
- data/docs/Category.md +3 -1
- data/docs/CategoryTaxonomy.md +16 -0
- data/docs/DefaultApi.md +105 -51
- data/docs/Histograms.md +5 -1
- data/docs/Media.md +2 -2
- data/docs/MediaFormat.md +16 -0
- data/docs/MediaType.md +16 -0
- data/docs/Scope.md +1 -1
- data/docs/ScopeLevel.md +16 -0
- data/docs/Sentiment.md +1 -1
- data/docs/SentimentPolarity.md +16 -0
- data/docs/Stories.md +5 -1
- data/docs/StoryLinks.md +3 -3
- data/docs/StoryTranslation.md +19 -0
- data/docs/StoryTranslations.md +1 -1
- data/docs/Trends.md +5 -1
- data/lib/aylien_news_api.rb +7 -3
- data/lib/aylien_news_api/api/default_api.rb +265 -159
- data/lib/aylien_news_api/api_client.rb +8 -6
- data/lib/aylien_news_api/api_error.rb +1 -1
- data/lib/aylien_news_api/configuration.rb +2 -2
- data/lib/aylien_news_api/models/author.rb +12 -2
- data/lib/aylien_news_api/models/autocomplete.rb +12 -2
- data/lib/aylien_news_api/models/autocompletes.rb +12 -2
- data/lib/aylien_news_api/models/category.rb +24 -39
- data/lib/aylien_news_api/models/category_links.rb +12 -2
- data/lib/aylien_news_api/models/category_taxonomy.rb +36 -0
- data/lib/aylien_news_api/models/cluster.rb +12 -2
- data/lib/aylien_news_api/models/clusters.rb +12 -2
- data/lib/aylien_news_api/models/coverages.rb +12 -2
- data/lib/aylien_news_api/models/entities.rb +12 -2
- data/lib/aylien_news_api/models/entity.rb +12 -2
- data/lib/aylien_news_api/models/entity_links.rb +12 -2
- data/lib/aylien_news_api/models/error.rb +12 -2
- data/lib/aylien_news_api/models/error_links.rb +12 -2
- data/lib/aylien_news_api/models/errors.rb +12 -2
- data/lib/aylien_news_api/models/histogram_interval.rb +12 -2
- data/lib/aylien_news_api/models/histograms.rb +36 -6
- data/lib/aylien_news_api/models/location.rb +12 -2
- data/lib/aylien_news_api/models/media.rb +14 -52
- data/lib/aylien_news_api/models/media_format.rb +44 -0
- data/lib/aylien_news_api/models/media_type.rb +36 -0
- data/lib/aylien_news_api/models/rank.rb +12 -2
- data/lib/aylien_news_api/models/rankings.rb +12 -2
- data/lib/aylien_news_api/models/related_stories.rb +12 -2
- data/lib/aylien_news_api/models/representative_story.rb +12 -2
- data/lib/aylien_news_api/models/scope.rb +13 -38
- data/lib/aylien_news_api/models/scope_level.rb +37 -0
- data/lib/aylien_news_api/models/sentiment.rb +13 -38
- data/lib/aylien_news_api/models/sentiment_polarity.rb +37 -0
- data/lib/aylien_news_api/models/sentiments.rb +12 -2
- data/lib/aylien_news_api/models/share_count.rb +12 -2
- data/lib/aylien_news_api/models/share_counts.rb +12 -2
- data/lib/aylien_news_api/models/source.rb +12 -2
- data/lib/aylien_news_api/models/stories.rb +36 -6
- data/lib/aylien_news_api/models/story.rb +12 -2
- data/lib/aylien_news_api/models/story_cluster.rb +12 -2
- data/lib/aylien_news_api/models/story_links.rb +26 -16
- data/lib/aylien_news_api/models/story_translation.rb +217 -0
- data/lib/aylien_news_api/models/story_translations.rb +13 -3
- data/lib/aylien_news_api/models/story_translations_en.rb +12 -2
- data/lib/aylien_news_api/models/summary.rb +12 -2
- data/lib/aylien_news_api/models/time_series.rb +12 -2
- data/lib/aylien_news_api/models/time_series_list.rb +12 -2
- data/lib/aylien_news_api/models/trend.rb +12 -2
- data/lib/aylien_news_api/models/trends.rb +36 -6
- data/lib/aylien_news_api/version.rb +2 -2
- data/spec/api/default_api_spec.rb +54 -28
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/author_spec.rb +2 -2
- data/spec/models/autocomplete_spec.rb +2 -2
- data/spec/models/autocompletes_spec.rb +2 -2
- data/spec/models/category_links_spec.rb +2 -2
- data/spec/models/category_spec.rb +8 -6
- data/spec/models/category_taxonomy_spec.rb +35 -0
- data/spec/models/cluster_spec.rb +2 -2
- data/spec/models/clusters_spec.rb +2 -2
- data/spec/models/coverages_spec.rb +2 -2
- data/spec/models/entities_spec.rb +2 -2
- data/spec/models/entity_links_spec.rb +2 -2
- data/spec/models/entity_spec.rb +2 -2
- data/spec/models/error_links_spec.rb +2 -2
- data/spec/models/error_spec.rb +2 -2
- data/spec/models/errors_spec.rb +2 -2
- data/spec/models/histogram_interval_spec.rb +2 -2
- data/spec/models/histograms_spec.rb +14 -2
- data/spec/models/location_spec.rb +2 -2
- data/spec/models/media_format_spec.rb +35 -0
- data/spec/models/media_spec.rb +2 -10
- data/spec/models/media_type_spec.rb +35 -0
- data/spec/models/rank_spec.rb +2 -2
- data/spec/models/rankings_spec.rb +2 -2
- data/spec/models/related_stories_spec.rb +2 -2
- data/spec/models/representative_story_spec.rb +2 -2
- data/spec/models/scope_level_spec.rb +35 -0
- data/spec/models/scope_spec.rb +2 -6
- data/spec/models/sentiment_polarity_spec.rb +35 -0
- data/spec/models/sentiment_spec.rb +2 -6
- data/spec/models/sentiments_spec.rb +2 -2
- data/spec/models/share_count_spec.rb +2 -2
- data/spec/models/share_counts_spec.rb +2 -2
- data/spec/models/source_spec.rb +2 -2
- data/spec/models/stories_spec.rb +14 -2
- data/spec/models/story_cluster_spec.rb +2 -2
- data/spec/models/story_links_spec.rb +5 -5
- data/spec/models/story_spec.rb +2 -2
- data/spec/models/story_translation_spec.rb +47 -0
- data/spec/models/story_translations_en_spec.rb +2 -2
- data/spec/models/story_translations_spec.rb +2 -2
- data/spec/models/summary_spec.rb +2 -2
- data/spec/models/time_series_list_spec.rb +2 -2
- data/spec/models/time_series_spec.rb +2 -2
- data/spec/models/trend_spec.rb +2 -2
- data/spec/models/trends_spec.rb +14 -2
- data/spec/spec_helper.rb +2 -2
- metadata +27 -23
data/docs/Histograms.md
CHANGED
@@ -9,6 +9,8 @@ Name | Type | Description | Notes
|
|
9
9
|
**interval_start** | **Integer** | The start interval of the histogram | [optional]
|
10
10
|
**interval_width** | **Integer** | The width of the histogram | [optional]
|
11
11
|
**intervals** | [**Array<HistogramInterval>**](HistogramInterval.md) | The intervals of the histograms | [optional]
|
12
|
+
**published_at_end** | **DateTime** | The end of a period in which searched stories were published | [optional]
|
13
|
+
**published_at_start** | **DateTime** | The start of a period in which searched stories were published | [optional]
|
12
14
|
|
13
15
|
## Code Sample
|
14
16
|
|
@@ -19,7 +21,9 @@ instance = AylienNewsApi::Histograms.new(field: null,
|
|
19
21
|
interval_end: null,
|
20
22
|
interval_start: null,
|
21
23
|
interval_width: null,
|
22
|
-
intervals: null
|
24
|
+
intervals: null,
|
25
|
+
published_at_end: null,
|
26
|
+
published_at_start: null)
|
23
27
|
```
|
24
28
|
|
25
29
|
|
data/docs/Media.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**content_length** | **Integer** | The content length of media | [optional]
|
8
|
-
**format** | **
|
8
|
+
**format** | [**MediaFormat**](MediaFormat.md) | | [optional]
|
9
9
|
**height** | **Integer** | The height of media | [optional]
|
10
|
-
**type** | **
|
10
|
+
**type** | [**MediaType**](MediaType.md) | | [optional]
|
11
11
|
**url** | **String** | A URL which points to the media file | [optional]
|
12
12
|
**width** | **Integer** | The width of media | [optional]
|
13
13
|
|
data/docs/MediaFormat.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# AylienNewsApi::MediaFormat
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'AylienNewsApi'
|
12
|
+
|
13
|
+
instance = AylienNewsApi::MediaFormat.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
data/docs/MediaType.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# AylienNewsApi::MediaType
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'AylienNewsApi'
|
12
|
+
|
13
|
+
instance = AylienNewsApi::MediaType.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
data/docs/Scope.md
CHANGED
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**city** | **String** | The scope by city | [optional]
|
8
8
|
**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]
|
9
|
-
**level** | **
|
9
|
+
**level** | [**ScopeLevel**](ScopeLevel.md) | | [optional]
|
10
10
|
**state** | **String** | The scope by state | [optional]
|
11
11
|
|
12
12
|
## Code Sample
|
data/docs/ScopeLevel.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# AylienNewsApi::ScopeLevel
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'AylienNewsApi'
|
12
|
+
|
13
|
+
instance = AylienNewsApi::ScopeLevel.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
data/docs/Sentiment.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**polarity** | **
|
7
|
+
**polarity** | [**SentimentPolarity**](SentimentPolarity.md) | | [optional]
|
8
8
|
**score** | **Float** | Polarity score of the sentiment | [optional]
|
9
9
|
|
10
10
|
## Code Sample
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# AylienNewsApi::SentimentPolarity
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'AylienNewsApi'
|
12
|
+
|
13
|
+
instance = AylienNewsApi::SentimentPolarity.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
data/docs/Stories.md
CHANGED
@@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**next_page_cursor** | **String** | The next page cursor | [optional]
|
8
8
|
**stories** | [**Array<Story>**](Story.md) | An array of stories | [optional]
|
9
|
+
**published_at_end** | **DateTime** | The end of a period in which searched stories were published | [optional]
|
10
|
+
**published_at_start** | **DateTime** | The start of a period in which searched stories were published | [optional]
|
9
11
|
|
10
12
|
## Code Sample
|
11
13
|
|
@@ -13,7 +15,9 @@ Name | Type | Description | Notes
|
|
13
15
|
require 'AylienNewsApi'
|
14
16
|
|
15
17
|
instance = AylienNewsApi::Stories.new(next_page_cursor: null,
|
16
|
-
stories: null
|
18
|
+
stories: null,
|
19
|
+
published_at_end: null,
|
20
|
+
published_at_start: null)
|
17
21
|
```
|
18
22
|
|
19
23
|
|
data/docs/StoryLinks.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**canonical** | **String** | The story canonical URL | [optional]
|
8
|
-
**coverages** | **String** | The coverages URL | [optional]
|
9
8
|
**permalink** | **String** | The story permalink URL | [optional]
|
10
9
|
**related_stories** | **String** | The related stories URL | [optional]
|
10
|
+
**clusters** | **String** | The clusters endpoint URL for this story | [optional]
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
@@ -15,9 +15,9 @@ Name | Type | Description | Notes
|
|
15
15
|
require 'AylienNewsApi'
|
16
16
|
|
17
17
|
instance = AylienNewsApi::StoryLinks.new(canonical: null,
|
18
|
-
coverages: null,
|
19
18
|
permalink: null,
|
20
|
-
related_stories: null
|
19
|
+
related_stories: null,
|
20
|
+
clusters: null)
|
21
21
|
```
|
22
22
|
|
23
23
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# AylienNewsApi::StoryTranslation
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**body** | **String** | Translation of body | [optional]
|
8
|
+
**title** | **String** | Translation of title | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'AylienNewsApi'
|
14
|
+
|
15
|
+
instance = AylienNewsApi::StoryTranslation.new(body: null,
|
16
|
+
title: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/StoryTranslations.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**en** | [**
|
7
|
+
**en** | [**StoryTranslation**](StoryTranslation.md) | | [optional]
|
8
8
|
|
9
9
|
## Code Sample
|
10
10
|
|
data/docs/Trends.md
CHANGED
@@ -6,6 +6,8 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**field** | **String** | The field of trends | [optional]
|
8
8
|
**trends** | [**Array<Trend>**](Trend.md) | An array of trends | [optional]
|
9
|
+
**published_at_end** | **DateTime** | The end of a period in which searched stories were published | [optional]
|
10
|
+
**published_at_start** | **DateTime** | The start of a period in which searched stories were published | [optional]
|
9
11
|
|
10
12
|
## Code Sample
|
11
13
|
|
@@ -13,7 +15,9 @@ Name | Type | Description | Notes
|
|
13
15
|
require 'AylienNewsApi'
|
14
16
|
|
15
17
|
instance = AylienNewsApi::Trends.new(field: null,
|
16
|
-
trends: null
|
18
|
+
trends: null,
|
19
|
+
published_at_end: null,
|
20
|
+
published_at_start: null)
|
17
21
|
```
|
18
22
|
|
19
23
|
|
data/lib/aylien_news_api.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -22,9 +22,9 @@ require 'aylien_news_api/models/autocomplete'
|
|
22
22
|
require 'aylien_news_api/models/autocompletes'
|
23
23
|
require 'aylien_news_api/models/category'
|
24
24
|
require 'aylien_news_api/models/category_links'
|
25
|
+
require 'aylien_news_api/models/category_taxonomy'
|
25
26
|
require 'aylien_news_api/models/cluster'
|
26
27
|
require 'aylien_news_api/models/clusters'
|
27
|
-
require 'aylien_news_api/models/coverages'
|
28
28
|
require 'aylien_news_api/models/entities'
|
29
29
|
require 'aylien_news_api/models/entity'
|
30
30
|
require 'aylien_news_api/models/entity_links'
|
@@ -35,12 +35,16 @@ require 'aylien_news_api/models/histogram_interval'
|
|
35
35
|
require 'aylien_news_api/models/histograms'
|
36
36
|
require 'aylien_news_api/models/location'
|
37
37
|
require 'aylien_news_api/models/media'
|
38
|
+
require 'aylien_news_api/models/media_format'
|
39
|
+
require 'aylien_news_api/models/media_type'
|
38
40
|
require 'aylien_news_api/models/rank'
|
39
41
|
require 'aylien_news_api/models/rankings'
|
40
42
|
require 'aylien_news_api/models/related_stories'
|
41
43
|
require 'aylien_news_api/models/representative_story'
|
42
44
|
require 'aylien_news_api/models/scope'
|
45
|
+
require 'aylien_news_api/models/scope_level'
|
43
46
|
require 'aylien_news_api/models/sentiment'
|
47
|
+
require 'aylien_news_api/models/sentiment_polarity'
|
44
48
|
require 'aylien_news_api/models/sentiments'
|
45
49
|
require 'aylien_news_api/models/share_count'
|
46
50
|
require 'aylien_news_api/models/share_counts'
|
@@ -49,8 +53,8 @@ require 'aylien_news_api/models/stories'
|
|
49
53
|
require 'aylien_news_api/models/story'
|
50
54
|
require 'aylien_news_api/models/story_cluster'
|
51
55
|
require 'aylien_news_api/models/story_links'
|
56
|
+
require 'aylien_news_api/models/story_translation'
|
52
57
|
require 'aylien_news_api/models/story_translations'
|
53
|
-
require 'aylien_news_api/models/story_translations_en'
|
54
58
|
require 'aylien_news_api/models/summary'
|
55
59
|
require 'aylien_news_api/models/time_series'
|
56
60
|
require 'aylien_news_api/models/time_series_list'
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0
|
7
7
|
Contact: support@aylien.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -131,6 +131,11 @@ module AylienNewsApi
|
|
131
131
|
# @option opts [String] :latest_story_end This parameter is used for finding clusters whose publication date of its latest story is less than the specified value. [Here](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).
|
132
132
|
# @option opts [Array<String>] :location_country This parameter is used for finding clusters belonging to a specific country. It supports [ISO 3166-1 alpha-2](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).
|
133
133
|
# @option opts [Array<String>] :not_location_country This parameter is used for excluding clusters belonging to a specific country. It supports [ISO 3166-1 alpha-2](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).
|
134
|
+
# @option opts [Array<String>] :_return This parameter is used for specifying return fields.
|
135
|
+
# @option opts [String] :sort_by This parameter is used for changing the order column of the results. You can read about sorting results [here](https://newsapi.aylien.com/docs/sorting-results). (default to 'published_at')
|
136
|
+
# @option opts [String] :sort_direction This parameter is used for changing the order direction of the result. You can read about sorting results [here](https://newsapi.aylien.com/docs/sorting-results). (default to 'desc')
|
137
|
+
# @option opts [String] :cursor This parameter is used for finding a specific page. You can read more about pagination of results [here](https://newsapi.aylien.com/docs/pagination-of-results). (default to '*')
|
138
|
+
# @option opts [Integer] :per_page This parameter is used for specifying number of items in each page You can read more about pagination of results [here](https://newsapi.aylien.com/docs/pagination-of-results) (default to 10)
|
134
139
|
# @return [Clusters]
|
135
140
|
def list_clusters(opts = {})
|
136
141
|
data, _status_code, _headers = list_clusters_with_http_info(opts)
|
@@ -152,6 +157,11 @@ module AylienNewsApi
|
|
152
157
|
# @option opts [String] :latest_story_end This parameter is used for finding clusters whose publication date of its latest story is less than the specified value. [Here](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).
|
153
158
|
# @option opts [Array<String>] :location_country This parameter is used for finding clusters belonging to a specific country. It supports [ISO 3166-1 alpha-2](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).
|
154
159
|
# @option opts [Array<String>] :not_location_country This parameter is used for excluding clusters belonging to a specific country. It supports [ISO 3166-1 alpha-2](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).
|
160
|
+
# @option opts [Array<String>] :_return This parameter is used for specifying return fields.
|
161
|
+
# @option opts [String] :sort_by This parameter is used for changing the order column of the results. You can read about sorting results [here](https://newsapi.aylien.com/docs/sorting-results).
|
162
|
+
# @option opts [String] :sort_direction This parameter is used for changing the order direction of the result. You can read about sorting results [here](https://newsapi.aylien.com/docs/sorting-results).
|
163
|
+
# @option opts [String] :cursor This parameter is used for finding a specific page. You can read more about pagination of results [here](https://newsapi.aylien.com/docs/pagination-of-results).
|
164
|
+
# @option opts [Integer] :per_page This parameter is used for specifying number of items in each page You can read more about pagination of results [here](https://newsapi.aylien.com/docs/pagination-of-results)
|
155
165
|
# @return [Array<(Clusters, Integer, Hash)>] Clusters data, response status code and response headers
|
156
166
|
def list_clusters_with_http_info(opts = {})
|
157
167
|
if @api_client.config.debugging
|
@@ -165,6 +175,26 @@ module AylienNewsApi
|
|
165
175
|
fail ArgumentError, 'invalid value for "opts[:"story_count_max"]" when calling DefaultApi.list_clusters, must be greater than 0.'
|
166
176
|
end
|
167
177
|
|
178
|
+
allowable_values = ["id", "time", "summary", "category", "story_count", "earliest_story", "latest_story", "representative_story", "location_country"]
|
179
|
+
if @api_client.config.client_side_validation && opts[:'_return'] && !opts[:'_return'].all? { |item| allowable_values.include?(item) }
|
180
|
+
fail ArgumentError, "invalid value for \"_return\", must include one of #{allowable_values}"
|
181
|
+
end
|
182
|
+
allowable_values = ["time", "story_count", "earliest_story", "latest_story"]
|
183
|
+
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
184
|
+
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
185
|
+
end
|
186
|
+
allowable_values = ["asc", "desc"]
|
187
|
+
if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
|
188
|
+
fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
|
189
|
+
end
|
190
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
191
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_clusters, must be smaller than or equal to 100.'
|
192
|
+
end
|
193
|
+
|
194
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
195
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_clusters, must be greater than or equal to 1.'
|
196
|
+
end
|
197
|
+
|
168
198
|
# resource path
|
169
199
|
local_var_path = '/clusters'
|
170
200
|
|
@@ -182,6 +212,11 @@ module AylienNewsApi
|
|
182
212
|
query_params[:'latest_story.end'] = opts[:'latest_story_end'] if !opts[:'latest_story_end'].nil?
|
183
213
|
query_params[:'location.country'] = opts[:'location_country'] if !opts[:'location_country'].nil?
|
184
214
|
query_params[:'!location.country'] = opts[:'not_location_country'] if !opts[:'not_location_country'].nil?
|
215
|
+
query_params[:'return'] = opts[:'_return'] if !opts[:'_return'].nil?
|
216
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
217
|
+
query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
|
218
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
219
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
185
220
|
|
186
221
|
# header parameters
|
187
222
|
header_params = opts[:header_params] || {}
|
@@ -216,8 +251,8 @@ module AylienNewsApi
|
|
216
251
|
return data, status_code, headers
|
217
252
|
end
|
218
253
|
|
219
|
-
# List
|
220
|
-
#
|
254
|
+
# List histograms
|
255
|
+
# For the numerical metadata that the News API gathers (such as word counts or social shares for example), you can use the histograms endpoint to access and display this information. As this endpoint does not return actual stories, the results you are given will not count towards your story allowance provided by your subscription, so you can effectively query this endpoint free of charge.
|
221
256
|
# @param [Hash] opts the optional parameters
|
222
257
|
# @option opts [Array<Integer>] :id This parameter is used for finding stories by story id.
|
223
258
|
# @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id.
|
@@ -227,6 +262,8 @@ module AylienNewsApi
|
|
227
262
|
# @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
228
263
|
# @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
229
264
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
265
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
266
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
230
267
|
# @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.
|
231
268
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
232
269
|
# @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).
|
@@ -235,6 +272,8 @@ module AylienNewsApi
|
|
235
272
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). (default to true)
|
236
273
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
237
274
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
275
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
276
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
238
277
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
239
278
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
240
279
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -303,22 +342,18 @@ module AylienNewsApi
|
|
303
342
|
# @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.
|
304
343
|
# @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.
|
305
344
|
# @option opts [Array<String>] :clusters This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](https://newsapi.aylien.com/docs/working-with-clustering).
|
306
|
-
# @option opts [
|
307
|
-
# @option opts [Integer] :
|
308
|
-
# @option opts [
|
309
|
-
# @option opts [String] :
|
310
|
-
# @
|
311
|
-
|
312
|
-
|
313
|
-
# @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 3)
|
314
|
-
# @return [Coverages]
|
315
|
-
def list_coverages(opts = {})
|
316
|
-
data, _status_code, _headers = list_coverages_with_http_info(opts)
|
345
|
+
# @option opts [Integer] :interval_start This parameter is used for setting the start data point of histogram intervals.
|
346
|
+
# @option opts [Integer] :interval_end This parameter is used for setting the end data point of histogram intervals.
|
347
|
+
# @option opts [Integer] :interval_width This parameter is used for setting the width of histogram intervals.
|
348
|
+
# @option opts [String] :field This parameter is used for specifying the y-axis variable for the histogram. (default to 'social_shares_count')
|
349
|
+
# @return [Histograms]
|
350
|
+
def list_histograms(opts = {})
|
351
|
+
data, _status_code, _headers = list_histograms_with_http_info(opts)
|
317
352
|
data
|
318
353
|
end
|
319
354
|
|
320
|
-
# List
|
321
|
-
#
|
355
|
+
# List histograms
|
356
|
+
# For the numerical metadata that the News API gathers (such as word counts or social shares for example), you can use the histograms endpoint to access and display this information. As this endpoint does not return actual stories, the results you are given will not count towards your story allowance provided by your subscription, so you can effectively query this endpoint free of charge.
|
322
357
|
# @param [Hash] opts the optional parameters
|
323
358
|
# @option opts [Array<Integer>] :id This parameter is used for finding stories by story id.
|
324
359
|
# @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id.
|
@@ -328,6 +363,8 @@ module AylienNewsApi
|
|
328
363
|
# @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
329
364
|
# @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
330
365
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
366
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
367
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
331
368
|
# @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.
|
332
369
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
333
370
|
# @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).
|
@@ -336,6 +373,8 @@ module AylienNewsApi
|
|
336
373
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
337
374
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
338
375
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
376
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
377
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
339
378
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
340
379
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
341
380
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -404,18 +443,14 @@ module AylienNewsApi
|
|
404
443
|
# @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.
|
405
444
|
# @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.
|
406
445
|
# @option opts [Array<String>] :clusters This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](https://newsapi.aylien.com/docs/working-with-clustering).
|
407
|
-
# @option opts [
|
408
|
-
# @option opts [Integer] :
|
409
|
-
# @option opts [
|
410
|
-
# @option opts [String] :
|
411
|
-
# @
|
412
|
-
|
413
|
-
# @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.
|
414
|
-
# @option opts [Integer] :per_page This parameter is used for specifying number of items in each page.
|
415
|
-
# @return [Array<(Coverages, Integer, Hash)>] Coverages data, response status code and response headers
|
416
|
-
def list_coverages_with_http_info(opts = {})
|
446
|
+
# @option opts [Integer] :interval_start This parameter is used for setting the start data point of histogram intervals.
|
447
|
+
# @option opts [Integer] :interval_end This parameter is used for setting the end data point of histogram intervals.
|
448
|
+
# @option opts [Integer] :interval_width This parameter is used for setting the width of histogram intervals.
|
449
|
+
# @option opts [String] :field This parameter is used for specifying the y-axis variable for the histogram.
|
450
|
+
# @return [Array<(Histograms, Integer, Hash)>] Histograms data, response status code and response headers
|
451
|
+
def list_histograms_with_http_info(opts = {})
|
417
452
|
if @api_client.config.debugging
|
418
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
453
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_histograms ...'
|
419
454
|
end
|
420
455
|
allowable_values = ["en", "de", "fr", "it", "es", "pt"]
|
421
456
|
if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
|
@@ -446,35 +481,35 @@ module AylienNewsApi
|
|
446
481
|
fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
|
447
482
|
end
|
448
483
|
if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
|
449
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.
|
484
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
450
485
|
end
|
451
486
|
|
452
487
|
if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
|
453
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.
|
488
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
454
489
|
end
|
455
490
|
|
456
491
|
if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
|
457
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.
|
492
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
458
493
|
end
|
459
494
|
|
460
495
|
if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
|
461
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.
|
496
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
462
497
|
end
|
463
498
|
|
464
499
|
if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
|
465
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.
|
500
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
466
501
|
end
|
467
502
|
|
468
503
|
if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
|
469
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.
|
504
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
470
505
|
end
|
471
506
|
|
472
507
|
if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
|
473
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.
|
508
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
474
509
|
end
|
475
510
|
|
476
511
|
if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
|
477
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.
|
512
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
478
513
|
end
|
479
514
|
|
480
515
|
allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
|
@@ -486,11 +521,11 @@ module AylienNewsApi
|
|
486
521
|
fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
|
487
522
|
end
|
488
523
|
if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
|
489
|
-
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.
|
524
|
+
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
490
525
|
end
|
491
526
|
|
492
527
|
if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
|
493
|
-
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.
|
528
|
+
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
494
529
|
end
|
495
530
|
|
496
531
|
allowable_values = ["international", "national", "local"]
|
@@ -502,71 +537,59 @@ module AylienNewsApi
|
|
502
537
|
fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
|
503
538
|
end
|
504
539
|
if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
|
505
|
-
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.
|
540
|
+
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
506
541
|
end
|
507
542
|
|
508
543
|
if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
|
509
|
-
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.
|
544
|
+
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
510
545
|
end
|
511
546
|
|
512
547
|
if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
|
513
|
-
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.
|
548
|
+
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
514
549
|
end
|
515
550
|
|
516
551
|
if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
|
517
|
-
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.
|
552
|
+
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
518
553
|
end
|
519
554
|
|
520
555
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
|
521
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.
|
556
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
522
557
|
end
|
523
558
|
|
524
559
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
|
525
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.
|
560
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
526
561
|
end
|
527
562
|
|
528
563
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
|
529
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.
|
564
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
530
565
|
end
|
531
566
|
|
532
567
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
|
533
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.
|
568
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
534
569
|
end
|
535
570
|
|
536
571
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
|
537
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.
|
572
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
538
573
|
end
|
539
574
|
|
540
575
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
|
541
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.
|
576
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
542
577
|
end
|
543
578
|
|
544
579
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
|
545
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.
|
580
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
546
581
|
end
|
547
582
|
|
548
583
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
|
549
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.
|
550
|
-
end
|
551
|
-
|
552
|
-
allowable_values = ["id", "title", "body", "summary", "source", "author", "entities", "keywords", "hashtags", "characters_count", "words_count", "sentences_count", "paragraphs_count", "categories", "social_shares_count", "media", "sentiment", "language", "published_at", "links"]
|
553
|
-
if @api_client.config.client_side_validation && opts[:'_return'] && !opts[:'_return'].all? { |item| allowable_values.include?(item) }
|
554
|
-
fail ArgumentError, "invalid value for \"_return\", must include one of #{allowable_values}"
|
555
|
-
end
|
556
|
-
allowable_values = ["auto", "en", "de", "fr", "it", "es", "pt"]
|
557
|
-
if @api_client.config.client_side_validation && opts[:'story_language'] && !allowable_values.include?(opts[:'story_language'])
|
558
|
-
fail ArgumentError, "invalid value for \"story_language\", must be one of #{allowable_values}"
|
559
|
-
end
|
560
|
-
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
561
|
-
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_coverages, must be smaller than or equal to 100.'
|
584
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_histograms, must be greater than 0.'
|
562
585
|
end
|
563
586
|
|
564
|
-
|
565
|
-
|
587
|
+
allowable_values = ["social_shares_count", "social_shares_count.facebook", "social_shares_count.linkedin", "social_shares_count.reddit", "social_shares_count.google_plus", "characters_count", "words_count", "sentences_count", "paragraphs_count", "media.images.count", "media.videos.count", "source.links_in_count", "source.rankings.alexa.rank", "source.rankings.alexa.rank.AF", "source.rankings.alexa.rank.AX", "source.rankings.alexa.rank.AL", "source.rankings.alexa.rank.DZ", "source.rankings.alexa.rank.AS", "source.rankings.alexa.rank.AD", "source.rankings.alexa.rank.AO", "source.rankings.alexa.rank.AI", "source.rankings.alexa.rank.AQ", "source.rankings.alexa.rank.AG", "source.rankings.alexa.rank.AR", "source.rankings.alexa.rank.AM", "source.rankings.alexa.rank.AW", "source.rankings.alexa.rank.AU", "source.rankings.alexa.rank.AT", "source.rankings.alexa.rank.AZ", "source.rankings.alexa.rank.BS", "source.rankings.alexa.rank.BH", "source.rankings.alexa.rank.BD", "source.rankings.alexa.rank.BB", "source.rankings.alexa.rank.BY", "source.rankings.alexa.rank.BE", "source.rankings.alexa.rank.BZ", "source.rankings.alexa.rank.BJ", "source.rankings.alexa.rank.BM", "source.rankings.alexa.rank.BT", "source.rankings.alexa.rank.BO", "source.rankings.alexa.rank.BQ", "source.rankings.alexa.rank.BA", "source.rankings.alexa.rank.BW", "source.rankings.alexa.rank.BV", "source.rankings.alexa.rank.BR", "source.rankings.alexa.rank.IO", "source.rankings.alexa.rank.BN", "source.rankings.alexa.rank.BG", "source.rankings.alexa.rank.BF", "source.rankings.alexa.rank.BI", "source.rankings.alexa.rank.KH", "source.rankings.alexa.rank.CM", "source.rankings.alexa.rank.CA", "source.rankings.alexa.rank.CV", "source.rankings.alexa.rank.KY", "source.rankings.alexa.rank.CF", "source.rankings.alexa.rank.TD", "source.rankings.alexa.rank.CL", "source.rankings.alexa.rank.CN", "source.rankings.alexa.rank.CX", "source.rankings.alexa.rank.CC", "source.rankings.alexa.rank.CO", "source.rankings.alexa.rank.KM", "source.rankings.alexa.rank.CG", "source.rankings.alexa.rank.CD", "source.rankings.alexa.rank.CK", "source.rankings.alexa.rank.CR", "source.rankings.alexa.rank.CI", "source.rankings.alexa.rank.HR", "source.rankings.alexa.rank.CU", "source.rankings.alexa.rank.CW", "source.rankings.alexa.rank.CY", "source.rankings.alexa.rank.CZ", "source.rankings.alexa.rank.DK", "source.rankings.alexa.rank.DJ", "source.rankings.alexa.rank.DM", "source.rankings.alexa.rank.DO", "source.rankings.alexa.rank.EC", "source.rankings.alexa.rank.EG", "source.rankings.alexa.rank.SV", "source.rankings.alexa.rank.GQ", "source.rankings.alexa.rank.ER", "source.rankings.alexa.rank.EE", "source.rankings.alexa.rank.ET", "source.rankings.alexa.rank.FK", "source.rankings.alexa.rank.FO", "source.rankings.alexa.rank.FJ", "source.rankings.alexa.rank.FI", "source.rankings.alexa.rank.FR", "source.rankings.alexa.rank.GF", "source.rankings.alexa.rank.PF", "source.rankings.alexa.rank.TF", "source.rankings.alexa.rank.GA", "source.rankings.alexa.rank.GM", "source.rankings.alexa.rank.GE", "source.rankings.alexa.rank.DE", "source.rankings.alexa.rank.GH", "source.rankings.alexa.rank.GI", "source.rankings.alexa.rank.GR", "source.rankings.alexa.rank.GL", "source.rankings.alexa.rank.GD", "source.rankings.alexa.rank.GP", "source.rankings.alexa.rank.GU", "source.rankings.alexa.rank.GT", "source.rankings.alexa.rank.GG", "source.rankings.alexa.rank.GN", "source.rankings.alexa.rank.GW", "source.rankings.alexa.rank.GY", "source.rankings.alexa.rank.HT", "source.rankings.alexa.rank.HM", "source.rankings.alexa.rank.VA", "source.rankings.alexa.rank.HN", "source.rankings.alexa.rank.HK", "source.rankings.alexa.rank.HU", "source.rankings.alexa.rank.IS", "source.rankings.alexa.rank.IN", "source.rankings.alexa.rank.ID", "source.rankings.alexa.rank.IR", "source.rankings.alexa.rank.IQ", "source.rankings.alexa.rank.IE", "source.rankings.alexa.rank.IM", "source.rankings.alexa.rank.IL", "source.rankings.alexa.rank.IT", "source.rankings.alexa.rank.JM", "source.rankings.alexa.rank.JP", "source.rankings.alexa.rank.JE", "source.rankings.alexa.rank.JO", "source.rankings.alexa.rank.KZ", "source.rankings.alexa.rank.KE", "source.rankings.alexa.rank.KI", "source.rankings.alexa.rank.KP", "source.rankings.alexa.rank.KR", "source.rankings.alexa.rank.KW", "source.rankings.alexa.rank.KG", "source.rankings.alexa.rank.LA", "source.rankings.alexa.rank.LV", "source.rankings.alexa.rank.LB", "source.rankings.alexa.rank.LS", "source.rankings.alexa.rank.LR", "source.rankings.alexa.rank.LY", "source.rankings.alexa.rank.LI", "source.rankings.alexa.rank.LT", "source.rankings.alexa.rank.LU", "source.rankings.alexa.rank.MO", "source.rankings.alexa.rank.MK", "source.rankings.alexa.rank.MG", "source.rankings.alexa.rank.MW", "source.rankings.alexa.rank.MY", "source.rankings.alexa.rank.MV", "source.rankings.alexa.rank.ML", "source.rankings.alexa.rank.MT", "source.rankings.alexa.rank.MH", "source.rankings.alexa.rank.MQ", "source.rankings.alexa.rank.MR", "source.rankings.alexa.rank.MU", "source.rankings.alexa.rank.YT", "source.rankings.alexa.rank.MX", "source.rankings.alexa.rank.FM", "source.rankings.alexa.rank.MD", "source.rankings.alexa.rank.MC", "source.rankings.alexa.rank.MN", "source.rankings.alexa.rank.ME", "source.rankings.alexa.rank.MS", "source.rankings.alexa.rank.MA", "source.rankings.alexa.rank.MZ", "source.rankings.alexa.rank.MM", "source.rankings.alexa.rank.NA", "source.rankings.alexa.rank.NR", "source.rankings.alexa.rank.NP", "source.rankings.alexa.rank.NL", "source.rankings.alexa.rank.NC", "source.rankings.alexa.rank.NZ", "source.rankings.alexa.rank.NI", "source.rankings.alexa.rank.NE", "source.rankings.alexa.rank.NG", "source.rankings.alexa.rank.NU", "source.rankings.alexa.rank.NF", "source.rankings.alexa.rank.MP", "source.rankings.alexa.rank.NO", "source.rankings.alexa.rank.OM", "source.rankings.alexa.rank.PK", "source.rankings.alexa.rank.PW", "source.rankings.alexa.rank.PS", "source.rankings.alexa.rank.PA", "source.rankings.alexa.rank.PG", "source.rankings.alexa.rank.PY", "source.rankings.alexa.rank.PE", "source.rankings.alexa.rank.PH", "source.rankings.alexa.rank.PN", "source.rankings.alexa.rank.PL", "source.rankings.alexa.rank.PT", "source.rankings.alexa.rank.PR", "source.rankings.alexa.rank.QA", "source.rankings.alexa.rank.RE", "source.rankings.alexa.rank.RO", "source.rankings.alexa.rank.RU", "source.rankings.alexa.rank.RW", "source.rankings.alexa.rank.BL", "source.rankings.alexa.rank.SH", "source.rankings.alexa.rank.KN", "source.rankings.alexa.rank.LC", "source.rankings.alexa.rank.MF", "source.rankings.alexa.rank.PM", "source.rankings.alexa.rank.VC", "source.rankings.alexa.rank.WS", "source.rankings.alexa.rank.SM", "source.rankings.alexa.rank.ST", "source.rankings.alexa.rank.SA", "source.rankings.alexa.rank.SN", "source.rankings.alexa.rank.RS", "source.rankings.alexa.rank.SC", "source.rankings.alexa.rank.SL", "source.rankings.alexa.rank.SG", "source.rankings.alexa.rank.SX", "source.rankings.alexa.rank.SK", "source.rankings.alexa.rank.SI", "source.rankings.alexa.rank.SB", "source.rankings.alexa.rank.SO", "source.rankings.alexa.rank.ZA", "source.rankings.alexa.rank.GS", "source.rankings.alexa.rank.SS", "source.rankings.alexa.rank.ES", "source.rankings.alexa.rank.LK", "source.rankings.alexa.rank.SD", "source.rankings.alexa.rank.SR", "source.rankings.alexa.rank.SJ", "source.rankings.alexa.rank.SZ", "source.rankings.alexa.rank.SE", "source.rankings.alexa.rank.CH", "source.rankings.alexa.rank.SY", "source.rankings.alexa.rank.TW", "source.rankings.alexa.rank.TJ", "source.rankings.alexa.rank.TZ", "source.rankings.alexa.rank.TH", "source.rankings.alexa.rank.TL", "source.rankings.alexa.rank.TG", "source.rankings.alexa.rank.TK", "source.rankings.alexa.rank.TO", "source.rankings.alexa.rank.TT", "source.rankings.alexa.rank.TN", "source.rankings.alexa.rank.TR", "source.rankings.alexa.rank.TM", "source.rankings.alexa.rank.TC", "source.rankings.alexa.rank.TV", "source.rankings.alexa.rank.UG", "source.rankings.alexa.rank.UA", "source.rankings.alexa.rank.AE", "source.rankings.alexa.rank.GB", "source.rankings.alexa.rank.US", "source.rankings.alexa.rank.UM", "source.rankings.alexa.rank.UY", "source.rankings.alexa.rank.UZ", "source.rankings.alexa.rank.VU", "source.rankings.alexa.rank.VE", "source.rankings.alexa.rank.VN", "source.rankings.alexa.rank.VG", "source.rankings.alexa.rank.VI", "source.rankings.alexa.rank.WF", "source.rankings.alexa.rank.EH", "source.rankings.alexa.rank.YE", "source.rankings.alexa.rank.ZM", "source.rankings.alexa.rank.ZW"]
|
588
|
+
if @api_client.config.client_side_validation && opts[:'field'] && !allowable_values.include?(opts[:'field'])
|
589
|
+
fail ArgumentError, "invalid value for \"field\", must be one of #{allowable_values}"
|
566
590
|
end
|
567
|
-
|
568
591
|
# resource path
|
569
|
-
local_var_path = '/
|
592
|
+
local_var_path = '/histograms'
|
570
593
|
|
571
594
|
# query parameters
|
572
595
|
query_params = opts[:query_params] || {}
|
@@ -578,6 +601,8 @@ module AylienNewsApi
|
|
578
601
|
query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
|
579
602
|
query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
|
580
603
|
query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
|
604
|
+
query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
|
605
|
+
query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
|
581
606
|
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
582
607
|
query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
|
583
608
|
query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
|
@@ -586,6 +611,8 @@ module AylienNewsApi
|
|
586
611
|
query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
|
587
612
|
query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
|
588
613
|
query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
|
614
|
+
query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
|
615
|
+
query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
|
589
616
|
query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
|
590
617
|
query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
|
591
618
|
query_params[:'entities.title.text'] = opts[:'entities_title_text'] if !opts[:'entities_title_text'].nil?
|
@@ -654,14 +681,10 @@ module AylienNewsApi
|
|
654
681
|
query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
|
655
682
|
query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
|
656
683
|
query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
|
657
|
-
query_params[:'
|
658
|
-
query_params[:'
|
659
|
-
query_params[:'
|
660
|
-
query_params[:'
|
661
|
-
query_params[:'story_body'] = opts[:'story_body'] if !opts[:'story_body'].nil?
|
662
|
-
query_params[:'story_published_at'] = opts[:'story_published_at'] if !opts[:'story_published_at'].nil?
|
663
|
-
query_params[:'story_language'] = opts[:'story_language'] if !opts[:'story_language'].nil?
|
664
|
-
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
684
|
+
query_params[:'interval.start'] = opts[:'interval_start'] if !opts[:'interval_start'].nil?
|
685
|
+
query_params[:'interval.end'] = opts[:'interval_end'] if !opts[:'interval_end'].nil?
|
686
|
+
query_params[:'interval.width'] = opts[:'interval_width'] if !opts[:'interval_width'].nil?
|
687
|
+
query_params[:'field'] = opts[:'field'] if !opts[:'field'].nil?
|
665
688
|
|
666
689
|
# header parameters
|
667
690
|
header_params = opts[:header_params] || {}
|
@@ -675,7 +698,7 @@ module AylienNewsApi
|
|
675
698
|
post_body = opts[:body]
|
676
699
|
|
677
700
|
# return_type
|
678
|
-
return_type = opts[:return_type] || '
|
701
|
+
return_type = opts[:return_type] || 'Histograms'
|
679
702
|
|
680
703
|
# auth_names
|
681
704
|
auth_names = opts[:auth_names] || ['app_id', 'app_key']
|
@@ -691,13 +714,11 @@ module AylienNewsApi
|
|
691
714
|
|
692
715
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
693
716
|
if @api_client.config.debugging
|
694
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
717
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_histograms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
695
718
|
end
|
696
719
|
return data, status_code, headers
|
697
720
|
end
|
698
721
|
|
699
|
-
# List histograms
|
700
|
-
# For the numerical metadata that the News API gathers (such as word counts or social shares for example), you can use the histograms endpoint to access and display this information. As this endpoint does not return actual stories, the results you are given will not count towards your story allowance provided by your subscription, so you can effectively query this endpoint free of charge.
|
701
722
|
# @param [Hash] opts the optional parameters
|
702
723
|
# @option opts [Array<Integer>] :id This parameter is used for finding stories by story id.
|
703
724
|
# @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id.
|
@@ -707,6 +728,8 @@ module AylienNewsApi
|
|
707
728
|
# @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
708
729
|
# @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
709
730
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
731
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
732
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
710
733
|
# @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.
|
711
734
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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
735
|
# @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).
|
@@ -715,6 +738,8 @@ module AylienNewsApi
|
|
715
738
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). (default to true)
|
716
739
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
717
740
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
741
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
742
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
718
743
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
719
744
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
720
745
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -782,18 +807,21 @@ module AylienNewsApi
|
|
782
807
|
# @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.
|
783
808
|
# @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.
|
784
809
|
# @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.
|
785
|
-
# @option opts [
|
786
|
-
# @option opts [
|
787
|
-
# @option opts [Integer] :
|
788
|
-
# @option opts [String] :
|
789
|
-
# @
|
790
|
-
|
791
|
-
|
810
|
+
# @option opts [Array<String>] :clusters This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](https://newsapi.aylien.com/docs/working-with-clustering).
|
811
|
+
# @option opts [Array<String>] :_return This parameter is used for specifying return fields.
|
812
|
+
# @option opts [Integer] :story_id A story id
|
813
|
+
# @option opts [String] :story_url An article or webpage
|
814
|
+
# @option opts [String] :story_title Title of the article
|
815
|
+
# @option opts [String] :story_body Body of the article
|
816
|
+
# @option opts [String] :boost_by This parameter is used for boosting the result by the specified value.
|
817
|
+
# @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')
|
818
|
+
# @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 3)
|
819
|
+
# @return [RelatedStories]
|
820
|
+
def list_related_stories_get(opts = {})
|
821
|
+
data, _status_code, _headers = list_related_stories_get_with_http_info(opts)
|
792
822
|
data
|
793
823
|
end
|
794
824
|
|
795
|
-
# List histograms
|
796
|
-
# For the numerical metadata that the News API gathers (such as word counts or social shares for example), you can use the histograms endpoint to access and display this information. As this endpoint does not return actual stories, the results you are given will not count towards your story allowance provided by your subscription, so you can effectively query this endpoint free of charge.
|
797
825
|
# @param [Hash] opts the optional parameters
|
798
826
|
# @option opts [Array<Integer>] :id This parameter is used for finding stories by story id.
|
799
827
|
# @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id.
|
@@ -803,6 +831,8 @@ module AylienNewsApi
|
|
803
831
|
# @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
804
832
|
# @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
805
833
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
834
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
835
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
806
836
|
# @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.
|
807
837
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
808
838
|
# @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).
|
@@ -811,6 +841,8 @@ module AylienNewsApi
|
|
811
841
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
812
842
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
813
843
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
844
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
845
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
814
846
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
815
847
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
816
848
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -878,14 +910,19 @@ module AylienNewsApi
|
|
878
910
|
# @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.
|
879
911
|
# @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.
|
880
912
|
# @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.
|
881
|
-
# @option opts [
|
882
|
-
# @option opts [
|
883
|
-
# @option opts [Integer] :
|
884
|
-
# @option opts [String] :
|
885
|
-
# @
|
886
|
-
|
913
|
+
# @option opts [Array<String>] :clusters This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](https://newsapi.aylien.com/docs/working-with-clustering).
|
914
|
+
# @option opts [Array<String>] :_return This parameter is used for specifying return fields.
|
915
|
+
# @option opts [Integer] :story_id A story id
|
916
|
+
# @option opts [String] :story_url An article or webpage
|
917
|
+
# @option opts [String] :story_title Title of the article
|
918
|
+
# @option opts [String] :story_body Body of the article
|
919
|
+
# @option opts [String] :boost_by This parameter is used for boosting the result by the specified value.
|
920
|
+
# @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.
|
921
|
+
# @option opts [Integer] :per_page This parameter is used for specifying number of items in each page.
|
922
|
+
# @return [Array<(RelatedStories, Integer, Hash)>] RelatedStories data, response status code and response headers
|
923
|
+
def list_related_stories_get_with_http_info(opts = {})
|
887
924
|
if @api_client.config.debugging
|
888
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
925
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_related_stories_get ...'
|
889
926
|
end
|
890
927
|
allowable_values = ["en", "de", "fr", "it", "es", "pt"]
|
891
928
|
if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
|
@@ -916,35 +953,35 @@ module AylienNewsApi
|
|
916
953
|
fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
|
917
954
|
end
|
918
955
|
if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
|
919
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.
|
956
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
920
957
|
end
|
921
958
|
|
922
959
|
if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
|
923
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.
|
960
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
924
961
|
end
|
925
962
|
|
926
963
|
if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
|
927
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.
|
964
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
928
965
|
end
|
929
966
|
|
930
967
|
if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
|
931
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.
|
968
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
932
969
|
end
|
933
970
|
|
934
971
|
if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
|
935
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.
|
972
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
936
973
|
end
|
937
974
|
|
938
975
|
if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
|
939
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.
|
976
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
940
977
|
end
|
941
978
|
|
942
979
|
if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
|
943
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.
|
980
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
944
981
|
end
|
945
982
|
|
946
983
|
if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
|
947
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.
|
984
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
948
985
|
end
|
949
986
|
|
950
987
|
allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
|
@@ -956,11 +993,11 @@ module AylienNewsApi
|
|
956
993
|
fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
|
957
994
|
end
|
958
995
|
if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
|
959
|
-
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.
|
996
|
+
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
960
997
|
end
|
961
998
|
|
962
999
|
if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
|
963
|
-
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.
|
1000
|
+
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
964
1001
|
end
|
965
1002
|
|
966
1003
|
allowable_values = ["international", "national", "local"]
|
@@ -972,59 +1009,75 @@ module AylienNewsApi
|
|
972
1009
|
fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
|
973
1010
|
end
|
974
1011
|
if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
|
975
|
-
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.
|
1012
|
+
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
976
1013
|
end
|
977
1014
|
|
978
1015
|
if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
|
979
|
-
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.
|
1016
|
+
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
980
1017
|
end
|
981
1018
|
|
982
1019
|
if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
|
983
|
-
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.
|
1020
|
+
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
984
1021
|
end
|
985
1022
|
|
986
1023
|
if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
|
987
|
-
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.
|
1024
|
+
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
988
1025
|
end
|
989
1026
|
|
990
1027
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
|
991
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.
|
1028
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
992
1029
|
end
|
993
1030
|
|
994
1031
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
|
995
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.
|
1032
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
996
1033
|
end
|
997
1034
|
|
998
1035
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
|
999
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.
|
1036
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
1000
1037
|
end
|
1001
1038
|
|
1002
1039
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
|
1003
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.
|
1040
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
1004
1041
|
end
|
1005
1042
|
|
1006
1043
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
|
1007
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.
|
1044
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
1008
1045
|
end
|
1009
1046
|
|
1010
1047
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
|
1011
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.
|
1048
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
1012
1049
|
end
|
1013
1050
|
|
1014
1051
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
|
1015
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.
|
1052
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
1016
1053
|
end
|
1017
1054
|
|
1018
1055
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
|
1019
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.
|
1056
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_related_stories_get, must be greater than 0.'
|
1020
1057
|
end
|
1021
1058
|
|
1022
|
-
allowable_values = ["
|
1023
|
-
if @api_client.config.client_side_validation && opts[:'
|
1024
|
-
fail ArgumentError, "invalid value for \"
|
1059
|
+
allowable_values = ["id", "title", "body", "summary", "source", "author", "entities", "keywords", "hashtags", "characters_count", "words_count", "sentences_count", "paragraphs_count", "categories", "social_shares_count", "media", "sentiment", "language", "published_at", "links"]
|
1060
|
+
if @api_client.config.client_side_validation && opts[:'_return'] && !opts[:'_return'].all? { |item| allowable_values.include?(item) }
|
1061
|
+
fail ArgumentError, "invalid value for \"_return\", must include one of #{allowable_values}"
|
1062
|
+
end
|
1063
|
+
allowable_values = ["recency", "popularity"]
|
1064
|
+
if @api_client.config.client_side_validation && opts[:'boost_by'] && !allowable_values.include?(opts[:'boost_by'])
|
1065
|
+
fail ArgumentError, "invalid value for \"boost_by\", must be one of #{allowable_values}"
|
1066
|
+
end
|
1067
|
+
allowable_values = ["auto", "en", "de", "fr", "it", "es", "pt"]
|
1068
|
+
if @api_client.config.client_side_validation && opts[:'story_language'] && !allowable_values.include?(opts[:'story_language'])
|
1069
|
+
fail ArgumentError, "invalid value for \"story_language\", must be one of #{allowable_values}"
|
1025
1070
|
end
|
1071
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
1072
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_related_stories_get, must be smaller than or equal to 100.'
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
1076
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_related_stories_get, must be greater than or equal to 1.'
|
1077
|
+
end
|
1078
|
+
|
1026
1079
|
# resource path
|
1027
|
-
local_var_path = '/
|
1080
|
+
local_var_path = '/related_stories'
|
1028
1081
|
|
1029
1082
|
# query parameters
|
1030
1083
|
query_params = opts[:query_params] || {}
|
@@ -1036,6 +1089,8 @@ module AylienNewsApi
|
|
1036
1089
|
query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
|
1037
1090
|
query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
|
1038
1091
|
query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
|
1092
|
+
query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
|
1093
|
+
query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
|
1039
1094
|
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
1040
1095
|
query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
|
1041
1096
|
query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
|
@@ -1044,6 +1099,8 @@ module AylienNewsApi
|
|
1044
1099
|
query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
|
1045
1100
|
query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
|
1046
1101
|
query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
|
1102
|
+
query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
|
1103
|
+
query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
|
1047
1104
|
query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
|
1048
1105
|
query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
|
1049
1106
|
query_params[:'entities.title.text'] = opts[:'entities_title_text'] if !opts[:'entities_title_text'].nil?
|
@@ -1111,10 +1168,15 @@ module AylienNewsApi
|
|
1111
1168
|
query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
|
1112
1169
|
query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
|
1113
1170
|
query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
|
1114
|
-
query_params[:'
|
1115
|
-
query_params[:'
|
1116
|
-
query_params[:'
|
1117
|
-
query_params[:'
|
1171
|
+
query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
|
1172
|
+
query_params[:'return'] = opts[:'_return'] if !opts[:'_return'].nil?
|
1173
|
+
query_params[:'story_id'] = opts[:'story_id'] if !opts[:'story_id'].nil?
|
1174
|
+
query_params[:'story_url'] = opts[:'story_url'] if !opts[:'story_url'].nil?
|
1175
|
+
query_params[:'story_title'] = opts[:'story_title'] if !opts[:'story_title'].nil?
|
1176
|
+
query_params[:'story_body'] = opts[:'story_body'] if !opts[:'story_body'].nil?
|
1177
|
+
query_params[:'boost_by'] = opts[:'boost_by'] if !opts[:'boost_by'].nil?
|
1178
|
+
query_params[:'story_language'] = opts[:'story_language'] if !opts[:'story_language'].nil?
|
1179
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
1118
1180
|
|
1119
1181
|
# header parameters
|
1120
1182
|
header_params = opts[:header_params] || {}
|
@@ -1128,7 +1190,7 @@ module AylienNewsApi
|
|
1128
1190
|
post_body = opts[:body]
|
1129
1191
|
|
1130
1192
|
# return_type
|
1131
|
-
return_type = opts[:return_type] || '
|
1193
|
+
return_type = opts[:return_type] || 'RelatedStories'
|
1132
1194
|
|
1133
1195
|
# auth_names
|
1134
1196
|
auth_names = opts[:auth_names] || ['app_id', 'app_key']
|
@@ -1144,13 +1206,11 @@ module AylienNewsApi
|
|
1144
1206
|
|
1145
1207
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1146
1208
|
if @api_client.config.debugging
|
1147
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
1209
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_related_stories_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1148
1210
|
end
|
1149
1211
|
return data, status_code, headers
|
1150
1212
|
end
|
1151
1213
|
|
1152
|
-
# List related stories
|
1153
|
-
# This endpoint is used for finding semantically similar stories based on the parameters you provide as inputs. For example, if you want to find stories similar to a Tweet or any text extract you input, the related stories endpoint will analyze the entities present and the meaning of the text, and find stories with a similar meaning. The maximum number of related stories returned is 100.
|
1154
1214
|
# @param [Hash] opts the optional parameters
|
1155
1215
|
# @option opts [Array<Integer>] :id This parameter is used for finding stories by story id.
|
1156
1216
|
# @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id.
|
@@ -1160,6 +1220,8 @@ module AylienNewsApi
|
|
1160
1220
|
# @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
1161
1221
|
# @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
1162
1222
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
1223
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
1224
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
1163
1225
|
# @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.
|
1164
1226
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
1165
1227
|
# @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).
|
@@ -1168,6 +1230,8 @@ module AylienNewsApi
|
|
1168
1230
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). (default to true)
|
1169
1231
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1170
1232
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1233
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1234
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1171
1235
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1172
1236
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1173
1237
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -1245,13 +1309,11 @@ module AylienNewsApi
|
|
1245
1309
|
# @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')
|
1246
1310
|
# @option opts [Integer] :per_page This parameter is used for specifying number of items in each page. (default to 3)
|
1247
1311
|
# @return [RelatedStories]
|
1248
|
-
def
|
1249
|
-
data, _status_code, _headers =
|
1312
|
+
def list_related_stories_post(opts = {})
|
1313
|
+
data, _status_code, _headers = list_related_stories_post_with_http_info(opts)
|
1250
1314
|
data
|
1251
1315
|
end
|
1252
1316
|
|
1253
|
-
# List related stories
|
1254
|
-
# This endpoint is used for finding semantically similar stories based on the parameters you provide as inputs. For example, if you want to find stories similar to a Tweet or any text extract you input, the related stories endpoint will analyze the entities present and the meaning of the text, and find stories with a similar meaning. The maximum number of related stories returned is 100.
|
1255
1317
|
# @param [Hash] opts the optional parameters
|
1256
1318
|
# @option opts [Array<Integer>] :id This parameter is used for finding stories by story id.
|
1257
1319
|
# @option opts [Array<Integer>] :not_id This parameter is used for excluding stories by story id.
|
@@ -1261,6 +1323,8 @@ module AylienNewsApi
|
|
1261
1323
|
# @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
1262
1324
|
# @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
1263
1325
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
1326
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
1327
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
1264
1328
|
# @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.
|
1265
1329
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
1266
1330
|
# @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).
|
@@ -1269,6 +1333,8 @@ module AylienNewsApi
|
|
1269
1333
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1270
1334
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1271
1335
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1336
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1337
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1272
1338
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1273
1339
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1274
1340
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -1346,9 +1412,9 @@ module AylienNewsApi
|
|
1346
1412
|
# @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.
|
1347
1413
|
# @option opts [Integer] :per_page This parameter is used for specifying number of items in each page.
|
1348
1414
|
# @return [Array<(RelatedStories, Integer, Hash)>] RelatedStories data, response status code and response headers
|
1349
|
-
def
|
1415
|
+
def list_related_stories_post_with_http_info(opts = {})
|
1350
1416
|
if @api_client.config.debugging
|
1351
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
1417
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_related_stories_post ...'
|
1352
1418
|
end
|
1353
1419
|
allowable_values = ["en", "de", "fr", "it", "es", "pt"]
|
1354
1420
|
if @api_client.config.client_side_validation && opts[:'language'] && !opts[:'language'].all? { |item| allowable_values.include?(item) }
|
@@ -1379,35 +1445,35 @@ module AylienNewsApi
|
|
1379
1445
|
fail ArgumentError, "invalid value for \"not_sentiment_body_polarity\", must be one of #{allowable_values}"
|
1380
1446
|
end
|
1381
1447
|
if @api_client.config.client_side_validation && !opts[:'media_images_count_min'].nil? && opts[:'media_images_count_min'] <= 0
|
1382
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.
|
1448
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_count_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1383
1449
|
end
|
1384
1450
|
|
1385
1451
|
if @api_client.config.client_side_validation && !opts[:'media_images_count_max'].nil? && opts[:'media_images_count_max'] <= 0
|
1386
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.
|
1452
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_count_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1387
1453
|
end
|
1388
1454
|
|
1389
1455
|
if @api_client.config.client_side_validation && !opts[:'media_images_width_min'].nil? && opts[:'media_images_width_min'] <= 0
|
1390
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.
|
1456
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_width_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1391
1457
|
end
|
1392
1458
|
|
1393
1459
|
if @api_client.config.client_side_validation && !opts[:'media_images_width_max'].nil? && opts[:'media_images_width_max'] <= 0
|
1394
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.
|
1460
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_width_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1395
1461
|
end
|
1396
1462
|
|
1397
1463
|
if @api_client.config.client_side_validation && !opts[:'media_images_height_min'].nil? && opts[:'media_images_height_min'] <= 0
|
1398
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.
|
1464
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_height_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1399
1465
|
end
|
1400
1466
|
|
1401
1467
|
if @api_client.config.client_side_validation && !opts[:'media_images_height_max'].nil? && opts[:'media_images_height_max'] <= 0
|
1402
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.
|
1468
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_height_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1403
1469
|
end
|
1404
1470
|
|
1405
1471
|
if @api_client.config.client_side_validation && !opts[:'media_images_content_length_min'].nil? && opts[:'media_images_content_length_min'] <= 0
|
1406
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.
|
1472
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1407
1473
|
end
|
1408
1474
|
|
1409
1475
|
if @api_client.config.client_side_validation && !opts[:'media_images_content_length_max'].nil? && opts[:'media_images_content_length_max'] <= 0
|
1410
|
-
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.
|
1476
|
+
fail ArgumentError, 'invalid value for "opts[:"media_images_content_length_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1411
1477
|
end
|
1412
1478
|
|
1413
1479
|
allowable_values = ["BMP", "GIF", "JPEG", "PNG", "TIFF", "PSD", "ICO", "CUR", "WEBP", "SVG"]
|
@@ -1419,11 +1485,11 @@ module AylienNewsApi
|
|
1419
1485
|
fail ArgumentError, "invalid value for \"not_media_images_format\", must include one of #{allowable_values}"
|
1420
1486
|
end
|
1421
1487
|
if @api_client.config.client_side_validation && !opts[:'media_videos_count_min'].nil? && opts[:'media_videos_count_min'] <= 0
|
1422
|
-
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.
|
1488
|
+
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1423
1489
|
end
|
1424
1490
|
|
1425
1491
|
if @api_client.config.client_side_validation && !opts[:'media_videos_count_max'].nil? && opts[:'media_videos_count_max'] <= 0
|
1426
|
-
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.
|
1492
|
+
fail ArgumentError, 'invalid value for "opts[:"media_videos_count_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1427
1493
|
end
|
1428
1494
|
|
1429
1495
|
allowable_values = ["international", "national", "local"]
|
@@ -1435,51 +1501,51 @@ module AylienNewsApi
|
|
1435
1501
|
fail ArgumentError, "invalid value for \"not_source_scopes_level\", must include one of #{allowable_values}"
|
1436
1502
|
end
|
1437
1503
|
if @api_client.config.client_side_validation && !opts[:'source_links_in_count_min'].nil? && opts[:'source_links_in_count_min'] <= 0
|
1438
|
-
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.
|
1504
|
+
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1439
1505
|
end
|
1440
1506
|
|
1441
1507
|
if @api_client.config.client_side_validation && !opts[:'source_links_in_count_max'].nil? && opts[:'source_links_in_count_max'] <= 0
|
1442
|
-
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.
|
1508
|
+
fail ArgumentError, 'invalid value for "opts[:"source_links_in_count_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1443
1509
|
end
|
1444
1510
|
|
1445
1511
|
if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_min'].nil? && opts[:'source_rankings_alexa_rank_min'] <= 0
|
1446
|
-
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.
|
1512
|
+
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1447
1513
|
end
|
1448
1514
|
|
1449
1515
|
if @api_client.config.client_side_validation && !opts[:'source_rankings_alexa_rank_max'].nil? && opts[:'source_rankings_alexa_rank_max'] <= 0
|
1450
|
-
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.
|
1516
|
+
fail ArgumentError, 'invalid value for "opts[:"source_rankings_alexa_rank_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1451
1517
|
end
|
1452
1518
|
|
1453
1519
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_min'].nil? && opts[:'social_shares_count_facebook_min'] <= 0
|
1454
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.
|
1520
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1455
1521
|
end
|
1456
1522
|
|
1457
1523
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_facebook_max'].nil? && opts[:'social_shares_count_facebook_max'] <= 0
|
1458
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.
|
1524
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_facebook_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1459
1525
|
end
|
1460
1526
|
|
1461
1527
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_min'].nil? && opts[:'social_shares_count_google_plus_min'] <= 0
|
1462
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.
|
1528
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1463
1529
|
end
|
1464
1530
|
|
1465
1531
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_google_plus_max'].nil? && opts[:'social_shares_count_google_plus_max'] <= 0
|
1466
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.
|
1532
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_google_plus_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1467
1533
|
end
|
1468
1534
|
|
1469
1535
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_min'].nil? && opts[:'social_shares_count_linkedin_min'] <= 0
|
1470
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.
|
1536
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1471
1537
|
end
|
1472
1538
|
|
1473
1539
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_linkedin_max'].nil? && opts[:'social_shares_count_linkedin_max'] <= 0
|
1474
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.
|
1540
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_linkedin_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1475
1541
|
end
|
1476
1542
|
|
1477
1543
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_min'].nil? && opts[:'social_shares_count_reddit_min'] <= 0
|
1478
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.
|
1544
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_min"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1479
1545
|
end
|
1480
1546
|
|
1481
1547
|
if @api_client.config.client_side_validation && !opts[:'social_shares_count_reddit_max'].nil? && opts[:'social_shares_count_reddit_max'] <= 0
|
1482
|
-
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.
|
1548
|
+
fail ArgumentError, 'invalid value for "opts[:"social_shares_count_reddit_max"]" when calling DefaultApi.list_related_stories_post, must be greater than 0.'
|
1483
1549
|
end
|
1484
1550
|
|
1485
1551
|
allowable_values = ["id", "title", "body", "summary", "source", "author", "entities", "keywords", "hashtags", "characters_count", "words_count", "sentences_count", "paragraphs_count", "categories", "social_shares_count", "media", "sentiment", "language", "published_at", "links"]
|
@@ -1495,11 +1561,11 @@ module AylienNewsApi
|
|
1495
1561
|
fail ArgumentError, "invalid value for \"story_language\", must be one of #{allowable_values}"
|
1496
1562
|
end
|
1497
1563
|
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
1498
|
-
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.
|
1564
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_related_stories_post, must be smaller than or equal to 100.'
|
1499
1565
|
end
|
1500
1566
|
|
1501
1567
|
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
1502
|
-
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.
|
1568
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_related_stories_post, must be greater than or equal to 1.'
|
1503
1569
|
end
|
1504
1570
|
|
1505
1571
|
# resource path
|
@@ -1515,6 +1581,8 @@ module AylienNewsApi
|
|
1515
1581
|
query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
|
1516
1582
|
query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
|
1517
1583
|
query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
|
1584
|
+
query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
|
1585
|
+
query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
|
1518
1586
|
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
1519
1587
|
query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
|
1520
1588
|
query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
|
@@ -1523,6 +1591,8 @@ module AylienNewsApi
|
|
1523
1591
|
query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
|
1524
1592
|
query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
|
1525
1593
|
query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
|
1594
|
+
query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
|
1595
|
+
query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
|
1526
1596
|
query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
|
1527
1597
|
query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
|
1528
1598
|
query_params[:'entities.title.text'] = opts[:'entities_title_text'] if !opts[:'entities_title_text'].nil?
|
@@ -1626,9 +1696,9 @@ module AylienNewsApi
|
|
1626
1696
|
:return_type => return_type
|
1627
1697
|
)
|
1628
1698
|
|
1629
|
-
data, status_code, headers = @api_client.call_api(:
|
1699
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1630
1700
|
if @api_client.config.debugging
|
1631
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
1701
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_related_stories_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1632
1702
|
end
|
1633
1703
|
return data, status_code, headers
|
1634
1704
|
end
|
@@ -1646,12 +1716,16 @@ module AylienNewsApi
|
|
1646
1716
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
1647
1717
|
# @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.
|
1648
1718
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
1719
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
1720
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
1649
1721
|
# @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).
|
1650
1722
|
# @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).
|
1651
1723
|
# @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1652
1724
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). (default to true)
|
1653
1725
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1654
1726
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1727
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1728
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1655
1729
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1656
1730
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1657
1731
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -1744,12 +1818,16 @@ module AylienNewsApi
|
|
1744
1818
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
1745
1819
|
# @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.
|
1746
1820
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
1821
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
1822
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
1747
1823
|
# @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).
|
1748
1824
|
# @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).
|
1749
1825
|
# @option opts [String] :categories_taxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1750
1826
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1751
1827
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1752
1828
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1829
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1830
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1753
1831
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1754
1832
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
1755
1833
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -1995,12 +2073,16 @@ module AylienNewsApi
|
|
1995
2073
|
query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
|
1996
2074
|
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
1997
2075
|
query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
|
2076
|
+
query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
|
2077
|
+
query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
|
1998
2078
|
query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
|
1999
2079
|
query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
|
2000
2080
|
query_params[:'categories.taxonomy'] = opts[:'categories_taxonomy'] if !opts[:'categories_taxonomy'].nil?
|
2001
2081
|
query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
|
2002
2082
|
query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
|
2003
2083
|
query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
|
2084
|
+
query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
|
2085
|
+
query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
|
2004
2086
|
query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
|
2005
2087
|
query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
|
2006
2088
|
query_params[:'entities.title.text'] = opts[:'entities_title_text'] if !opts[:'entities_title_text'].nil?
|
@@ -2125,6 +2207,8 @@ module AylienNewsApi
|
|
2125
2207
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). (default to true)
|
2126
2208
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2127
2209
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2210
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2211
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2128
2212
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2129
2213
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2130
2214
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -2192,6 +2276,7 @@ module AylienNewsApi
|
|
2192
2276
|
# @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.
|
2193
2277
|
# @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.
|
2194
2278
|
# @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.
|
2279
|
+
# @option opts [Array<String>] :clusters This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](https://newsapi.aylien.com/docs/working-with-clustering).
|
2195
2280
|
# @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')
|
2196
2281
|
# @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')
|
2197
2282
|
# @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 `+` following an integer number greater than 0 and one of the Date Math keywords. e.g. `+1DAY`, `+2MINUTES` and `+1MONTH`. Here are [Supported keywords](https://newsapi.aylien.com/docs/working-with-dates#date-math). (default to '+1DAY')
|
@@ -2218,6 +2303,8 @@ module AylienNewsApi
|
|
2218
2303
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2219
2304
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2220
2305
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2306
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2307
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2221
2308
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2222
2309
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2223
2310
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -2285,6 +2372,7 @@ module AylienNewsApi
|
|
2285
2372
|
# @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.
|
2286
2373
|
# @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.
|
2287
2374
|
# @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.
|
2375
|
+
# @option opts [Array<String>] :clusters This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](https://newsapi.aylien.com/docs/working-with-clustering).
|
2288
2376
|
# @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).
|
2289
2377
|
# @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).
|
2290
2378
|
# @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 `+` following an integer number greater than 0 and one of the Date Math keywords. e.g. `+1DAY`, `+2MINUTES` and `+1MONTH`. Here are [Supported keywords](https://newsapi.aylien.com/docs/working-with-dates#date-math).
|
@@ -2444,6 +2532,8 @@ module AylienNewsApi
|
|
2444
2532
|
query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
|
2445
2533
|
query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
|
2446
2534
|
query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
|
2535
|
+
query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
|
2536
|
+
query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
|
2447
2537
|
query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
|
2448
2538
|
query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
|
2449
2539
|
query_params[:'entities.title.text'] = opts[:'entities_title_text'] if !opts[:'entities_title_text'].nil?
|
@@ -2511,6 +2601,7 @@ module AylienNewsApi
|
|
2511
2601
|
query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
|
2512
2602
|
query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
|
2513
2603
|
query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
|
2604
|
+
query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
|
2514
2605
|
query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
|
2515
2606
|
query_params[:'published_at.end'] = opts[:'published_at_end'] if !opts[:'published_at_end'].nil?
|
2516
2607
|
query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
|
@@ -2560,6 +2651,8 @@ module AylienNewsApi
|
|
2560
2651
|
# @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
2561
2652
|
# @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
2562
2653
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
2654
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
2655
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
2563
2656
|
# @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.
|
2564
2657
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
2565
2658
|
# @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).
|
@@ -2568,6 +2661,8 @@ module AylienNewsApi
|
|
2568
2661
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). (default to true)
|
2569
2662
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2570
2663
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2664
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2665
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2571
2666
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2572
2667
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2573
2668
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -2635,6 +2730,7 @@ module AylienNewsApi
|
|
2635
2730
|
# @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.
|
2636
2731
|
# @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.
|
2637
2732
|
# @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.
|
2733
|
+
# @option opts [Array<String>] :clusters This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](https://newsapi.aylien.com/docs/working-with-clustering).
|
2638
2734
|
# @return [Trends]
|
2639
2735
|
def list_trends(field, opts = {})
|
2640
2736
|
data, _status_code, _headers = list_trends_with_http_info(field, opts)
|
@@ -2653,6 +2749,8 @@ module AylienNewsApi
|
|
2653
2749
|
# @option opts [String] :translations_en_title This parameter is used for finding stories whose translation title contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
2654
2750
|
# @option opts [String] :translations_en_body This parameter is used for finding stories whose translation body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
2655
2751
|
# @option opts [String] :translations_en_text This parameter is used for finding stories whose translation title or body contains a specific keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
2752
|
+
# @option opts [Array<String>] :links_permalink This parameter is used to find stories based on their url.
|
2753
|
+
# @option opts [Array<String>] :not_links_permalink This parameter is used to exclude stories based on their url.
|
2656
2754
|
# @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.
|
2657
2755
|
# @option opts [Array<String>] :not_language This parameter is used for excluding 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.
|
2658
2756
|
# @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).
|
@@ -2661,6 +2759,8 @@ module AylienNewsApi
|
|
2661
2759
|
# @option opts [Boolean] :categories_confident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2662
2760
|
# @option opts [Array<String>] :categories_id This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2663
2761
|
# @option opts [Array<String>] :not_categories_id This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2762
|
+
# @option opts [Array<String>] :categories_label This parameter is used for finding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2763
|
+
# @option opts [Array<String>] :not_categories_label This parameter is used for excluding stories by categories label. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2664
2764
|
# @option opts [Array<Integer>] :categories_level This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2665
2765
|
# @option opts [Array<Integer>] :not_categories_level This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories).
|
2666
2766
|
# @option opts [Array<String>] :entities_title_text This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities).
|
@@ -2728,6 +2828,7 @@ module AylienNewsApi
|
|
2728
2828
|
# @option opts [Integer] :social_shares_count_linkedin_max This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.
|
2729
2829
|
# @option opts [Integer] :social_shares_count_reddit_min This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.
|
2730
2830
|
# @option opts [Integer] :social_shares_count_reddit_max This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.
|
2831
|
+
# @option opts [Array<String>] :clusters This parameter is used for finding stories with belonging to one of clusters in a specific set of clusters You can read more about working with clustering [here](https://newsapi.aylien.com/docs/working-with-clustering).
|
2731
2832
|
# @return [Array<(Trends, Integer, Hash)>] Trends data, response status code and response headers
|
2732
2833
|
def list_trends_with_http_info(field, opts = {})
|
2733
2834
|
if @api_client.config.debugging
|
@@ -2888,6 +2989,8 @@ module AylienNewsApi
|
|
2888
2989
|
query_params[:'translations.en.title'] = opts[:'translations_en_title'] if !opts[:'translations_en_title'].nil?
|
2889
2990
|
query_params[:'translations.en.body'] = opts[:'translations_en_body'] if !opts[:'translations_en_body'].nil?
|
2890
2991
|
query_params[:'translations.en.text'] = opts[:'translations_en_text'] if !opts[:'translations_en_text'].nil?
|
2992
|
+
query_params[:'links.permalink'] = opts[:'links_permalink'] if !opts[:'links_permalink'].nil?
|
2993
|
+
query_params[:'!links.permalink'] = opts[:'not_links_permalink'] if !opts[:'not_links_permalink'].nil?
|
2891
2994
|
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
2892
2995
|
query_params[:'!language'] = opts[:'not_language'] if !opts[:'not_language'].nil?
|
2893
2996
|
query_params[:'published_at.start'] = opts[:'published_at_start'] if !opts[:'published_at_start'].nil?
|
@@ -2896,6 +2999,8 @@ module AylienNewsApi
|
|
2896
2999
|
query_params[:'categories.confident'] = opts[:'categories_confident'] if !opts[:'categories_confident'].nil?
|
2897
3000
|
query_params[:'categories.id'] = opts[:'categories_id'] if !opts[:'categories_id'].nil?
|
2898
3001
|
query_params[:'!categories.id'] = opts[:'not_categories_id'] if !opts[:'not_categories_id'].nil?
|
3002
|
+
query_params[:'categories.label'] = opts[:'categories_label'] if !opts[:'categories_label'].nil?
|
3003
|
+
query_params[:'!categories.label'] = opts[:'not_categories_label'] if !opts[:'not_categories_label'].nil?
|
2899
3004
|
query_params[:'categories.level'] = opts[:'categories_level'] if !opts[:'categories_level'].nil?
|
2900
3005
|
query_params[:'!categories.level'] = opts[:'not_categories_level'] if !opts[:'not_categories_level'].nil?
|
2901
3006
|
query_params[:'entities.title.text'] = opts[:'entities_title_text'] if !opts[:'entities_title_text'].nil?
|
@@ -2963,6 +3068,7 @@ module AylienNewsApi
|
|
2963
3068
|
query_params[:'social_shares_count.linkedin.max'] = opts[:'social_shares_count_linkedin_max'] if !opts[:'social_shares_count_linkedin_max'].nil?
|
2964
3069
|
query_params[:'social_shares_count.reddit.min'] = opts[:'social_shares_count_reddit_min'] if !opts[:'social_shares_count_reddit_min'].nil?
|
2965
3070
|
query_params[:'social_shares_count.reddit.max'] = opts[:'social_shares_count_reddit_max'] if !opts[:'social_shares_count_reddit_max'].nil?
|
3071
|
+
query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?
|
2966
3072
|
|
2967
3073
|
# header parameters
|
2968
3074
|
header_params = opts[:header_params] || {}
|