Code Monkey home page Code Monkey logo

apod-nasa's Introduction

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

Related

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

License

MIT © Rishi Giri

apod-nasa's People

Contributors

codedotjs avatar multarix avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.