Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max/custom parameters #98

Merged
merged 9 commits into from
Nov 21, 2024
Merged

Max/custom parameters #98

merged 9 commits into from
Nov 21, 2024

Conversation

maxwellpothier
Copy link
Contributor

@maxwellpothier maxwellpothier commented Nov 20, 2024

ClickUp: https://app.clickup.com/t/86b2rzrpy
To test: the examples are set up in a way to test with a single address, just plug in your secret key. I'll make sure to revert the examples this time.

@maxwellpothier maxwellpothier requested review from ducanbeu and smartyskon and removed request for ducanbeu November 20, 2024 17:14
@@ -1,4 +1,4 @@
const SmartySDK = require("smartystreets-javascript-sdk");
const SmartySDK = require("../dist/cjs/index.cjs");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right import?


await handleRequest(lookup1)
await handleRequest(lookup2)
// lookup1.addCustomParameter("input_id", 1234);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these supposed to be commented?


function displayResult(result) {
console.log(result.result[0].components);
// console.log(result);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this line?

@@ -36,14 +40,14 @@ lookup.preferStates = ["IL"];
lookup.preferRatio = 33;
lookup.source = "all";

await handleRequest(lookup, "Using Filter and Prefer");
// await handleRequest(lookup, "Using Filter and Prefer");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these supposed to be commented?

@@ -1,4 +1,4 @@
const SmartySDK = require("smartystreets-javascript-sdk");
const SmartySDK = require("../dist/cjs/index.cjs");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right import?

@@ -1,15 +1,11 @@
const SmartySDK = require("smartystreets-javascript-sdk");
const SmartySDK = require("../dist/cjs/index.cjs");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right import?


// for client-side requests (browser/mobile), use this code:
let key = process.env.SMARTY_EMBEDDED_KEY;
const credentials = new SmartyCore.SharedCredentials(key);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we supposed to remove these lines?

@@ -1,4 +1,4 @@
const SmartySDK = require("smartystreets-javascript-sdk");
const SmartySDK = require("../dist/cjs/index.cjs");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right import?

@@ -8,7 +8,7 @@ const Lookup = SmartySDK.usZipcode.Lookup;
// const credentials = new SmartyCore.StaticCredentials(authId, authToken);

// for client-side requests (browser/mobile), use this code:
let key = process.env.SMARTY_EMBEDDED_KEY;
let key = "your key";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we aren't using the env file now?

@maxwellpothier maxwellpothier merged commit 0a21675 into master Nov 21, 2024
3 checks passed
@maxwellpothier maxwellpothier deleted the max/custom-parameters branch November 21, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants