Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joonhocho/smartystreets-js
JS client for SmartyStreets API. Address autocomplete and verification.
https://github.com/joonhocho/smartystreets-js
Last synced: about 2 months ago
JSON representation
JS client for SmartyStreets API. Address autocomplete and verification.
- Host: GitHub
- URL: https://github.com/joonhocho/smartystreets-js
- Owner: joonhocho
- License: mit
- Created: 2017-05-05T22:36:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-06T17:13:18.000Z (over 7 years ago)
- Last Synced: 2024-10-30T10:44:57.471Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# smartystreets-js
[](https://travis-ci.org/joonhocho/smartystreets-js)
[](https://coveralls.io/github/joonhocho/smartystreets-js?branch=master)
[](https://badge.fury.io/js/smartystreets-js)
[](https://david-dm.org/joonhocho/smartystreets-js)
[](http://doge.mit-license.org)JS client for SmartyStreets API. Address autocomplete and verification.
### Install
```
npm install --save smartystreets-js
```### Usage
```javascript
import smartystreets from 'smartystreets-js';const {
usStreetSingle,
usAutocomplete,
internationalStreetSingle,
} = smartystreets({
authId: process.env.SMARTYSTREET_AUTH_ID,
authToken: process.env.SMARTYSTREET_AUTH_TOKEN,
});usStreetSingle({
street: '3301 South Greenfield Rd',
city: 'Gilbert',
state: 'AZ',
zipcode: '85297',
}).then((res) => {
console.log(res);
});usAutocomplete({
prefix: '1600 amphitheatre pkwy',
}).then((res) => {
console.log(res);
});internationalStreetSingle({
country: 'Japan',
address1: 'きみ野 6-1-8',
locality: '大和市',
administrative_area: '神奈川県',
postal_code: '242-0001',
}).then((res) => {
console.log(res);
});
```