Skip to content

Instantly share code, notes, and snippets.

@timhodson
Created December 7, 2011 16:22
Show Gist options
  • Save timhodson/1443433 to your computer and use it in GitHub Desktop.
Save timhodson/1443433 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'kasabi'
require 'json'
#change to your API key
APIKEY = "YOUR_API_KEY"
dataset = Kasabi::Dataset.new("http://kasabi.com/dataset/nasa", :apikey => APIKEY )
#Search for "Apollo", limiting to 5 results
results = dataset.search_api_client.search("apollo", { :max => 5 })
#Dump the JSON response to the console
puts JSON.pretty_generate(results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment