Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
thoughtpunch committed Jan 11, 2012
1 parent b1b9128 commit c296d98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Pass any properly formatted IPv4 address string to a new instance of Geolocater

`Geolocater.ip_lookup(IP_ADDRESS_STRING)`

and get back a JSON Hash of the results

`=> {"city"=>"CITY", "region_code"=>"ST", "region_name"=>"Long Region Name", "metrocode"=>"999", "zipcode"=>"98765", "longitude"=>"-92.23", "country_name"=>"United States", "country_code"=>"US", "ip"=>"IP_ADDRESS", "latitude"=>"27.54"}`

### Details
* This library uses the free (and very good) [freegeoip.net](http://freegeoip.net) REST API.
* Results are returned in JSON format. For friendlier Ruby object-like results (and better nil handling), pipe the result hash into a new [Hashie::Mash](https://github.com/intridea/hashie) like so:
Expand Down

0 comments on commit c296d98

Please sign in to comment.