Skip to content

Instantly share code, notes, and snippets.

@kenmazaika
Created May 26, 2015 17:59
Show Gist options
  • Save kenmazaika/ebe610d6269ce758c57d to your computer and use it in GitHub Desktop.
Save kenmazaika/ebe610d6269ce758c57d to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'httparty'
resp = HTTParty.get("http://www.catfact.info/api/v1/facts.json", :query => {:page=>2, :per_page=>3})
puts resp.inspect
puts resp.code
puts "-----"
resp['facts'].each do |f|
puts f['details']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment