Skip to content

Instantly share code, notes, and snippets.

@mbklein
Created March 25, 2010 23:34
Show Gist options
  • Save mbklein/344272 to your computer and use it in GitHub Desktop.
Save mbklein/344272 to your computer and use it in GitHub Desktop.
require 'httparty'
require 'open-uri'
class Oasis
include HTTParty
base_uri 'availability.library.oregonstate.edu'
headers 'accept' => 'application/json'
class << self
def availability(*ids)
get '/availability', :query => { :id => ids.flatten }
end
end
end
response = Oasis.availability('b2537059','b2548930')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment