SmartyStreetsGeocoder
Custom geokit geocoder for SmartyStreets address verification service.
This geocoder works for US addressed only.
Installation
Add this line to your application's Gemfile:
gem 'smarty_streets_geocoder'
And then execute:
$ bundle
Or install it yourself as:
$ gem install smarty_streets_geocoder
Configuration
# This is your SmartyStreets application key for the SmartyStreets Geocoder.
# See https://smartystreets.com/docs/authentication#keypairs
Geokit::Geocoders::SmartyStreetsGeocoder.auth_id = 'REPLACE_WITH_YOUR_KEY'
Geokit::Geocoders::SmartyStreetsGeocoder.auth_token = 'REPLACE_WITH_YOUR_CODE'
Usage
Because US Zipcode API requires zip and/or city and state it's better to pass an instance of GeoLoc rather than address string.
# use :smarty_streets to specify this geocoder in your list of geocoders.
Geokit::Geocoders::SmartyStreetsGeocoder.geocode( Geokit::GeoLoc.new(city: "Sunnyvale", state: "CA", country_code: "US") )
Contributing
- Fork it ( https://github.com/[my-github-username]/smarty_streets_geocoder/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request