0.0
No commit activity in last 3 years
No release in over 3 years
Ruby Client to connect to Asterank APIs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.0
~> 2.0.1
~> 3.12

Runtime

~> 0.13.0
~> 2.1.0
 Project Readme

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.