smartystreets-javascript-sdk
Advanced tools
Comparing version 5.1.1 to 5.1.2
@@ -18,3 +18,4 @@ const SmartySDK = require("smartystreets-javascript-sdk"); | ||
const clientBuilder = new SmartyCore.ClientBuilder(credentials).withLicenses(["international-autocomplete-v2-cloud"]) | ||
// .withBaseUrl(""); | ||
// .withBaseUrl("YOUR URL") // withBaseUrl() should be used if you are self-hosting the Smarty API | ||
const client = clientBuilder.buildInternationalAddressAutocompleteClient(); | ||
@@ -21,0 +22,0 @@ |
@@ -18,2 +18,4 @@ const SmartySDK = require("smartystreets-javascript-sdk"); | ||
let clientBuilder = new SmartyCore.ClientBuilder(credentials).withLicenses(["international-global-plus-cloud"]); | ||
// .withBaseUrl("YOUR URL") // withBaseUrl() should be used if you are self-hosting the Smarty API | ||
let client = clientBuilder.buildInternationalStreetClient(); | ||
@@ -20,0 +22,0 @@ |
@@ -18,3 +18,4 @@ const SmartySDK = require("smartystreets-javascript-sdk"); | ||
let clientBuilder = new SmartyCore.ClientBuilder(credentials).withLicenses(["us-autocomplete-pro-cloud"]); | ||
// .withBaseUrl(""); | ||
// .withBaseUrl("YOUR URL") // withBaseUrl() should be used if you are self-hosting the Smarty API | ||
let client = clientBuilder.buildUsAutocompleteProClient(); | ||
@@ -21,0 +22,0 @@ |
@@ -18,4 +18,5 @@ const SmartySDK = require("smartystreets-javascript-sdk"); | ||
let clientBuilder = new SmartyCore.ClientBuilder(credentials).withLicenses(["us-property-data-principal-cloud"]); | ||
// .withBaseUrl("YOUR URL") // withBaseUrl() should be used if you are self-hosting the Smarty API | ||
let client = clientBuilder.buildUsEnrichmentClient(); | ||
console.log(client); | ||
@@ -25,21 +26,13 @@ // Documentation for input fields can be found at: | ||
let lookup = new Lookup("7"); | ||
let lookup = new Lookup("334968275"); | ||
handleResponse(lookup).then(); | ||
function handleSuccess(response) { | ||
response.lookups.map(lookup => console.log(lookup.result)); | ||
} | ||
function handleError(response) { | ||
console.log(response); | ||
} | ||
async function handleResponse(lookup) { | ||
try { | ||
const result = await client.sendPrincipal(lookup); | ||
handleSuccess(result); | ||
} catch(err) { | ||
handleError(err); | ||
} | ||
try { | ||
const result = await client.sendPrincipal(lookup); | ||
console.log(result.response); | ||
} catch (err) { | ||
console.log(err); | ||
} | ||
} |
@@ -15,3 +15,4 @@ const SmartySDK = require("smartystreets-javascript-sdk"); | ||
let clientBuilder = new SmartyCore.ClientBuilder(credentials); | ||
// .withBaseUrl(""); | ||
// .withBaseUrl("YOUR URL") // withBaseUrl() should be used if you are self-hosting the Smarty API | ||
let client = clientBuilder.buildUsExtractClient(); | ||
@@ -18,0 +19,0 @@ |
@@ -18,3 +18,3 @@ const SmartySDK = require("smartystreets-javascript-sdk"); | ||
let clientBuilder = new SmartyCore.ClientBuilder(credentials).withLicenses(["us-reverse-geocoding-cloud"]); | ||
// .withBaseUrl(""); | ||
// .withBaseUrl("YOUR URL") // withBaseUrl() should be used if you are self-hosting the Smarty API | ||
let client = clientBuilder.buildUsReverseGeoClient(); | ||
@@ -21,0 +21,0 @@ |
@@ -17,3 +17,5 @@ const SmartySDK = require("smartystreets-javascript-sdk"); | ||
// https://www.smarty.com/docs/cloud/licensing | ||
let clientBuilder = new SmartyCore.ClientBuilder(credentials).withBaseUrl("YOUR URL").withLicenses(["us-rooftop-geocoding-cloud"]); | ||
let clientBuilder = new SmartyCore.ClientBuilder(credentials).withLicenses(["us-rooftop-geocoding-cloud"]); | ||
// .withBaseUrl("YOUR URL") // withBaseUrl() should be used if you are self-hosting the Smarty API | ||
let client = clientBuilder.buildUsStreetApiClient(); | ||
@@ -20,0 +22,0 @@ |
@@ -15,3 +15,4 @@ const SmartySDK = require("smartystreets-javascript-sdk"); | ||
let clientBuilder = new SmartyCore.ClientBuilder(credentials); | ||
// .withBaseUrl(""); | ||
// .withBaseUrl("YOUR URL") // withBaseUrl() should be used if you are self-hosting the Smarty API | ||
let client = clientBuilder.buildUsZipcodeClient(); | ||
@@ -18,0 +19,0 @@ |
{ | ||
"name": "smartystreets-javascript-sdk", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "Quick and easy Smarty address validation.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
270564
5528