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

feat: allow multiple microcenter locations #487

Merged
merged 4 commits into from Oct 12, 2020

Conversation

rortiz9
Copy link
Contributor

@rortiz9 rortiz9 commented Oct 10, 2020

Description

Resolves #386

In some cases (e.g. Georgia) there are more than one MicroCenter locations nearby, so we'd want to check more than one location.

Testing

Set MICROCENTER_LOCATION variable to "duluth,marietta" and STORES to "microcenter". Verified in the debug logs that links from both locations were loaded into the Store object for MicroCenter. The bot then checked for cards from MicroCenter successfully.

@rortiz9 rortiz9 requested a review from jef as a code owner October 10, 2020 05:35
Copy link
Owner

@jef jef left a comment

Choose a reason for hiding this comment

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

Overall, looks pretty good. Just a comment and question.

Thanks for doing this!

README.md Outdated Show resolved Hide resolved
const logString = `No MicroCenter location named ${microCenterLocation}, skipping.`;
logger.warn(logString);
} else {
storeId = microCenterLocationToId.get(microCenterLocation)!;
Copy link
Owner

Choose a reason for hiding this comment

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

What does the ! mean here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Non-null assertion. It was there before I moved this line, not sure if it's still needed.

Copy link
Owner

@jef jef left a comment

Choose a reason for hiding this comment

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

Not sure why type of rate limiting Microcenter has, but hopefully it doesn't have a low threshold 😅 This is quite a lot of extra links!

Thanks for doing this! :shipit:

@jef jef merged commit 2b0eab6 into jef:main Oct 12, 2020
AdamSaketume26 pushed a commit to AdamSaketume26/nvidia-snatcher that referenced this pull request Oct 16, 2020
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.

Select multiple Microcenter Locations
2 participants