Skip to content

Instantly share code, notes, and snippets.

@aboisvert
Created June 8, 2010 14:12
Show Gist options
  • Save aboisvert/430071 to your computer and use it in GitHub Desktop.
Save aboisvert/430071 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'oauth'
require 'oauth/consumer'
require 'json'
key = 'xxxxxxxx'
secret = 'yyyyyyyy'
consumer = OAuth::Consumer.new(key, secret, {
:site => "http://api.bizographics.com",
:scheme => :query_string,
:http_method => :get
})
title = "Senior VP of Marketing"
path = URI.escape("/v1/classify.json?api_key=#{key}&title=#{title}")
response = consumer.request(:get, path)
# Display response
p JSON.parse(response.body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment