Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicorobo/skyglass
An API that interacts with the Telescope service.
https://github.com/nicorobo/skyglass
Last synced: about 1 month ago
JSON representation
An API that interacts with the Telescope service.
- Host: GitHub
- URL: https://github.com/nicorobo/skyglass
- Owner: nicorobo
- Created: 2016-01-29T20:44:08.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-01T08:11:09.000Z (almost 9 years ago)
- Last Synced: 2024-11-13T10:16:13.967Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SkyGlass
An API that interacts with the [Telescope](https://github.com/nickroberts404/Telescope) web service.**Currently in testing, Telescope server isn't live yet**
### API
`getStars(options, callback)`
Returns JSON object of stars.
Options|Description|Default
--------|-------------|--------
limit|Limit the number of stars in the response.| 50
page|Define what page you want back.|1
con|Filter the stars by their constellation.|All
mag|Filter the stars by their magnitude.|All
magparam|Changes how the mag query is interpreted.|lt
search|Performs 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](https://en.wikipedia.org/wiki/88_modern_constellations))* 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], ...)`