npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-nasa-pic-of-day

v1.0.0

Published

A Node module to get NASA's APOD

Downloads

2

Readme

NASA Astronomy Picture of the Day

============

License GitHub Stars GitHub Issues Current Version

A module to get NASA's APOD information

Installation


npm install node-nasa-pic-of-day --save

API

getAllData(callback);

Returns a JSON that contains all the data.


Usage


'use strict'
const APOD = require('node-nasa-pic-of-day');

const apod = new APOD({
  key: 'your NASA API key goes here',
  date: '2016-02-25' //default: today. use YYYY-MM-DD format.
});

apod.getAllData(function(body) {
  console.log(body);
});

Response Format

A successful response will be similar to the following:

{ copyright: 'Jeff Dai',
  date: '2016-02-25',
  explanation: 'Fans of planet Earth probably recognize its highest mountain, the Himalayan Mount Everest, on the left in this 3-panel skyscape of The World at Night. Shrouded in cloud Everest\'s peak is at 8,848 meters (29,029 feet) elevation above sea level. In the middle panel, stars trail above volcanic Mauna Kea forming part of the island of Hawaii. Festooned with astronomical observatories, its summit lies a mere 4,168 meters above sea level. Still, measured from its base starting below the ocean\'s surface, Mauna Kea is over 10,000 meters tall, making it Earth\'s tallest mountain from base to summit. At right, beneath the arc of the Milky Way is the Andean mountain Chimborazo in Ecuador. The highest equatorial mountain, the Chimborazo volcano\'s peak elevation is 6,268 meters above sea level. But rotating planet Earth is a flattened sphere (oblate spheroid) in shape, its equatorial diameter greater than its diameter measured pole to pole. Sitting nearly on top of Earth\'s greatest equatorial bulge, Chimborazo\'s peak is the farthest point on the planet\'s surface from the center, over 2,000 meters farther from the center of the Earth than Everest\'s peak. That makes Chimborazo\'s summit the place on Earth\'s surface closest to the stars.',
  hdurl: 'http://apod.nasa.gov/apod/image/1602/Everest-MaunaKea-Chimborazo-1800x600-cp8.jpg',
  media_type: 'image',
  service_version: 'v1',
  title: 'Highest, Tallest, and Closest to the Stars',
  url: 'http://apod.nasa.gov/apod/image/1602/Everest-MaunaKea-Chimborazo-1800x600-cp8.jpg' }