Skip to content

Geokit custom geocoder for SmartyStreets address verification service

License

Notifications You must be signed in to change notification settings

srozum/smarty_streets_geocoder

Repository files navigation

Gem Version Build Status

SmartyStreetsGeocoder

Custom geokit geocoder for SmartyStreets address verification service.

This geocoder works for US addressed only.

API Documentation

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

  1. Fork it ( https://github.com/[my-github-username]/smarty_streets_geocoder/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Geokit custom geocoder for SmartyStreets address verification service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages