Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated address model to use httparty and google_maps_api.rb
- Loading branch information
Jonathan Hoyt
authored and
Jonathan Hoyt
committed
Mar 24, 2009
1 parent
f61a414
commit 79f9ccc
Showing
2 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'httparty' | ||
|
||
class GoogleMapsAPI | ||
include HTTParty | ||
base_uri "maps.google.com" | ||
default_params :key => "ABQIAAAApuX_5BYbKnzmBE3HKXu8yBTJQa0g3IQ9GZqIMmInSLzwtGDKaBT9NkNo6YIUV4Fa6Ff5q37qmXVoMg", | ||
:output => "json" | ||
|
||
def self.address_lookup(address) | ||
get('/maps/geo', :query => {:q => address}) | ||
end | ||
|
||
end |