aws-news-api-client
AWS News API Client with retry behavior
Install
$ yarn add @vladholubiev/aws-news-api-client
Usage
const {
fetchPageOfNews,
getTotalPagesCount,
getYearsWithData,
} = require('@vladholubiev/aws-news-api-client');
await fetchPageOfNews({year: 2023, pageNumber: 1, pageSize: 100});
await getTotalPagesCount({year: 2023, pageSize: 100});
getYearsWithData();
fetchPageOfNews
has retry logic, so it will retry a request for up to 5 times.
Note: API doesn't return more than 100th page. In 2022 there were 2103 news. So if your page size is 100, you will get 21 pages.
Don't select page size < 22, otherwise you'll not get all the news.
Publish
$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags
License
MIT