Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
AylienNewsApi - the Ruby gem for the AYLIEN News API
The AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content. It is accessed by sending HTTP requests to our server, which returns information to your client.
This SDK is automatically generated by the OpenAPI Generator project:
To build the Ruby code into a gem:
gem build aylien_news_api.gemspec
Then either install the gem locally:
gem install ./aylien_news_api-5.2.3.gem
(for development, run gem install --dev ./aylien_news_api-5.2.3.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'aylien_news_api', '~> 5.2.3'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'aylien_news_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'aylien_news_api'
# Setup authorization
AylienNewsApi.configure do |config|
# Configure API key authorization: app_id
config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-AYLIEN-NewsAPI-Application-ID'] = 'Bearer'
# Configure API key authorization: app_key
config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-AYLIEN-NewsAPI-Application-Key'] = 'Bearer'
end
api_instance = AylienNewsApi::DefaultApi.new
unknown_base_type = {"$and":[{"$or":[{"body":{"$text":"Tim Cook"}},{"social.shares.count.reddit.max":{"$gte":5000,"$boost":5}}]},{"entity":{"$and":[{"name":{"$text":"Apple","$boost":2}},{"$not":[{"type":{"$eq":"Fruit"}}]}]}}]} # UNKNOWN_BASE_TYPE | /stories body schema to perform an advanced search with logical operators and nested objects.
opts = {
published_at_start: 'published_at_start_example', # String | This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
published_at_end: 'published_at_end_example', # String | This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates).
_return: ['_return_example'], # Array<String> | This parameter is used for specifying return fields.
sort_by: 'published_at', # String | This parameter is used for changing the order column of the results. You can read about sorting results [here](https://newsapi.aylien.com/docs/sorting-results).
sort_direction: 'desc', # String | This parameter is used for changing the order direction of the result. You can read about sorting results [here](https://newsapi.aylien.com/docs/sorting-results).
cursor: '*', # String | This parameter is used for finding a specific page. You can read more about pagination of results [here](https://newsapi.aylien.com/docs/pagination-of-results).
per_page: 10 # Integer | This parameter is used for specifying number of items in each page You can read more about pagination of results [here](https://newsapi.aylien.com/docs/pagination-of-results)
}
begin
#List Stories
result = api_instance.advanced_list_stories(unknown_base_type, opts)
p result
rescue AylienNewsApi::ApiError => e
puts "Exception when calling DefaultApi->advanced_list_stories: #{e}"
end
All URIs are relative to https://api.aylien.com/news
Class | Method | HTTP request | Description |
---|---|---|---|
AylienNewsApi::DefaultApi | advanced_list_stories | POST /stories | List Stories |
AylienNewsApi::DefaultApi | list_autocompletes | GET /autocompletes | List autocompletes |
AylienNewsApi::DefaultApi | list_clusters | GET /clusters | List Clusters |
AylienNewsApi::DefaultApi | list_histograms | GET /histograms | List histograms |
AylienNewsApi::DefaultApi | list_related_stories_get | GET /related_stories | |
AylienNewsApi::DefaultApi | list_related_stories_post | POST /related_stories | |
AylienNewsApi::DefaultApi | list_stories | GET /stories | List Stories |
AylienNewsApi::DefaultApi | list_time_series | GET /time_series | List time series |
AylienNewsApi::DefaultApi | list_trends | GET /trends | List trends |
FAQs
Unknown package
We found that aylien_news_api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.