Skip to content

SpaceAppsPR/asterank-ruby-client

Repository files navigation

Gem Version

asterank-ruby

A module for using the Asterank APIs. Sponsored by Space Apps PR.

The Asterank, MPC and Kepler APIs accepts queries that adhere to mongo's json format for a 'find' operation. This gem leverages mongoid's origin gem to construct these queries.

Asterank API | MPC API | Kepler API | Skymorph API.

Install

Via rubygems.org:

gem install asterank-ruby

Getting Started

Setup Work

require 'asterank-ruby'

# set up a client to talk to the Asterank APIs
@client = Asterank::Client.new 

Asterank API

results = @client.asterank.lt(e: 0.1, i: 4, a: 4).limit(10).execute

MPC API

results = @client.mpc.lt(e: 0.1, i: 4, a: 4).limit(10).execute

Kepler API

results = @client.kepler.lt(TPLANET:320).gt(TPLANET:290).limit(10).execute

Skymorph API

target = "J99TS7A"
query = @client.skymorph.search(target)

result = query["results"].first
# Write Image to Disk
key = result["key"]
@client.skymorph.image(key, "filename.jpg", false) # fast image false

File.open('filename.jpg')
$ #<File:filename.jpg>

More Information

This gem borrows heavily from the twilio-ruby gem in documentation and code design.

About

Ruby client for the Asterank APIs https://github.com/typpo/asterank

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published

Languages