1.0.1 • Published 9 months ago

messier-api v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

messier-api

by Osric Dienda

Messier catalog API that provides data and images for all 110 Messier objects. To download for Node.js, run:

$ npm install messier-api

 

After installing the package, import the library using require or import.

const messier = require('messier-api');

 

To access data on the Messier objects, access messier.data or use messier.getMessier().

console.log(messier.data.M45.name);
console.log(messier.getMessier(45).name);

 

Messier object attributes:

AttributeDescriptionCode Example
messierNumberThe Messier number of the object.messier.data.M45.messierNumber
nameThe common name of the Messier object. If none exists, NGC number or description is used instead.messier.data.M45.name
alternateNamesAn array of the object's alternate names. Most have no alternate names (empty array).messier.data.M45.alternateNames
NGCThe New General Catalog (NGC) or Index Catalog (IC) of the Messier object. Some objects have none (undefined).messier.data.M45.NGC
typeClassifies objects into 12 different types: Diffuse Nebula, Double Star, Elliptical Galaxy, Globular Cluster, Group/Asterism, Irregular Galaxy, Lenticular (S0) Galaxy, Open Cluster, Planetary Nebula, Spiral Galaxy, Star Cloud, Supernova Remnant.messier.data.M45.type
constellationThe name of the constellation the Messier object is in.messier.data.M45.constellation
rightAscensionThe right ascension of the Messier object. (hh:mm:ss.ss)messier.data.M45.rightAscension
declinationThe declination of the Messier object. (±dd:mm:ss.ss)messier.data.M45.declination
magnitudeThe apparent magnitude of the Messier object.messier.data.M45.magnitude
sizeThe apparent dimensions of the Messier object in arcminutes (W' x H'). If elliptical, only the angular diameter is given (D').messier.data.M45.size
distanceThe distance of the Messier object from Earth in light-years.messier.data.M45.distance
viewingSeasonThe best season to view the Messier object from the Northern Hemisphere.messier.data.M45.viewingSeason
viewingDifficultyHow hard it is to view the Messier object, classified as either: Very Easy, Easy, Moderate, Hard, Very Hard.messier.data.M45.viewingDifficulty
1.0.1

9 months ago

1.0.0

9 months ago