1.4.0 • Published 3 years ago
spaceflightnewsapi-node v1.4.0
Spaceflight News API NodeJS Package
The Spaceflight News API NodeJS package is an easy way to consume the content from the Spaceflight News API.
Installation
Use npm or yarn to install the package:
npm i spaceflightnewsapi-node
or
yarn add spaceflightnewsapi-node
Usage
const { latestNews, latestBlogs, latestReports } = require('spaceflightnewsapi-node')
latestNews(); // returns a Promise that resolves to the latest news
latestBlogs(); // returns a Promise that resolves to the latest blogs
latestReports(); // returns a Promise that resolves to the latest reports
All functions accept an object with query params as key/value pairs:
const { latestNews } = require('spaceflightnewsapi-node')
latestNews({ _limit: 5 }); // returns latest news
A list of all query parameters can be fount in the Spaceflight News API docs.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.