Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def self.geocode(zip)
- response = get("/MapsService/V1/geocode", :query => {:zip => zip})
- if response['ResultSet']['Result'][0] || response['ResultSet']['Result']['Country'] != 'US'
- return nil
- else
- return [ response['ResultSet']['Result']['City'], response['ResultSet']['Result']['State'] ]
- end
- end
Add Comment
Please, Sign In to add comment