🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

apod-nasa

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apod-nasa

Astronomy Picture of the Day!

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
9
80%
Maintainers
1
Weekly downloads
 
Created
Source

Install

$ npm install --save apod-nasa

Usage

  • For current date
const apod = require('apod-nasa');

apod().then(data => {
  console.log(data);
	/*
	  {
	    title: 'The Summer Triangle over the Great Wall',
	    image: 'https://apod.nasa.gov/apod/image/1707/GreatWallMilkyWay_Yu_1686.jpg'
	  }
	*/
});
  • For specific date
apod.date('951010').then(data => {
	console.log(data);
	/*
	{
		day: 'October 10, 1995',
		title: 'Dione\'s Lagrange Moon Helene',
		image: 'https://apod.nasa.gov/apod/image/helene_vg2.gif'
	}
	*/
});

Date

In apod.date() the following format is only supported format -

  • yy/mm/dd

Example :

  • For 16th of March, 1998 : 980316
  • For 1st January, 2000 : 000101

NOTE :

APOD-NASA started to post pictures since June 16, 1995 , so the least date will be 950616 and max will be the current date

API

  • apod()

  • apod.date('date')

date Type : string

Format : yy/mm/dd

  • apod : Astronomy Picture of the Day form command line done right!

License

MIT © Rishi Giri

Keywords

api

FAQs

Package last updated on 11 Feb 2019

Did you know?

Socket

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.

Install

Related posts