Skip to content

Instantly share code, notes, and snippets.

@benfulton
Created June 7, 2012 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benfulton/2886300 to your computer and use it in GitHub Desktop.
Save benfulton/2886300 to your computer and use it in GitHub Desktop.
Connecting to RavenHQ in Ruby
require 'httparty'
response = HTTParty.get('https://1.ravenhq.com/docs')
response = HTTParty.get(response.headers['oauth-source'], :headers => { "Api-Key" => ApiKey })
auth = "Bearer " + response.body
response = HTTParty.get('https://1.ravenhq.com/databases/benfulton-SourcedTriples/docs/?start=0&pageSize=10', :headers => { "Authorization" => auth })
puts response.body, response.code, response.message, response.headers.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment