Created
October 2, 2009 04:07
-
-
Save cduruk/199454 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'httparty' | |
require 'crack' | |
class Wherein | |
include HTTParty | |
base_uri 'http://wherein.yahooapis.com' | |
def initialize(apikey) | |
self.class.default_params({:appid => apikey}) | |
end | |
def post(text) | |
self.class.post('/v1/document', :body => {:documentContent => text, :documentType => 'text/plain', :outputType => 'xml'}) | |
end | |
end | |
puts Wherein.new('RgQciF3V34F8ZY7oiMZsbt6AP49KryxhhKexmcLdzoILr7LoRoOgQ2vFGSpkW7nRqR8').post('Pittsburgh') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment