aylien_news_api 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +67 -0
- data/LICENSE +13 -0
- data/README.md +133 -0
- data/Rakefile +8 -0
- data/aylien_news_api.gemspec +33 -0
- data/docs/Author.md +10 -0
- data/docs/Autocomplete.md +9 -0
- data/docs/Autocompletes.md +8 -0
- data/docs/Category.md +13 -0
- data/docs/CategoryLinks.md +9 -0
- data/docs/Coverages.md +12 -0
- data/docs/DefaultApi.md +829 -0
- data/docs/Entities.md +9 -0
- data/docs/Entity.md +12 -0
- data/docs/EntityLinks.md +8 -0
- data/docs/Error.md +13 -0
- data/docs/ErrorLinks.md +8 -0
- data/docs/Errors.md +8 -0
- data/docs/HistogramInterval.md +9 -0
- data/docs/Histograms.md +12 -0
- data/docs/Location.md +10 -0
- data/docs/Media.md +9 -0
- data/docs/RelatedStories.md +11 -0
- data/docs/Scope.md +11 -0
- data/docs/Sentiment.md +9 -0
- data/docs/Sentiments.md +9 -0
- data/docs/ShareCount.md +9 -0
- data/docs/ShareCounts.md +11 -0
- data/docs/Source.md +13 -0
- data/docs/Stories.md +10 -0
- data/docs/Story.md +27 -0
- data/docs/StoryCluster.md +12 -0
- data/docs/StoryLinks.md +10 -0
- data/docs/Summary.md +8 -0
- data/docs/TimeSeries.md +9 -0
- data/docs/TimeSeriesList.md +11 -0
- data/docs/Trend.md +9 -0
- data/docs/Trends.md +9 -0
- data/lib/aylien_news_api.rb +74 -0
- data/lib/aylien_news_api/api/default_api.rb +1171 -0
- data/lib/aylien_news_api/api_client.rb +365 -0
- data/lib/aylien_news_api/api_error.rb +38 -0
- data/lib/aylien_news_api/configuration.rb +191 -0
- data/lib/aylien_news_api/models/author.rb +192 -0
- data/lib/aylien_news_api/models/autocomplete.rb +183 -0
- data/lib/aylien_news_api/models/autocompletes.rb +176 -0
- data/lib/aylien_news_api/models/category.rb +229 -0
- data/lib/aylien_news_api/models/category_links.rb +183 -0
- data/lib/aylien_news_api/models/coverages.rb +212 -0
- data/lib/aylien_news_api/models/entities.rb +187 -0
- data/lib/aylien_news_api/models/entity.rb +214 -0
- data/lib/aylien_news_api/models/entity_links.rb +174 -0
- data/lib/aylien_news_api/models/error.rb +213 -0
- data/lib/aylien_news_api/models/error_links.rb +173 -0
- data/lib/aylien_news_api/models/errors.rb +175 -0
- data/lib/aylien_news_api/models/histogram_interval.rb +183 -0
- data/lib/aylien_news_api/models/histograms.rb +211 -0
- data/lib/aylien_news_api/models/location.rb +192 -0
- data/lib/aylien_news_api/models/media.rb +193 -0
- data/lib/aylien_news_api/models/related_stories.rb +203 -0
- data/lib/aylien_news_api/models/scope.rb +211 -0
- data/lib/aylien_news_api/models/sentiment.rb +193 -0
- data/lib/aylien_news_api/models/sentiments.rb +183 -0
- data/lib/aylien_news_api/models/share_count.rb +183 -0
- data/lib/aylien_news_api/models/share_counts.rb +209 -0
- data/lib/aylien_news_api/models/source.rb +223 -0
- data/lib/aylien_news_api/models/stories.rb +196 -0
- data/lib/aylien_news_api/models/story.rb +353 -0
- data/lib/aylien_news_api/models/story_cluster.rb +214 -0
- data/lib/aylien_news_api/models/story_links.rb +192 -0
- data/lib/aylien_news_api/models/summary.rb +176 -0
- data/lib/aylien_news_api/models/time_series.rb +183 -0
- data/lib/aylien_news_api/models/time_series_list.rb +203 -0
- data/lib/aylien_news_api/models/trend.rb +183 -0
- data/lib/aylien_news_api/models/trends.rb +185 -0
- data/lib/aylien_news_api/version.rb +17 -0
- data/spec/api/default_api_spec.rb +357 -0
- data/spec/models/author_spec.rb +66 -0
- data/spec/models/autocomplete_spec.rb +56 -0
- data/spec/models/autocompletes_spec.rb +46 -0
- data/spec/models/category_links_spec.rb +56 -0
- data/spec/models/category_spec.rb +96 -0
- data/spec/models/coverages_spec.rb +86 -0
- data/spec/models/entities_spec.rb +56 -0
- data/spec/models/entity_links_spec.rb +46 -0
- data/spec/models/entity_spec.rb +86 -0
- data/spec/models/error_links_spec.rb +46 -0
- data/spec/models/error_spec.rb +96 -0
- data/spec/models/errors_spec.rb +46 -0
- data/spec/models/histogram_interval_spec.rb +56 -0
- data/spec/models/histograms_spec.rb +86 -0
- data/spec/models/location_spec.rb +66 -0
- data/spec/models/media_spec.rb +56 -0
- data/spec/models/related_stories_spec.rb +76 -0
- data/spec/models/scope_spec.rb +76 -0
- data/spec/models/sentiment_spec.rb +56 -0
- data/spec/models/sentiments_spec.rb +56 -0
- data/spec/models/share_count_spec.rb +56 -0
- data/spec/models/share_counts_spec.rb +76 -0
- data/spec/models/source_spec.rb +96 -0
- data/spec/models/stories_spec.rb +66 -0
- data/spec/models/story_cluster_spec.rb +86 -0
- data/spec/models/story_links_spec.rb +66 -0
- data/spec/models/story_spec.rb +236 -0
- data/spec/models/summary_spec.rb +46 -0
- data/spec/models/time_series_list_spec.rb +76 -0
- data/spec/models/time_series_spec.rb +56 -0
- data/spec/models/trend_spec.rb +56 -0
- data/spec/models/trends_spec.rb +56 -0
- metadata +391 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: e0be76614a42729f87f38f3f2e1ae003141dc096
|
|
4
|
+
data.tar.gz: 5a335b88ce8a4b7aae8f99f9e6c025234c68e287
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: c3eaa2345e213ba28a09cf90f2cb7f96bf8a7a6e989bf1ac5aabb2f9cf49997c770493c88ee0cb4fc3d5e8fccaeff9f67e3703fc0c9d8fcd037404ee5f9164cd
|
|
7
|
+
data.tar.gz: d2ff1a3dcab1ca864dc17e2620a02035d16327f3122dd600038d0eab5f8a73fdead0f9d33a02216ebdca0fba7622dc8730dc3d4ae87dc66fc1aeea2dabe13540
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
aylien_news_api (0.0.1)
|
|
5
|
+
json (~> 1.4, >= 1.4.6)
|
|
6
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
|
7
|
+
|
|
8
|
+
GEM
|
|
9
|
+
remote: https://rubygems.org/
|
|
10
|
+
specs:
|
|
11
|
+
ZenTest (4.11.0)
|
|
12
|
+
addressable (2.4.0)
|
|
13
|
+
autotest (4.4.6)
|
|
14
|
+
ZenTest (>= 4.4.1)
|
|
15
|
+
autotest-fsevent (0.2.11)
|
|
16
|
+
sys-uname
|
|
17
|
+
autotest-growl (0.2.16)
|
|
18
|
+
autotest-rails-pure (4.1.2)
|
|
19
|
+
crack (0.4.3)
|
|
20
|
+
safe_yaml (~> 1.0.0)
|
|
21
|
+
diff-lcs (1.2.5)
|
|
22
|
+
ethon (0.8.1)
|
|
23
|
+
ffi (>= 1.3.0)
|
|
24
|
+
ffi (1.9.10)
|
|
25
|
+
hashdiff (0.3.0)
|
|
26
|
+
json (1.8.3)
|
|
27
|
+
rake (11.1.2)
|
|
28
|
+
rspec (3.4.0)
|
|
29
|
+
rspec-core (~> 3.4.0)
|
|
30
|
+
rspec-expectations (~> 3.4.0)
|
|
31
|
+
rspec-mocks (~> 3.4.0)
|
|
32
|
+
rspec-core (3.4.4)
|
|
33
|
+
rspec-support (~> 3.4.0)
|
|
34
|
+
rspec-expectations (3.4.0)
|
|
35
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
36
|
+
rspec-support (~> 3.4.0)
|
|
37
|
+
rspec-mocks (3.4.1)
|
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
39
|
+
rspec-support (~> 3.4.0)
|
|
40
|
+
rspec-support (3.4.1)
|
|
41
|
+
safe_yaml (1.0.4)
|
|
42
|
+
sys-uname (1.0.2)
|
|
43
|
+
ffi (>= 1.0.0)
|
|
44
|
+
typhoeus (1.0.1)
|
|
45
|
+
ethon (>= 0.8.0)
|
|
46
|
+
vcr (2.9.3)
|
|
47
|
+
webmock (1.24.3)
|
|
48
|
+
addressable (>= 2.3.6)
|
|
49
|
+
crack (>= 0.3.2)
|
|
50
|
+
hashdiff
|
|
51
|
+
|
|
52
|
+
PLATFORMS
|
|
53
|
+
ruby
|
|
54
|
+
|
|
55
|
+
DEPENDENCIES
|
|
56
|
+
autotest (~> 4.4, >= 4.4.6)
|
|
57
|
+
autotest-fsevent (~> 0.2, >= 0.2.11)
|
|
58
|
+
autotest-growl (~> 0.2, >= 0.2.16)
|
|
59
|
+
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
|
60
|
+
aylien_news_api!
|
|
61
|
+
rake (~> 11.1, >= 11.1.2)
|
|
62
|
+
rspec (~> 3.2, >= 3.2.0)
|
|
63
|
+
vcr (~> 2.9, >= 2.9.3)
|
|
64
|
+
webmock (~> 1.6, >= 1.6.2)
|
|
65
|
+
|
|
66
|
+
BUNDLED WITH
|
|
67
|
+
1.11.2
|
data/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
data/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# AYLIEN News API
|
|
2
|
+
[](https://badge.fury.io/rb/aylien_news_api)
|
|
3
|
+
|
|
4
|
+
The Ruby gem for the AYLIEN News API
|
|
5
|
+
|
|
6
|
+
AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content. If you haven't already done so, you will need to [sign up](https://newsapi.aylien.com/signup).
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
### RubyGems
|
|
11
|
+
|
|
12
|
+
Add this to the Gemfile:
|
|
13
|
+
|
|
14
|
+
gem 'aylien_news_api'
|
|
15
|
+
|
|
16
|
+
or install it directly:
|
|
17
|
+
|
|
18
|
+
gem install aylien_news_api
|
|
19
|
+
|
|
20
|
+
### Install from Git
|
|
21
|
+
|
|
22
|
+
If the Ruby gem is hosted at a git repository: https://github.com/AYLIEN/aylien_newsapi_ruby, then add the following in the Gemfile:
|
|
23
|
+
|
|
24
|
+
gem 'aylien_news_api', :git => 'https://github.com/AYLIEN/aylien_newsapi_ruby.git'
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Getting Started
|
|
28
|
+
|
|
29
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
|
30
|
+
```ruby
|
|
31
|
+
# Load the gem
|
|
32
|
+
require 'aylien_news_api'
|
|
33
|
+
|
|
34
|
+
# Setup authorization
|
|
35
|
+
AylienNewsApi.configure do |config|
|
|
36
|
+
# Configure API key authorization: app_id
|
|
37
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR APP ID'
|
|
38
|
+
|
|
39
|
+
# Configure API key authorization: app_key
|
|
40
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR APP KEY'
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
api_instance = AylienNewsApi::DefaultApi.new
|
|
44
|
+
|
|
45
|
+
opts = {
|
|
46
|
+
:title => 'trump',
|
|
47
|
+
:published_at_start => "NOW-7DAYS",
|
|
48
|
+
:published_at_end => "NOW",
|
|
49
|
+
:entities_body_links_dbpedia => [
|
|
50
|
+
'http://dbpedia.org/resource/Donald_Trump',
|
|
51
|
+
'http://dbpedia.org/resource/Hillary_Rodham_Clinton'
|
|
52
|
+
],
|
|
53
|
+
:language => ['en'],
|
|
54
|
+
:sort_by => 'social_shares_count.facebook'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
begin
|
|
59
|
+
#List stories
|
|
60
|
+
result = api_instance.list_stories(opts)
|
|
61
|
+
puts result
|
|
62
|
+
rescue AylienNewsApi::ApiError => e
|
|
63
|
+
puts "Exception when calling DefaultApi->list_stories: #{e}"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Documentation for API Endpoints
|
|
69
|
+
|
|
70
|
+
All URIs are relative to *https://api.newsapi.aylien.com/api/v1*
|
|
71
|
+
|
|
72
|
+
Class | Method | HTTP request | Description
|
|
73
|
+
------------ | ------------- | ------------- | -------------
|
|
74
|
+
*AylienNewsApi::DefaultApi* | [**list_autocompletes**](docs/DefaultApi.md#list_autocompletes) | **GET** /autocompletes | List autocompletes
|
|
75
|
+
*AylienNewsApi::DefaultApi* | [**list_coverages**](docs/DefaultApi.md#list_coverages) | **POST** /coverages | List coverages
|
|
76
|
+
*AylienNewsApi::DefaultApi* | [**list_histograms**](docs/DefaultApi.md#list_histograms) | **GET** /histograms | List histograms
|
|
77
|
+
*AylienNewsApi::DefaultApi* | [**list_related_stories**](docs/DefaultApi.md#list_related_stories) | **POST** /related_stories | List related stories
|
|
78
|
+
*AylienNewsApi::DefaultApi* | [**list_stories**](docs/DefaultApi.md#list_stories) | **GET** /stories | List Stories
|
|
79
|
+
*AylienNewsApi::DefaultApi* | [**list_time_series**](docs/DefaultApi.md#list_time_series) | **GET** /time_series | List time series
|
|
80
|
+
*AylienNewsApi::DefaultApi* | [**list_trends**](docs/DefaultApi.md#list_trends) | **GET** /trends | List trends
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## Documentation for Models
|
|
84
|
+
|
|
85
|
+
- [AylienNewsApi::Author](docs/Author.md)
|
|
86
|
+
- [AylienNewsApi::Autocomplete](docs/Autocomplete.md)
|
|
87
|
+
- [AylienNewsApi::Autocompletes](docs/Autocompletes.md)
|
|
88
|
+
- [AylienNewsApi::Category](docs/Category.md)
|
|
89
|
+
- [AylienNewsApi::CategoryLinks](docs/CategoryLinks.md)
|
|
90
|
+
- [AylienNewsApi::Coverages](docs/Coverages.md)
|
|
91
|
+
- [AylienNewsApi::Entities](docs/Entities.md)
|
|
92
|
+
- [AylienNewsApi::Entity](docs/Entity.md)
|
|
93
|
+
- [AylienNewsApi::EntityLinks](docs/EntityLinks.md)
|
|
94
|
+
- [AylienNewsApi::Error](docs/Error.md)
|
|
95
|
+
- [AylienNewsApi::ErrorLinks](docs/ErrorLinks.md)
|
|
96
|
+
- [AylienNewsApi::Errors](docs/Errors.md)
|
|
97
|
+
- [AylienNewsApi::HistogramInterval](docs/HistogramInterval.md)
|
|
98
|
+
- [AylienNewsApi::Histograms](docs/Histograms.md)
|
|
99
|
+
- [AylienNewsApi::Location](docs/Location.md)
|
|
100
|
+
- [AylienNewsApi::Media](docs/Media.md)
|
|
101
|
+
- [AylienNewsApi::RelatedStories](docs/RelatedStories.md)
|
|
102
|
+
- [AylienNewsApi::Scope](docs/Scope.md)
|
|
103
|
+
- [AylienNewsApi::Sentiment](docs/Sentiment.md)
|
|
104
|
+
- [AylienNewsApi::Sentiments](docs/Sentiments.md)
|
|
105
|
+
- [AylienNewsApi::ShareCount](docs/ShareCount.md)
|
|
106
|
+
- [AylienNewsApi::ShareCounts](docs/ShareCounts.md)
|
|
107
|
+
- [AylienNewsApi::Source](docs/Source.md)
|
|
108
|
+
- [AylienNewsApi::Stories](docs/Stories.md)
|
|
109
|
+
- [AylienNewsApi::Story](docs/Story.md)
|
|
110
|
+
- [AylienNewsApi::StoryCluster](docs/StoryCluster.md)
|
|
111
|
+
- [AylienNewsApi::StoryLinks](docs/StoryLinks.md)
|
|
112
|
+
- [AylienNewsApi::Summary](docs/Summary.md)
|
|
113
|
+
- [AylienNewsApi::TimeSeries](docs/TimeSeries.md)
|
|
114
|
+
- [AylienNewsApi::TimeSeriesList](docs/TimeSeriesList.md)
|
|
115
|
+
- [AylienNewsApi::Trend](docs/Trend.md)
|
|
116
|
+
- [AylienNewsApi::Trends](docs/Trends.md)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
## Documentation for Authorization
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
### app_key
|
|
123
|
+
|
|
124
|
+
- **Type**: API key
|
|
125
|
+
- **API key parameter name**: X-AYLIEN-NewsAPI-Application-Key
|
|
126
|
+
- **Location**: HTTP header
|
|
127
|
+
|
|
128
|
+
### app_id
|
|
129
|
+
|
|
130
|
+
- **Type**: API key
|
|
131
|
+
- **API key parameter name**: X-AYLIEN-NewsAPI-Application-ID
|
|
132
|
+
- **Location**: HTTP header
|
|
133
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
+
require "aylien_news_api/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = "aylien_news_api"
|
|
7
|
+
s.version = AylienNewsApi::VERSION
|
|
8
|
+
s.platform = Gem::Platform::RUBY
|
|
9
|
+
s.authors = ["AYLIEN Inc.", "Hamed Ramezanian Nik"]
|
|
10
|
+
s.email = ["support@aylien.com", "hamed.r.nik@gmail.com"]
|
|
11
|
+
s.homepage = "https://newsapi.aylien.com/"
|
|
12
|
+
s.summary = "AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content"
|
|
13
|
+
s.description = "AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content."
|
|
14
|
+
s.license = "Apache-2.0"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
18
|
+
s.add_runtime_dependency 'json', '~> 1.4', '>= 1.4.6'
|
|
19
|
+
|
|
20
|
+
s.add_development_dependency 'rake', '~> 11.1', '>= 11.1.2'
|
|
21
|
+
s.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
|
|
22
|
+
s.add_development_dependency 'vcr', '~> 2.9', '>= 2.9.3'
|
|
23
|
+
s.add_development_dependency 'webmock', '~> 1.6', '>= 1.6.2'
|
|
24
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
|
25
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
|
26
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
|
27
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
|
|
28
|
+
|
|
29
|
+
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|
|
30
|
+
s.test_files = `find spec/*`.split("\n")
|
|
31
|
+
s.executables = []
|
|
32
|
+
s.require_paths = ["lib"]
|
|
33
|
+
end
|
data/docs/Author.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# AylienNewsApi::Author
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**id** | **Integer** | A unique identification for the author | [optional]
|
|
7
|
+
**name** | **String** | The extracted author full name | [optional]
|
|
8
|
+
**avatar_url** | **String** | A URL which points to the author avatar | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# AylienNewsApi::Autocomplete
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**id** | **String** | ID of the autocomplete | [optional]
|
|
7
|
+
**text** | **String** | Text of the autocomplete | [optional]
|
|
8
|
+
|
|
9
|
+
|
data/docs/Category.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# AylienNewsApi::Category
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**id** | **String** | The ID of the category | [optional]
|
|
7
|
+
**taxonomy** | **String** | The taxonomy of the category | [optional]
|
|
8
|
+
**level** | **Integer** | The level of the category | [optional]
|
|
9
|
+
**score** | **Float** | The score of the category | [optional]
|
|
10
|
+
**confident** | **BOOLEAN** | It defines whether the extracted category is confident or not | [optional]
|
|
11
|
+
**links** | [**CategoryLinks**](CategoryLinks.md) | Related links for the category | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# AylienNewsApi::CategoryLinks
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**_self** | **String** | A URL points to the category | [optional]
|
|
7
|
+
**parent** | **String** | A URL points to the parent category | [optional]
|
|
8
|
+
|
|
9
|
+
|
data/docs/Coverages.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AylienNewsApi::Coverages
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**story_title** | **String** | The input story title | [optional]
|
|
7
|
+
**story_body** | **String** | The input story body | [optional]
|
|
8
|
+
**story_published_at** | **DateTime** | The input story published date | [optional]
|
|
9
|
+
**story_language** | **String** | The input story language | [optional]
|
|
10
|
+
**coverages** | [**Array<Story>**](Story.md) | An array of coverages for the input story | [optional]
|
|
11
|
+
|
|
12
|
+
|
data/docs/DefaultApi.md
ADDED
|
@@ -0,0 +1,829 @@
|
|
|
1
|
+
# AylienNewsApi::DefaultApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.newsapi.aylien.com/api/v1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**list_autocompletes**](DefaultApi.md#list_autocompletes) | **GET** /autocompletes | List autocompletes
|
|
8
|
+
[**list_coverages**](DefaultApi.md#list_coverages) | **POST** /coverages | List coverages
|
|
9
|
+
[**list_histograms**](DefaultApi.md#list_histograms) | **GET** /histograms | List histograms
|
|
10
|
+
[**list_related_stories**](DefaultApi.md#list_related_stories) | **POST** /related_stories | List related stories
|
|
11
|
+
[**list_stories**](DefaultApi.md#list_stories) | **GET** /stories | List Stories
|
|
12
|
+
[**list_time_series**](DefaultApi.md#list_time_series) | **GET** /time_series | List time series
|
|
13
|
+
[**list_trends**](DefaultApi.md#list_trends) | **GET** /trends | List trends
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# **list_autocompletes**
|
|
17
|
+
> Autocompletes list_autocompletes(type, term, opts)
|
|
18
|
+
|
|
19
|
+
List autocompletes
|
|
20
|
+
|
|
21
|
+
This endpoint is used for getting list of autocompletes by providing a specific term and type.
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
```ruby
|
|
25
|
+
# load the gem
|
|
26
|
+
require 'aylien_news_api'
|
|
27
|
+
# setup authorization
|
|
28
|
+
AylienNewsApi.configure do |config|
|
|
29
|
+
# Configure API key authorization: app_id
|
|
30
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR APP ID'
|
|
31
|
+
|
|
32
|
+
# Configure API key authorization: app_key
|
|
33
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR APP KEY'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
api_instance = AylienNewsApi::DefaultApi.new
|
|
37
|
+
|
|
38
|
+
type = "type_example" # String | This parameter is used for defining the type of autocompletes.
|
|
39
|
+
|
|
40
|
+
term = "term_example" # String | This parameter is used for finding autocomplete objects whose contains the specified value.
|
|
41
|
+
|
|
42
|
+
opts = {
|
|
43
|
+
language: "en", # String | This parameter is used for autocompletes whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
|
|
44
|
+
per_page: 3 # Integer | This parameter is used for specifying number of the items in each page.
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
begin
|
|
48
|
+
#List autocompletes
|
|
49
|
+
result = api_instance.list_autocompletes(type, term, opts)
|
|
50
|
+
p result
|
|
51
|
+
rescue AylienNewsApi::ApiError => e
|
|
52
|
+
puts "Exception when calling DefaultApi->list_autocompletes: #{e}"
|
|
53
|
+
end
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Parameters
|
|
57
|
+
|
|
58
|
+
Name | Type | Description | Notes
|
|
59
|
+
------------- | ------------- | ------------- | -------------
|
|
60
|
+
**type** | **String**| This parameter is used for defining the type of autocompletes. |
|
|
61
|
+
**term** | **String**| This parameter is used for finding autocomplete objects whose contains the specified value. |
|
|
62
|
+
**language** | **String**| This parameter is used for autocompletes whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. | [optional] [default to en]
|
|
63
|
+
**per_page** | **Integer**| This parameter is used for specifying number of the items in each page. | [optional] [default to 3]
|
|
64
|
+
|
|
65
|
+
### Return type
|
|
66
|
+
|
|
67
|
+
[**Autocompletes**](Autocompletes.md)
|
|
68
|
+
|
|
69
|
+
### Authorization
|
|
70
|
+
|
|
71
|
+
[app_key](../README.md#app_key), [app_id](../README.md#app_id)
|
|
72
|
+
|
|
73
|
+
### HTTP request headers
|
|
74
|
+
|
|
75
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
76
|
+
- **Accept**: application/json, text/xml
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# **list_coverages**
|
|
81
|
+
> Coverages list_coverages(opts)
|
|
82
|
+
|
|
83
|
+
List coverages
|
|
84
|
+
|
|
85
|
+
This endpoint is used for finding story coverages based on provided parameters. The number of coverages to return, up to a maximum of 100.
|
|
86
|
+
|
|
87
|
+
### Example
|
|
88
|
+
```ruby
|
|
89
|
+
# load the gem
|
|
90
|
+
require 'aylien_news_api'
|
|
91
|
+
# setup authorization
|
|
92
|
+
AylienNewsApi.configure do |config|
|
|
93
|
+
# Configure API key authorization: app_id
|
|
94
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR APP ID'
|
|
95
|
+
|
|
96
|
+
# Configure API key authorization: app_key
|
|
97
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR APP KEY'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
api_instance = AylienNewsApi::DefaultApi.new
|
|
101
|
+
|
|
102
|
+
opts = {
|
|
103
|
+
id: [56], # Array<Integer> | This parameter is used for finding stroies by story id.
|
|
104
|
+
title: "title_example", # String | This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
105
|
+
body: "body_example", # String | This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
106
|
+
text: "text_example", # String | This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
107
|
+
language: ["language_example"], # Array<String> | 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.
|
|
108
|
+
published_at_start: "published_at_start_example", # String | This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
109
|
+
published_at_end: "published_at_end_example", # String | This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
110
|
+
categories_taxonomy: "categories_taxonomy_example", # String | This parameter is used for defining type of the taxonomy for the rest of categories queries.
|
|
111
|
+
categories_confident: true, # BOOLEAN | This parameter is used for finding stories whose categories are confident.
|
|
112
|
+
categories_id: ["categories_id_example"], # Array<String> | This parameter is used for finding stories whose categories id is the specified value.
|
|
113
|
+
categories_level: [56], # Array<Integer> | This parameter is used for finding stories whose categories level is the specified value.
|
|
114
|
+
entities_title_text: ["entities_title_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in title is the specified value.
|
|
115
|
+
entities_title_type: ["entities_title_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in title is the specified value.
|
|
116
|
+
entities_title_links_dbpedia: ["entities_title_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
|
|
117
|
+
entities_body_text: ["entities_body_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in body is the specified value.
|
|
118
|
+
entities_body_type: ["entities_body_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in body is the specified value.
|
|
119
|
+
entities_body_links_dbpedia: ["entities_body_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
|
|
120
|
+
sentiment_title_polarity: "sentiment_title_polarity_example", # String | This parameter is used for finding stories whose title sentiment is the specified value.
|
|
121
|
+
sentiment_body_polarity: "sentiment_body_polarity_example", # String | This parameter is used for finding stories whose body sentiment is the specified value.
|
|
122
|
+
author_id: [56], # Array<Integer> | This parameter is used for finding stories whose author id is the specified value.
|
|
123
|
+
author_name: "author_name_example", # String | This parameter is used for finding stories whose author full name contains the specified value.
|
|
124
|
+
source_id: [56], # Array<Integer> | This parameter is used for finding stories whose source id is the specified value.
|
|
125
|
+
source_name: ["source_name_example"], # Array<String> | This parameter is used for finding stories whose source name contains the specified value.
|
|
126
|
+
source_domain: ["source_domain_example"], # Array<String> | This parameter is used for finding stories whose source domain is the specified value.
|
|
127
|
+
source_locations_country: ["source_locations_country_example"], # Array<String> | This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
128
|
+
source_locations_state: ["source_locations_state_example"], # Array<String> | This parameter is used for finding stories whose source state/province is the specified value.
|
|
129
|
+
source_locations_city: ["source_locations_city_example"], # Array<String> | This parameter is used for finding stories whose source city is the specified value.
|
|
130
|
+
source_scopes_country: ["source_scopes_country_example"], # Array<String> | This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
131
|
+
source_scopes_state: ["source_scopes_state_example"], # Array<String> | This parameter is used for finding stories whose source scopes state/province is the specified value.
|
|
132
|
+
source_scopes_city: ["source_scopes_city_example"], # Array<String> | This parameter is used for finding stories whose source scopes city is the specified value.
|
|
133
|
+
source_scopes_level: ["source_scopes_level_example"], # Array<String> | This parameter is used for finding stories whose source scopes level is the specified value.
|
|
134
|
+
story_id: 789, # Integer | A story id
|
|
135
|
+
story_url: "story_url_example", # String | An article or webpage
|
|
136
|
+
story_title: "story_title_example", # String | Title of the article
|
|
137
|
+
story_body: "story_body_example", # String | Body of the article
|
|
138
|
+
story_published_at: DateTime.parse("2013-10-20T19:20:30+01:00"), # DateTime | Publish date of the article. If you use url or title and body for getting coverages, this parameter is required. The format used is a restricted form of the canonical representation of dateTime in the [XML Schema specification (ISO 8601)](https://www.w3.org/TR/xmlschema-2/#dateTime).
|
|
139
|
+
story_language: "auto", # String | This parameter is used for setting language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
|
|
140
|
+
per_page: 3 # Integer | This parameter is used for specifying number of the items in each page.
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
begin
|
|
144
|
+
#List coverages
|
|
145
|
+
result = api_instance.list_coverages(opts)
|
|
146
|
+
p result
|
|
147
|
+
rescue AylienNewsApi::ApiError => e
|
|
148
|
+
puts "Exception when calling DefaultApi->list_coverages: #{e}"
|
|
149
|
+
end
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Parameters
|
|
153
|
+
|
|
154
|
+
Name | Type | Description | Notes
|
|
155
|
+
------------- | ------------- | ------------- | -------------
|
|
156
|
+
**id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stroies by story id. | [optional]
|
|
157
|
+
**title** | **String**| This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
158
|
+
**body** | **String**| This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
159
|
+
**text** | **String**| This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
160
|
+
**language** | [**Array<String>**](String.md)| 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. | [optional]
|
|
161
|
+
**published_at_start** | **String**| This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
162
|
+
**published_at_end** | **String**| This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
163
|
+
**categories_taxonomy** | **String**| This parameter is used for defining type of the taxonomy for the rest of categories queries. | [optional]
|
|
164
|
+
**categories_confident** | **BOOLEAN**| This parameter is used for finding stories whose categories are confident. | [optional] [default to true]
|
|
165
|
+
**categories_id** | [**Array<String>**](String.md)| This parameter is used for finding stories whose categories id is the specified value. | [optional]
|
|
166
|
+
**categories_level** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose categories level is the specified value. | [optional]
|
|
167
|
+
**entities_title_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in title is the specified value. | [optional]
|
|
168
|
+
**entities_title_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in title is the specified value. | [optional]
|
|
169
|
+
**entities_title_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in title is the specified value. | [optional]
|
|
170
|
+
**entities_body_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in body is the specified value. | [optional]
|
|
171
|
+
**entities_body_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in body is the specified value. | [optional]
|
|
172
|
+
**entities_body_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in body is the specified value. | [optional]
|
|
173
|
+
**sentiment_title_polarity** | **String**| This parameter is used for finding stories whose title sentiment is the specified value. | [optional]
|
|
174
|
+
**sentiment_body_polarity** | **String**| This parameter is used for finding stories whose body sentiment is the specified value. | [optional]
|
|
175
|
+
**author_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose author id is the specified value. | [optional]
|
|
176
|
+
**author_name** | **String**| This parameter is used for finding stories whose author full name contains the specified value. | [optional]
|
|
177
|
+
**source_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose source id is the specified value. | [optional]
|
|
178
|
+
**source_name** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source name contains the specified value. | [optional]
|
|
179
|
+
**source_domain** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source domain is the specified value. | [optional]
|
|
180
|
+
**source_locations_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
181
|
+
**source_locations_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source state/province is the specified value. | [optional]
|
|
182
|
+
**source_locations_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source city is the specified value. | [optional]
|
|
183
|
+
**source_scopes_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
184
|
+
**source_scopes_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes state/province is the specified value. | [optional]
|
|
185
|
+
**source_scopes_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes city is the specified value. | [optional]
|
|
186
|
+
**source_scopes_level** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes level is the specified value. | [optional]
|
|
187
|
+
**story_id** | **Integer**| A story id | [optional]
|
|
188
|
+
**story_url** | **String**| An article or webpage | [optional]
|
|
189
|
+
**story_title** | **String**| Title of the article | [optional]
|
|
190
|
+
**story_body** | **String**| Body of the article | [optional]
|
|
191
|
+
**story_published_at** | **DateTime**| Publish date of the article. If you use url or title and body for getting coverages, this parameter is required. The format used is a restricted form of the canonical representation of dateTime in the [XML Schema specification (ISO 8601)](https://www.w3.org/TR/xmlschema-2/#dateTime). | [optional]
|
|
192
|
+
**story_language** | **String**| This parameter is used for setting language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. | [optional] [default to auto]
|
|
193
|
+
**per_page** | **Integer**| This parameter is used for specifying number of the items in each page. | [optional] [default to 3]
|
|
194
|
+
|
|
195
|
+
### Return type
|
|
196
|
+
|
|
197
|
+
[**Coverages**](Coverages.md)
|
|
198
|
+
|
|
199
|
+
### Authorization
|
|
200
|
+
|
|
201
|
+
[app_key](../README.md#app_key), [app_id](../README.md#app_id)
|
|
202
|
+
|
|
203
|
+
### HTTP request headers
|
|
204
|
+
|
|
205
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
206
|
+
- **Accept**: application/json, text/xml
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
# **list_histograms**
|
|
211
|
+
> Histograms list_histograms(opts)
|
|
212
|
+
|
|
213
|
+
List histograms
|
|
214
|
+
|
|
215
|
+
This endpoint is used for getting histograms based on the field parameter is passed.
|
|
216
|
+
|
|
217
|
+
### Example
|
|
218
|
+
```ruby
|
|
219
|
+
# load the gem
|
|
220
|
+
require 'aylien_news_api'
|
|
221
|
+
# setup authorization
|
|
222
|
+
AylienNewsApi.configure do |config|
|
|
223
|
+
# Configure API key authorization: app_id
|
|
224
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR APP ID'
|
|
225
|
+
|
|
226
|
+
# Configure API key authorization: app_key
|
|
227
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR APP KEY'
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
api_instance = AylienNewsApi::DefaultApi.new
|
|
231
|
+
|
|
232
|
+
opts = {
|
|
233
|
+
id: [56], # Array<Integer> | This parameter is used for finding stroies by story id.
|
|
234
|
+
title: "title_example", # String | This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
235
|
+
body: "body_example", # String | This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
236
|
+
text: "text_example", # String | This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
237
|
+
language: ["language_example"], # Array<String> | 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.
|
|
238
|
+
published_at_start: "published_at_start_example", # String | This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
239
|
+
published_at_end: "published_at_end_example", # String | This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
240
|
+
categories_taxonomy: "categories_taxonomy_example", # String | This parameter is used for defining type of the taxonomy for the rest of categories queries.
|
|
241
|
+
categories_confident: true, # BOOLEAN | This parameter is used for finding stories whose categories are confident.
|
|
242
|
+
categories_id: ["categories_id_example"], # Array<String> | This parameter is used for finding stories whose categories id is the specified value.
|
|
243
|
+
categories_level: [56], # Array<Integer> | This parameter is used for finding stories whose categories level is the specified value.
|
|
244
|
+
entities_title_text: ["entities_title_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in title is the specified value.
|
|
245
|
+
entities_title_type: ["entities_title_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in title is the specified value.
|
|
246
|
+
entities_title_links_dbpedia: ["entities_title_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
|
|
247
|
+
entities_body_text: ["entities_body_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in body is the specified value.
|
|
248
|
+
entities_body_type: ["entities_body_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in body is the specified value.
|
|
249
|
+
entities_body_links_dbpedia: ["entities_body_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
|
|
250
|
+
sentiment_title_polarity: "sentiment_title_polarity_example", # String | This parameter is used for finding stories whose title sentiment is the specified value.
|
|
251
|
+
sentiment_body_polarity: "sentiment_body_polarity_example", # String | This parameter is used for finding stories whose body sentiment is the specified value.
|
|
252
|
+
author_id: [56], # Array<Integer> | This parameter is used for finding stories whose author id is the specified value.
|
|
253
|
+
author_name: "author_name_example", # String | This parameter is used for finding stories whose author full name contains the specified value.
|
|
254
|
+
source_id: [56], # Array<Integer> | This parameter is used for finding stories whose source id is the specified value.
|
|
255
|
+
source_name: ["source_name_example"], # Array<String> | This parameter is used for finding stories whose source name contains the specified value.
|
|
256
|
+
source_domain: ["source_domain_example"], # Array<String> | This parameter is used for finding stories whose source domain is the specified value.
|
|
257
|
+
source_locations_country: ["source_locations_country_example"], # Array<String> | This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
258
|
+
source_locations_state: ["source_locations_state_example"], # Array<String> | This parameter is used for finding stories whose source state/province is the specified value.
|
|
259
|
+
source_locations_city: ["source_locations_city_example"], # Array<String> | This parameter is used for finding stories whose source city is the specified value.
|
|
260
|
+
source_scopes_country: ["source_scopes_country_example"], # Array<String> | This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
261
|
+
source_scopes_state: ["source_scopes_state_example"], # Array<String> | This parameter is used for finding stories whose source scopes state/province is the specified value.
|
|
262
|
+
source_scopes_city: ["source_scopes_city_example"], # Array<String> | This parameter is used for finding stories whose source scopes city is the specified value.
|
|
263
|
+
source_scopes_level: ["source_scopes_level_example"], # Array<String> | This parameter is used for finding stories whose source scopes level is the specified value.
|
|
264
|
+
interval_start: 56, # Integer | This parameter is used for setting the start data point of histogram intervals.
|
|
265
|
+
interval_end: 56, # Integer | This parameter is used for setting the end data point of histogram intervals.
|
|
266
|
+
interval_width: 56, # Integer | This parameter is used for setting the width of histogram intervals.
|
|
267
|
+
field: "social_shares_count" # String | This parameter is used for specifying the y-axis variable for the histogram.
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
begin
|
|
271
|
+
#List histograms
|
|
272
|
+
result = api_instance.list_histograms(opts)
|
|
273
|
+
p result
|
|
274
|
+
rescue AylienNewsApi::ApiError => e
|
|
275
|
+
puts "Exception when calling DefaultApi->list_histograms: #{e}"
|
|
276
|
+
end
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Parameters
|
|
280
|
+
|
|
281
|
+
Name | Type | Description | Notes
|
|
282
|
+
------------- | ------------- | ------------- | -------------
|
|
283
|
+
**id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stroies by story id. | [optional]
|
|
284
|
+
**title** | **String**| This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
285
|
+
**body** | **String**| This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
286
|
+
**text** | **String**| This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
287
|
+
**language** | [**Array<String>**](String.md)| 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. | [optional]
|
|
288
|
+
**published_at_start** | **String**| This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
289
|
+
**published_at_end** | **String**| This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
290
|
+
**categories_taxonomy** | **String**| This parameter is used for defining type of the taxonomy for the rest of categories queries. | [optional]
|
|
291
|
+
**categories_confident** | **BOOLEAN**| This parameter is used for finding stories whose categories are confident. | [optional] [default to true]
|
|
292
|
+
**categories_id** | [**Array<String>**](String.md)| This parameter is used for finding stories whose categories id is the specified value. | [optional]
|
|
293
|
+
**categories_level** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose categories level is the specified value. | [optional]
|
|
294
|
+
**entities_title_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in title is the specified value. | [optional]
|
|
295
|
+
**entities_title_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in title is the specified value. | [optional]
|
|
296
|
+
**entities_title_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in title is the specified value. | [optional]
|
|
297
|
+
**entities_body_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in body is the specified value. | [optional]
|
|
298
|
+
**entities_body_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in body is the specified value. | [optional]
|
|
299
|
+
**entities_body_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in body is the specified value. | [optional]
|
|
300
|
+
**sentiment_title_polarity** | **String**| This parameter is used for finding stories whose title sentiment is the specified value. | [optional]
|
|
301
|
+
**sentiment_body_polarity** | **String**| This parameter is used for finding stories whose body sentiment is the specified value. | [optional]
|
|
302
|
+
**author_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose author id is the specified value. | [optional]
|
|
303
|
+
**author_name** | **String**| This parameter is used for finding stories whose author full name contains the specified value. | [optional]
|
|
304
|
+
**source_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose source id is the specified value. | [optional]
|
|
305
|
+
**source_name** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source name contains the specified value. | [optional]
|
|
306
|
+
**source_domain** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source domain is the specified value. | [optional]
|
|
307
|
+
**source_locations_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
308
|
+
**source_locations_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source state/province is the specified value. | [optional]
|
|
309
|
+
**source_locations_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source city is the specified value. | [optional]
|
|
310
|
+
**source_scopes_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
311
|
+
**source_scopes_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes state/province is the specified value. | [optional]
|
|
312
|
+
**source_scopes_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes city is the specified value. | [optional]
|
|
313
|
+
**source_scopes_level** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes level is the specified value. | [optional]
|
|
314
|
+
**interval_start** | **Integer**| This parameter is used for setting the start data point of histogram intervals. | [optional]
|
|
315
|
+
**interval_end** | **Integer**| This parameter is used for setting the end data point of histogram intervals. | [optional]
|
|
316
|
+
**interval_width** | **Integer**| This parameter is used for setting the width of histogram intervals. | [optional]
|
|
317
|
+
**field** | **String**| This parameter is used for specifying the y-axis variable for the histogram. | [optional] [default to social_shares_count]
|
|
318
|
+
|
|
319
|
+
### Return type
|
|
320
|
+
|
|
321
|
+
[**Histograms**](Histograms.md)
|
|
322
|
+
|
|
323
|
+
### Authorization
|
|
324
|
+
|
|
325
|
+
[app_key](../README.md#app_key), [app_id](../README.md#app_id)
|
|
326
|
+
|
|
327
|
+
### HTTP request headers
|
|
328
|
+
|
|
329
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
330
|
+
- **Accept**: application/json, text/xml
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
# **list_related_stories**
|
|
335
|
+
> RelatedStories list_related_stories(opts)
|
|
336
|
+
|
|
337
|
+
List related stories
|
|
338
|
+
|
|
339
|
+
This endpoint is used for finding related stories based on provided parameters. The number of related stories to return, up to a maximum of 100.
|
|
340
|
+
|
|
341
|
+
### Example
|
|
342
|
+
```ruby
|
|
343
|
+
# load the gem
|
|
344
|
+
require 'aylien_news_api'
|
|
345
|
+
# setup authorization
|
|
346
|
+
AylienNewsApi.configure do |config|
|
|
347
|
+
# Configure API key authorization: app_id
|
|
348
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR APP ID'
|
|
349
|
+
|
|
350
|
+
# Configure API key authorization: app_key
|
|
351
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR APP KEY'
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
api_instance = AylienNewsApi::DefaultApi.new
|
|
355
|
+
|
|
356
|
+
opts = {
|
|
357
|
+
id: [56], # Array<Integer> | This parameter is used for finding stroies by story id.
|
|
358
|
+
title: "title_example", # String | This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
359
|
+
body: "body_example", # String | This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
360
|
+
text: "text_example", # String | This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
361
|
+
language: ["language_example"], # Array<String> | 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.
|
|
362
|
+
published_at_start: "published_at_start_example", # String | This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
363
|
+
published_at_end: "published_at_end_example", # String | This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
364
|
+
categories_taxonomy: "categories_taxonomy_example", # String | This parameter is used for defining type of the taxonomy for the rest of categories queries.
|
|
365
|
+
categories_confident: true, # BOOLEAN | This parameter is used for finding stories whose categories are confident.
|
|
366
|
+
categories_id: ["categories_id_example"], # Array<String> | This parameter is used for finding stories whose categories id is the specified value.
|
|
367
|
+
categories_level: [56], # Array<Integer> | This parameter is used for finding stories whose categories level is the specified value.
|
|
368
|
+
entities_title_text: ["entities_title_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in title is the specified value.
|
|
369
|
+
entities_title_type: ["entities_title_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in title is the specified value.
|
|
370
|
+
entities_title_links_dbpedia: ["entities_title_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
|
|
371
|
+
entities_body_text: ["entities_body_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in body is the specified value.
|
|
372
|
+
entities_body_type: ["entities_body_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in body is the specified value.
|
|
373
|
+
entities_body_links_dbpedia: ["entities_body_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
|
|
374
|
+
sentiment_title_polarity: "sentiment_title_polarity_example", # String | This parameter is used for finding stories whose title sentiment is the specified value.
|
|
375
|
+
sentiment_body_polarity: "sentiment_body_polarity_example", # String | This parameter is used for finding stories whose body sentiment is the specified value.
|
|
376
|
+
author_id: [56], # Array<Integer> | This parameter is used for finding stories whose author id is the specified value.
|
|
377
|
+
author_name: "author_name_example", # String | This parameter is used for finding stories whose author full name contains the specified value.
|
|
378
|
+
source_id: [56], # Array<Integer> | This parameter is used for finding stories whose source id is the specified value.
|
|
379
|
+
source_name: ["source_name_example"], # Array<String> | This parameter is used for finding stories whose source name contains the specified value.
|
|
380
|
+
source_domain: ["source_domain_example"], # Array<String> | This parameter is used for finding stories whose source domain is the specified value.
|
|
381
|
+
source_locations_country: ["source_locations_country_example"], # Array<String> | This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
382
|
+
source_locations_state: ["source_locations_state_example"], # Array<String> | This parameter is used for finding stories whose source state/province is the specified value.
|
|
383
|
+
source_locations_city: ["source_locations_city_example"], # Array<String> | This parameter is used for finding stories whose source city is the specified value.
|
|
384
|
+
source_scopes_country: ["source_scopes_country_example"], # Array<String> | This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
385
|
+
source_scopes_state: ["source_scopes_state_example"], # Array<String> | This parameter is used for finding stories whose source scopes state/province is the specified value.
|
|
386
|
+
source_scopes_city: ["source_scopes_city_example"], # Array<String> | This parameter is used for finding stories whose source scopes city is the specified value.
|
|
387
|
+
source_scopes_level: ["source_scopes_level_example"], # Array<String> | This parameter is used for finding stories whose source scopes level is the specified value.
|
|
388
|
+
story_id: 789, # Integer | A story id
|
|
389
|
+
story_url: "story_url_example", # String | An article or webpage
|
|
390
|
+
story_title: "story_title_example", # String | Title of the article
|
|
391
|
+
story_body: "story_body_example", # String | Body of the article
|
|
392
|
+
boost_by: "boost_by_example", # String | This parameter is used for boosting result by the specified value.
|
|
393
|
+
story_language: "auto", # String | This parameter is used for setting language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
|
|
394
|
+
per_page: 3 # Integer | This parameter is used for specifying number of the items in each page.
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
begin
|
|
398
|
+
#List related stories
|
|
399
|
+
result = api_instance.list_related_stories(opts)
|
|
400
|
+
p result
|
|
401
|
+
rescue AylienNewsApi::ApiError => e
|
|
402
|
+
puts "Exception when calling DefaultApi->list_related_stories: #{e}"
|
|
403
|
+
end
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Parameters
|
|
407
|
+
|
|
408
|
+
Name | Type | Description | Notes
|
|
409
|
+
------------- | ------------- | ------------- | -------------
|
|
410
|
+
**id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stroies by story id. | [optional]
|
|
411
|
+
**title** | **String**| This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
412
|
+
**body** | **String**| This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
413
|
+
**text** | **String**| This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
414
|
+
**language** | [**Array<String>**](String.md)| 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. | [optional]
|
|
415
|
+
**published_at_start** | **String**| This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
416
|
+
**published_at_end** | **String**| This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
417
|
+
**categories_taxonomy** | **String**| This parameter is used for defining type of the taxonomy for the rest of categories queries. | [optional]
|
|
418
|
+
**categories_confident** | **BOOLEAN**| This parameter is used for finding stories whose categories are confident. | [optional] [default to true]
|
|
419
|
+
**categories_id** | [**Array<String>**](String.md)| This parameter is used for finding stories whose categories id is the specified value. | [optional]
|
|
420
|
+
**categories_level** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose categories level is the specified value. | [optional]
|
|
421
|
+
**entities_title_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in title is the specified value. | [optional]
|
|
422
|
+
**entities_title_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in title is the specified value. | [optional]
|
|
423
|
+
**entities_title_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in title is the specified value. | [optional]
|
|
424
|
+
**entities_body_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in body is the specified value. | [optional]
|
|
425
|
+
**entities_body_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in body is the specified value. | [optional]
|
|
426
|
+
**entities_body_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in body is the specified value. | [optional]
|
|
427
|
+
**sentiment_title_polarity** | **String**| This parameter is used for finding stories whose title sentiment is the specified value. | [optional]
|
|
428
|
+
**sentiment_body_polarity** | **String**| This parameter is used for finding stories whose body sentiment is the specified value. | [optional]
|
|
429
|
+
**author_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose author id is the specified value. | [optional]
|
|
430
|
+
**author_name** | **String**| This parameter is used for finding stories whose author full name contains the specified value. | [optional]
|
|
431
|
+
**source_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose source id is the specified value. | [optional]
|
|
432
|
+
**source_name** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source name contains the specified value. | [optional]
|
|
433
|
+
**source_domain** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source domain is the specified value. | [optional]
|
|
434
|
+
**source_locations_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
435
|
+
**source_locations_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source state/province is the specified value. | [optional]
|
|
436
|
+
**source_locations_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source city is the specified value. | [optional]
|
|
437
|
+
**source_scopes_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
438
|
+
**source_scopes_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes state/province is the specified value. | [optional]
|
|
439
|
+
**source_scopes_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes city is the specified value. | [optional]
|
|
440
|
+
**source_scopes_level** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes level is the specified value. | [optional]
|
|
441
|
+
**story_id** | **Integer**| A story id | [optional]
|
|
442
|
+
**story_url** | **String**| An article or webpage | [optional]
|
|
443
|
+
**story_title** | **String**| Title of the article | [optional]
|
|
444
|
+
**story_body** | **String**| Body of the article | [optional]
|
|
445
|
+
**boost_by** | **String**| This parameter is used for boosting result by the specified value. | [optional]
|
|
446
|
+
**story_language** | **String**| This parameter is used for setting language of the story. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. | [optional] [default to auto]
|
|
447
|
+
**per_page** | **Integer**| This parameter is used for specifying number of the items in each page. | [optional] [default to 3]
|
|
448
|
+
|
|
449
|
+
### Return type
|
|
450
|
+
|
|
451
|
+
[**RelatedStories**](RelatedStories.md)
|
|
452
|
+
|
|
453
|
+
### Authorization
|
|
454
|
+
|
|
455
|
+
[app_key](../README.md#app_key), [app_id](../README.md#app_id)
|
|
456
|
+
|
|
457
|
+
### HTTP request headers
|
|
458
|
+
|
|
459
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
460
|
+
- **Accept**: application/json, text/xml
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
# **list_stories**
|
|
465
|
+
> Stories list_stories(opts)
|
|
466
|
+
|
|
467
|
+
List Stories
|
|
468
|
+
|
|
469
|
+
This endpoint is used for getting list of stories.
|
|
470
|
+
|
|
471
|
+
### Example
|
|
472
|
+
```ruby
|
|
473
|
+
# load the gem
|
|
474
|
+
require 'aylien_news_api'
|
|
475
|
+
# setup authorization
|
|
476
|
+
AylienNewsApi.configure do |config|
|
|
477
|
+
# Configure API key authorization: app_id
|
|
478
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR APP ID'
|
|
479
|
+
|
|
480
|
+
# Configure API key authorization: app_key
|
|
481
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR APP KEY'
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
api_instance = AylienNewsApi::DefaultApi.new
|
|
485
|
+
|
|
486
|
+
opts = {
|
|
487
|
+
id: [56], # Array<Integer> | This parameter is used for finding stroies by story id.
|
|
488
|
+
title: "title_example", # String | This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
489
|
+
body: "body_example", # String | This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
490
|
+
text: "text_example", # String | This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
491
|
+
language: ["language_example"], # Array<String> | 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.
|
|
492
|
+
published_at_start: "published_at_start_example", # String | This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
493
|
+
published_at_end: "published_at_end_example", # String | This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
494
|
+
categories_taxonomy: "categories_taxonomy_example", # String | This parameter is used for defining type of the taxonomy for the rest of categories queries.
|
|
495
|
+
categories_confident: true, # BOOLEAN | This parameter is used for finding stories whose categories are confident.
|
|
496
|
+
categories_id: ["categories_id_example"], # Array<String> | This parameter is used for finding stories whose categories id is the specified value.
|
|
497
|
+
categories_level: [56], # Array<Integer> | This parameter is used for finding stories whose categories level is the specified value.
|
|
498
|
+
entities_title_text: ["entities_title_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in title is the specified value.
|
|
499
|
+
entities_title_type: ["entities_title_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in title is the specified value.
|
|
500
|
+
entities_title_links_dbpedia: ["entities_title_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
|
|
501
|
+
entities_body_text: ["entities_body_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in body is the specified value.
|
|
502
|
+
entities_body_type: ["entities_body_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in body is the specified value.
|
|
503
|
+
entities_body_links_dbpedia: ["entities_body_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
|
|
504
|
+
sentiment_title_polarity: "sentiment_title_polarity_example", # String | This parameter is used for finding stories whose title sentiment is the specified value.
|
|
505
|
+
sentiment_body_polarity: "sentiment_body_polarity_example", # String | This parameter is used for finding stories whose body sentiment is the specified value.
|
|
506
|
+
author_id: [56], # Array<Integer> | This parameter is used for finding stories whose author id is the specified value.
|
|
507
|
+
author_name: "author_name_example", # String | This parameter is used for finding stories whose author full name contains the specified value.
|
|
508
|
+
source_id: [56], # Array<Integer> | This parameter is used for finding stories whose source id is the specified value.
|
|
509
|
+
source_name: ["source_name_example"], # Array<String> | This parameter is used for finding stories whose source name contains the specified value.
|
|
510
|
+
source_domain: ["source_domain_example"], # Array<String> | This parameter is used for finding stories whose source domain is the specified value.
|
|
511
|
+
source_locations_country: ["source_locations_country_example"], # Array<String> | This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
512
|
+
source_locations_state: ["source_locations_state_example"], # Array<String> | This parameter is used for finding stories whose source state/province is the specified value.
|
|
513
|
+
source_locations_city: ["source_locations_city_example"], # Array<String> | This parameter is used for finding stories whose source city is the specified value.
|
|
514
|
+
source_scopes_country: ["source_scopes_country_example"], # Array<String> | This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
515
|
+
source_scopes_state: ["source_scopes_state_example"], # Array<String> | This parameter is used for finding stories whose source scopes state/province is the specified value.
|
|
516
|
+
source_scopes_city: ["source_scopes_city_example"], # Array<String> | This parameter is used for finding stories whose source scopes city is the specified value.
|
|
517
|
+
source_scopes_level: ["source_scopes_level_example"], # Array<String> | This parameter is used for finding stories whose source scopes level is the specified value.
|
|
518
|
+
cluster: false, # BOOLEAN | This parameter enables clustering for the returned stories.
|
|
519
|
+
cluster_algorithm: "lingo", # String | This parameter is used for specifying the clustering algorithm. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms.
|
|
520
|
+
_return: ["_return_example"], # Array<String> | This parameter is used for specifying return fields.
|
|
521
|
+
sort_by: "published_at", # String | This parameter is used for changing the order column of the result.
|
|
522
|
+
sort_direction: "desc", # String | This parameter is used for changing the order direction of the result.
|
|
523
|
+
cursor: "*", # String | This parameter is used for finding a specific page.
|
|
524
|
+
per_page: 10 # Integer | This parameter is used for specifying number of the items in each page.
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
begin
|
|
528
|
+
#List Stories
|
|
529
|
+
result = api_instance.list_stories(opts)
|
|
530
|
+
p result
|
|
531
|
+
rescue AylienNewsApi::ApiError => e
|
|
532
|
+
puts "Exception when calling DefaultApi->list_stories: #{e}"
|
|
533
|
+
end
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
### Parameters
|
|
537
|
+
|
|
538
|
+
Name | Type | Description | Notes
|
|
539
|
+
------------- | ------------- | ------------- | -------------
|
|
540
|
+
**id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stroies by story id. | [optional]
|
|
541
|
+
**title** | **String**| This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
542
|
+
**body** | **String**| This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
543
|
+
**text** | **String**| This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
544
|
+
**language** | [**Array<String>**](String.md)| 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. | [optional]
|
|
545
|
+
**published_at_start** | **String**| This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
546
|
+
**published_at_end** | **String**| This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
547
|
+
**categories_taxonomy** | **String**| This parameter is used for defining type of the taxonomy for the rest of categories queries. | [optional]
|
|
548
|
+
**categories_confident** | **BOOLEAN**| This parameter is used for finding stories whose categories are confident. | [optional] [default to true]
|
|
549
|
+
**categories_id** | [**Array<String>**](String.md)| This parameter is used for finding stories whose categories id is the specified value. | [optional]
|
|
550
|
+
**categories_level** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose categories level is the specified value. | [optional]
|
|
551
|
+
**entities_title_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in title is the specified value. | [optional]
|
|
552
|
+
**entities_title_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in title is the specified value. | [optional]
|
|
553
|
+
**entities_title_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in title is the specified value. | [optional]
|
|
554
|
+
**entities_body_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in body is the specified value. | [optional]
|
|
555
|
+
**entities_body_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in body is the specified value. | [optional]
|
|
556
|
+
**entities_body_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in body is the specified value. | [optional]
|
|
557
|
+
**sentiment_title_polarity** | **String**| This parameter is used for finding stories whose title sentiment is the specified value. | [optional]
|
|
558
|
+
**sentiment_body_polarity** | **String**| This parameter is used for finding stories whose body sentiment is the specified value. | [optional]
|
|
559
|
+
**author_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose author id is the specified value. | [optional]
|
|
560
|
+
**author_name** | **String**| This parameter is used for finding stories whose author full name contains the specified value. | [optional]
|
|
561
|
+
**source_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose source id is the specified value. | [optional]
|
|
562
|
+
**source_name** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source name contains the specified value. | [optional]
|
|
563
|
+
**source_domain** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source domain is the specified value. | [optional]
|
|
564
|
+
**source_locations_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
565
|
+
**source_locations_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source state/province is the specified value. | [optional]
|
|
566
|
+
**source_locations_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source city is the specified value. | [optional]
|
|
567
|
+
**source_scopes_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
568
|
+
**source_scopes_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes state/province is the specified value. | [optional]
|
|
569
|
+
**source_scopes_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes city is the specified value. | [optional]
|
|
570
|
+
**source_scopes_level** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes level is the specified value. | [optional]
|
|
571
|
+
**cluster** | **BOOLEAN**| This parameter enables clustering for the returned stories. | [optional] [default to false]
|
|
572
|
+
**cluster_algorithm** | **String**| This parameter is used for specifying the clustering algorithm. It supprts STC, Lingo and [k-means](https://en.wikipedia.org/wiki/K-means_clustering) algorithms. | [optional] [default to lingo]
|
|
573
|
+
**_return** | [**Array<String>**](String.md)| This parameter is used for specifying return fields. | [optional]
|
|
574
|
+
**sort_by** | **String**| This parameter is used for changing the order column of the result. | [optional] [default to published_at]
|
|
575
|
+
**sort_direction** | **String**| This parameter is used for changing the order direction of the result. | [optional] [default to desc]
|
|
576
|
+
**cursor** | **String**| This parameter is used for finding a specific page. | [optional] [default to *]
|
|
577
|
+
**per_page** | **Integer**| This parameter is used for specifying number of the items in each page. | [optional] [default to 10]
|
|
578
|
+
|
|
579
|
+
### Return type
|
|
580
|
+
|
|
581
|
+
[**Stories**](Stories.md)
|
|
582
|
+
|
|
583
|
+
### Authorization
|
|
584
|
+
|
|
585
|
+
[app_key](../README.md#app_key), [app_id](../README.md#app_id)
|
|
586
|
+
|
|
587
|
+
### HTTP request headers
|
|
588
|
+
|
|
589
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
590
|
+
- **Accept**: application/json, text/xml
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
# **list_time_series**
|
|
595
|
+
> TimeSeriesList list_time_series(opts)
|
|
596
|
+
|
|
597
|
+
List time series
|
|
598
|
+
|
|
599
|
+
This endpoint is used for getting time series by stories.
|
|
600
|
+
|
|
601
|
+
### Example
|
|
602
|
+
```ruby
|
|
603
|
+
# load the gem
|
|
604
|
+
require 'aylien_news_api'
|
|
605
|
+
# setup authorization
|
|
606
|
+
AylienNewsApi.configure do |config|
|
|
607
|
+
# Configure API key authorization: app_id
|
|
608
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR APP ID'
|
|
609
|
+
|
|
610
|
+
# Configure API key authorization: app_key
|
|
611
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR APP KEY'
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
api_instance = AylienNewsApi::DefaultApi.new
|
|
615
|
+
|
|
616
|
+
opts = {
|
|
617
|
+
id: [56], # Array<Integer> | This parameter is used for finding stroies by story id.
|
|
618
|
+
title: "title_example", # String | This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
619
|
+
body: "body_example", # String | This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
620
|
+
text: "text_example", # String | This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
621
|
+
language: ["language_example"], # Array<String> | 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.
|
|
622
|
+
categories_taxonomy: "categories_taxonomy_example", # String | This parameter is used for defining type of the taxonomy for the rest of categories queries.
|
|
623
|
+
categories_confident: true, # BOOLEAN | This parameter is used for finding stories whose categories are confident.
|
|
624
|
+
categories_id: ["categories_id_example"], # Array<String> | This parameter is used for finding stories whose categories id is the specified value.
|
|
625
|
+
categories_level: [56], # Array<Integer> | This parameter is used for finding stories whose categories level is the specified value.
|
|
626
|
+
entities_title_text: ["entities_title_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in title is the specified value.
|
|
627
|
+
entities_title_type: ["entities_title_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in title is the specified value.
|
|
628
|
+
entities_title_links_dbpedia: ["entities_title_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
|
|
629
|
+
entities_body_text: ["entities_body_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in body is the specified value.
|
|
630
|
+
entities_body_type: ["entities_body_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in body is the specified value.
|
|
631
|
+
entities_body_links_dbpedia: ["entities_body_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
|
|
632
|
+
sentiment_title_polarity: "sentiment_title_polarity_example", # String | This parameter is used for finding stories whose title sentiment is the specified value.
|
|
633
|
+
sentiment_body_polarity: "sentiment_body_polarity_example", # String | This parameter is used for finding stories whose body sentiment is the specified value.
|
|
634
|
+
author_id: [56], # Array<Integer> | This parameter is used for finding stories whose author id is the specified value.
|
|
635
|
+
author_name: "author_name_example", # String | This parameter is used for finding stories whose author full name contains the specified value.
|
|
636
|
+
source_id: [56], # Array<Integer> | This parameter is used for finding stories whose source id is the specified value.
|
|
637
|
+
source_name: ["source_name_example"], # Array<String> | This parameter is used for finding stories whose source name contains the specified value.
|
|
638
|
+
source_domain: ["source_domain_example"], # Array<String> | This parameter is used for finding stories whose source domain is the specified value.
|
|
639
|
+
source_locations_country: ["source_locations_country_example"], # Array<String> | This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
640
|
+
source_locations_state: ["source_locations_state_example"], # Array<String> | This parameter is used for finding stories whose source state/province is the specified value.
|
|
641
|
+
source_locations_city: ["source_locations_city_example"], # Array<String> | This parameter is used for finding stories whose source city is the specified value.
|
|
642
|
+
source_scopes_country: ["source_scopes_country_example"], # Array<String> | This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
643
|
+
source_scopes_state: ["source_scopes_state_example"], # Array<String> | This parameter is used for finding stories whose source scopes state/province is the specified value.
|
|
644
|
+
source_scopes_city: ["source_scopes_city_example"], # Array<String> | This parameter is used for finding stories whose source scopes city is the specified value.
|
|
645
|
+
source_scopes_level: ["source_scopes_level_example"], # Array<String> | This parameter is used for finding stories whose source scopes level is the specified value.
|
|
646
|
+
published_at_start: "NOW-7DAYS/DAY", # String | This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
647
|
+
published_at_end: "NOW/DAY", # String | This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
648
|
+
period: "+1DAY" # String | The size of each date range expressed as an interval to be added to the lower bound. It supports Date Math Syntax. Valid options are `+` 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).
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
begin
|
|
652
|
+
#List time series
|
|
653
|
+
result = api_instance.list_time_series(opts)
|
|
654
|
+
p result
|
|
655
|
+
rescue AylienNewsApi::ApiError => e
|
|
656
|
+
puts "Exception when calling DefaultApi->list_time_series: #{e}"
|
|
657
|
+
end
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
### Parameters
|
|
661
|
+
|
|
662
|
+
Name | Type | Description | Notes
|
|
663
|
+
------------- | ------------- | ------------- | -------------
|
|
664
|
+
**id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stroies by story id. | [optional]
|
|
665
|
+
**title** | **String**| This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
666
|
+
**body** | **String**| This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
667
|
+
**text** | **String**| This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
668
|
+
**language** | [**Array<String>**](String.md)| 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. | [optional]
|
|
669
|
+
**categories_taxonomy** | **String**| This parameter is used for defining type of the taxonomy for the rest of categories queries. | [optional]
|
|
670
|
+
**categories_confident** | **BOOLEAN**| This parameter is used for finding stories whose categories are confident. | [optional] [default to true]
|
|
671
|
+
**categories_id** | [**Array<String>**](String.md)| This parameter is used for finding stories whose categories id is the specified value. | [optional]
|
|
672
|
+
**categories_level** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose categories level is the specified value. | [optional]
|
|
673
|
+
**entities_title_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in title is the specified value. | [optional]
|
|
674
|
+
**entities_title_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in title is the specified value. | [optional]
|
|
675
|
+
**entities_title_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in title is the specified value. | [optional]
|
|
676
|
+
**entities_body_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in body is the specified value. | [optional]
|
|
677
|
+
**entities_body_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in body is the specified value. | [optional]
|
|
678
|
+
**entities_body_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in body is the specified value. | [optional]
|
|
679
|
+
**sentiment_title_polarity** | **String**| This parameter is used for finding stories whose title sentiment is the specified value. | [optional]
|
|
680
|
+
**sentiment_body_polarity** | **String**| This parameter is used for finding stories whose body sentiment is the specified value. | [optional]
|
|
681
|
+
**author_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose author id is the specified value. | [optional]
|
|
682
|
+
**author_name** | **String**| This parameter is used for finding stories whose author full name contains the specified value. | [optional]
|
|
683
|
+
**source_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose source id is the specified value. | [optional]
|
|
684
|
+
**source_name** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source name contains the specified value. | [optional]
|
|
685
|
+
**source_domain** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source domain is the specified value. | [optional]
|
|
686
|
+
**source_locations_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
687
|
+
**source_locations_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source state/province is the specified value. | [optional]
|
|
688
|
+
**source_locations_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source city is the specified value. | [optional]
|
|
689
|
+
**source_scopes_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
690
|
+
**source_scopes_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes state/province is the specified value. | [optional]
|
|
691
|
+
**source_scopes_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes city is the specified value. | [optional]
|
|
692
|
+
**source_scopes_level** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes level is the specified value. | [optional]
|
|
693
|
+
**published_at_start** | **String**| This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional] [default to NOW-7DAYS/DAY]
|
|
694
|
+
**published_at_end** | **String**| This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional] [default to NOW/DAY]
|
|
695
|
+
**period** | **String**| The size of each date range expressed as an interval to be added to the lower bound. It supports Date Math Syntax. Valid options are `+` 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). | [optional] [default to +1DAY]
|
|
696
|
+
|
|
697
|
+
### Return type
|
|
698
|
+
|
|
699
|
+
[**TimeSeriesList**](TimeSeriesList.md)
|
|
700
|
+
|
|
701
|
+
### Authorization
|
|
702
|
+
|
|
703
|
+
[app_key](../README.md#app_key), [app_id](../README.md#app_id)
|
|
704
|
+
|
|
705
|
+
### HTTP request headers
|
|
706
|
+
|
|
707
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
708
|
+
- **Accept**: application/json, text/xml
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
# **list_trends**
|
|
713
|
+
> Trends list_trends(opts)
|
|
714
|
+
|
|
715
|
+
List trends
|
|
716
|
+
|
|
717
|
+
This endpoint is used for finding news trendings based on stories resource.
|
|
718
|
+
|
|
719
|
+
### Example
|
|
720
|
+
```ruby
|
|
721
|
+
# load the gem
|
|
722
|
+
require 'aylien_news_api'
|
|
723
|
+
# setup authorization
|
|
724
|
+
AylienNewsApi.configure do |config|
|
|
725
|
+
# Configure API key authorization: app_id
|
|
726
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR APP ID'
|
|
727
|
+
|
|
728
|
+
# Configure API key authorization: app_key
|
|
729
|
+
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR APP KEY'
|
|
730
|
+
end
|
|
731
|
+
|
|
732
|
+
api_instance = AylienNewsApi::DefaultApi.new
|
|
733
|
+
|
|
734
|
+
opts = {
|
|
735
|
+
id: [56], # Array<Integer> | This parameter is used for finding stroies by story id.
|
|
736
|
+
title: "title_example", # String | This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
737
|
+
body: "body_example", # String | This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
738
|
+
text: "text_example", # String | This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators).
|
|
739
|
+
language: ["language_example"], # Array<String> | 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.
|
|
740
|
+
published_at_start: "published_at_start_example", # String | This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
741
|
+
published_at_end: "published_at_end_example", # String | This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
|
|
742
|
+
categories_taxonomy: "categories_taxonomy_example", # String | This parameter is used for defining type of the taxonomy for the rest of categories queries.
|
|
743
|
+
categories_confident: true, # BOOLEAN | This parameter is used for finding stories whose categories are confident.
|
|
744
|
+
categories_id: ["categories_id_example"], # Array<String> | This parameter is used for finding stories whose categories id is the specified value.
|
|
745
|
+
categories_level: [56], # Array<Integer> | This parameter is used for finding stories whose categories level is the specified value.
|
|
746
|
+
entities_title_text: ["entities_title_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in title is the specified value.
|
|
747
|
+
entities_title_type: ["entities_title_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in title is the specified value.
|
|
748
|
+
entities_title_links_dbpedia: ["entities_title_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in title is the specified value.
|
|
749
|
+
entities_body_text: ["entities_body_text_example"], # Array<String> | This parameter is used for finding stories whose entities text in body is the specified value.
|
|
750
|
+
entities_body_type: ["entities_body_type_example"], # Array<String> | This parameter is used for finding stories whose entities type in body is the specified value.
|
|
751
|
+
entities_body_links_dbpedia: ["entities_body_links_dbpedia_example"], # Array<String> | This parameter is used for finding stories whose entities dbpedia url in body is the specified value.
|
|
752
|
+
sentiment_title_polarity: "sentiment_title_polarity_example", # String | This parameter is used for finding stories whose title sentiment is the specified value.
|
|
753
|
+
sentiment_body_polarity: "sentiment_body_polarity_example", # String | This parameter is used for finding stories whose body sentiment is the specified value.
|
|
754
|
+
author_id: [56], # Array<Integer> | This parameter is used for finding stories whose author id is the specified value.
|
|
755
|
+
author_name: "author_name_example", # String | This parameter is used for finding stories whose author full name contains the specified value.
|
|
756
|
+
source_id: [56], # Array<Integer> | This parameter is used for finding stories whose source id is the specified value.
|
|
757
|
+
source_name: ["source_name_example"], # Array<String> | This parameter is used for finding stories whose source name contains the specified value.
|
|
758
|
+
source_domain: ["source_domain_example"], # Array<String> | This parameter is used for finding stories whose source domain is the specified value.
|
|
759
|
+
source_locations_country: ["source_locations_country_example"], # Array<String> | This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
760
|
+
source_locations_state: ["source_locations_state_example"], # Array<String> | This parameter is used for finding stories whose source state/province is the specified value.
|
|
761
|
+
source_locations_city: ["source_locations_city_example"], # Array<String> | This parameter is used for finding stories whose source city is the specified value.
|
|
762
|
+
source_scopes_country: ["source_scopes_country_example"], # Array<String> | This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
|
|
763
|
+
source_scopes_state: ["source_scopes_state_example"], # Array<String> | This parameter is used for finding stories whose source scopes state/province is the specified value.
|
|
764
|
+
source_scopes_city: ["source_scopes_city_example"], # Array<String> | This parameter is used for finding stories whose source scopes city is the specified value.
|
|
765
|
+
source_scopes_level: ["source_scopes_level_example"], # Array<String> | This parameter is used for finding stories whose source scopes level is the specified value.
|
|
766
|
+
field: "field_example" # String | This parameter is used to specify the trend field.
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
begin
|
|
770
|
+
#List trends
|
|
771
|
+
result = api_instance.list_trends(opts)
|
|
772
|
+
p result
|
|
773
|
+
rescue AylienNewsApi::ApiError => e
|
|
774
|
+
puts "Exception when calling DefaultApi->list_trends: #{e}"
|
|
775
|
+
end
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
### Parameters
|
|
779
|
+
|
|
780
|
+
Name | Type | Description | Notes
|
|
781
|
+
------------- | ------------- | ------------- | -------------
|
|
782
|
+
**id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stroies by story id. | [optional]
|
|
783
|
+
**title** | **String**| This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
784
|
+
**body** | **String**| This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
785
|
+
**text** | **String**| This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). | [optional]
|
|
786
|
+
**language** | [**Array<String>**](String.md)| 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. | [optional]
|
|
787
|
+
**published_at_start** | **String**| This parameter is used for finding stories whose published at is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
788
|
+
**published_at_end** | **String**| This parameter is used for finding stories whose published at is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). | [optional]
|
|
789
|
+
**categories_taxonomy** | **String**| This parameter is used for defining type of the taxonomy for the rest of categories queries. | [optional]
|
|
790
|
+
**categories_confident** | **BOOLEAN**| This parameter is used for finding stories whose categories are confident. | [optional] [default to true]
|
|
791
|
+
**categories_id** | [**Array<String>**](String.md)| This parameter is used for finding stories whose categories id is the specified value. | [optional]
|
|
792
|
+
**categories_level** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose categories level is the specified value. | [optional]
|
|
793
|
+
**entities_title_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in title is the specified value. | [optional]
|
|
794
|
+
**entities_title_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in title is the specified value. | [optional]
|
|
795
|
+
**entities_title_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in title is the specified value. | [optional]
|
|
796
|
+
**entities_body_text** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities text in body is the specified value. | [optional]
|
|
797
|
+
**entities_body_type** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities type in body is the specified value. | [optional]
|
|
798
|
+
**entities_body_links_dbpedia** | [**Array<String>**](String.md)| This parameter is used for finding stories whose entities dbpedia url in body is the specified value. | [optional]
|
|
799
|
+
**sentiment_title_polarity** | **String**| This parameter is used for finding stories whose title sentiment is the specified value. | [optional]
|
|
800
|
+
**sentiment_body_polarity** | **String**| This parameter is used for finding stories whose body sentiment is the specified value. | [optional]
|
|
801
|
+
**author_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose author id is the specified value. | [optional]
|
|
802
|
+
**author_name** | **String**| This parameter is used for finding stories whose author full name contains the specified value. | [optional]
|
|
803
|
+
**source_id** | [**Array<Integer>**](Integer.md)| This parameter is used for finding stories whose source id is the specified value. | [optional]
|
|
804
|
+
**source_name** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source name contains the specified value. | [optional]
|
|
805
|
+
**source_domain** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source domain is the specified value. | [optional]
|
|
806
|
+
**source_locations_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
807
|
+
**source_locations_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source state/province is the specified value. | [optional]
|
|
808
|
+
**source_locations_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source city is the specified value. | [optional]
|
|
809
|
+
**source_scopes_country** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. | [optional]
|
|
810
|
+
**source_scopes_state** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes state/province is the specified value. | [optional]
|
|
811
|
+
**source_scopes_city** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes city is the specified value. | [optional]
|
|
812
|
+
**source_scopes_level** | [**Array<String>**](String.md)| This parameter is used for finding stories whose source scopes level is the specified value. | [optional]
|
|
813
|
+
**field** | **String**| This parameter is used to specify the trend field. | [optional]
|
|
814
|
+
|
|
815
|
+
### Return type
|
|
816
|
+
|
|
817
|
+
[**Trends**](Trends.md)
|
|
818
|
+
|
|
819
|
+
### Authorization
|
|
820
|
+
|
|
821
|
+
[app_key](../README.md#app_key), [app_id](../README.md#app_id)
|
|
822
|
+
|
|
823
|
+
### HTTP request headers
|
|
824
|
+
|
|
825
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
826
|
+
- **Accept**: application/json, text/xml
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|