Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
@jasonbelmonti/news-api-cli
Advanced tools
Readme
A nodejs-powered command-line interface for News API.
sources
:arrow_right: /sources
everything
:arrow_right: /everything
top-headlines
:arrow_right: /top-headlines
computer-1:repositories user$ cd news-api-cli
computer-1:news-api-cli user$ npm install
news.js
executablecomputer-1:news-api-cli user$ chmod +x news.js
Get a key here.
Add a file called .env
in the project root containing your News API key.
// contents of news-api-cli/.env
NEWS_API_KEY=YOUR-KEY-HERE
sources [options]
-l, --language [language] Only return articles written in this language
-v, --verbose If enabled, show description, url, category, language, country
-c, --category [category] Only return articles relevant to this category
-w, --write [path] Save the result to [path] (utf-8 encoding)
-h, --help output usage information
sources.json
:./news.js sources -l en -w sources.json
sources/business.json
:./news.js sources -c business -w sources/business.json
./news.js sources -v
everything [options] [query]
-f, --from [from] Articles published after date This should be in ISO 8601 format (e.g. 2018-07-07 or 2018-07-07T01:07:36)
-t, --to [to] Articles published before date. This should be in ISO 8601 format (e.g. 2018-07-07 or 2018-07-07T01:07:36)
-s, --sources <sources> A list of comma-separated news source ids
-p, --pages <pages> Number of pages to fetch
-z, --page-size <pageSize> Number of results per page (max 100)
-v, --verbose If enabled, show url
-l, --language [language] Only return articles written in this language
-o, --order [order] order by "relevancy", "popularity", or "publishedAt"
-w, --write [path] Save the result to [path]
-h, --help output usage information
nyt.json
:./news.js everything gun control -s the-new-york-times -f 2018-05-01 -t 2018-06-01 -p 4 -z 100 -w nyt.json
topHeadlines [options] [query]
-u, --country [country] Only return articles relevant to this country
-c, --category [category] Only return articles relevant to this category
-s, --sources <sources> A list of comma-separated news source ids
-p, --pages <pages> Number of pages to fetch
-z, --page-size <pageSize> Number of results per page (max 100)
-v, --verbose If enabled, show url
-w, --write [path] Save the result to [path]
-h, --help output usage information
./news.js topHeadlines -u us
./news.js topHeadlines Apple -u ch -c business
FAQs
command line interface to News API (https://newsapi.org/)
The npm package @jasonbelmonti/news-api-cli receives a total of 0 weekly downloads. As such, @jasonbelmonti/news-api-cli popularity was classified as not popular.
We found that @jasonbelmonti/news-api-cli 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.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.