1.1.2 • Published 8 years ago

skyglass v1.1.2

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

SkyGlass

An API that interacts with the Telescope web service.

Currently in testing, Telescope server isn't live yet

API

getStars(options, callback)

Returns JSON object of stars.

OptionsDescriptionDefault
limitLimit the number of stars in the response.50
pageDefine what page you want back.1
conFilter the stars by their constellation.All
magFilter the stars by their magnitude.All
magparamChanges how the mag query is interpreted.lt
searchPerforms a text search.none

Example:

skyglass.getStars({
	limit: 20,
	page: 2,
	con: 'Ori',
	mag: 3,
	magparam: gt,
})

This will return stars 21-40 that are in Orion with a magnitude of 3 or greater.


getConstellations(callback)

Invokes callback with data for all constellations.


getConstellation(con, callback)

This method accepts a constellation's abbreviation as an argument (good list here) and invokes the callback with its data.

Example: skyglass.getConstellation('Ori')

This will return JSON for the constellation of Orion.


addConnection(con, [starid1, starid2], callback)

This method accepts a constellation's abbreviation, an array of 2 star's ids, and a callback.

It will add a connection between these two stars to the constellation.

Example: skyglass.addConnections('Tau', [1234, 4321], ...)


removeConnection(con, [starid1, starid2], callback)

This method accepts a constellation's abbreviation, an array of 2 star's ids, and a callback.

It will remove a connection between these two stars to the constellation.

Example: skyglass.removeConnections('And', [1234, 4321], ...)

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago