markthethomas / find-iphone-7 Goto Github PK
View Code? Open in Web Editor NEWSimple CLI to find iphone 7's available in your area and alert you when they are
License: MIT License
Simple CLI to find iphone 7's available in your area and alert you when they are
License: MIT License
Zip codes which start with a "0" (zero) are incorrectly parsed and the leading zero is dropped from the result. E.g. 01234 becomes 1234 which is no longer a valid zip code.
I was also getting errors that I was missing an iphone7.yaml file until I stubbed one out even though I was not using the notify flag.
Cool script though! Nice job
~> find-iphone-7 --zip 07030 --model plus --color black --capacity 128 --carrier att
argv: { _: [],
zip: 7030,
model: 'plus',
color: 'black',
capacity: 128,
carrier: 'att',
'$0': '/usr/local/bin/find-iphone-7' }
⠹ Searching for iphones...
availability payload: { overlayInitiatedFromWarmStart: false,
viewMoreHoursLinkText: 'View more hours',
little: true,
errorMessage: 'Invalid Zip Code or City/State.',
location: '7030' }
TypeError: Cannot read property 'filter' of undefined
at axios.get.then (/usr/local/lib/node_modules/find-iphone-7/index.js:111:47)
at process._tickCallback (internal/process/next_tick.js:103:7)
⠧ Searching for iphones...⏎
~> find-iphone-7 --zip '07030' --model plus --color black --capacity 128 --carrier att
argv: { _: [],
zip: 7030,
model: 'plus',
color: 'black',
capacity: 128,
carrier: 'att',
'$0': '/usr/local/bin/find-iphone-7' }
⠙ Searching for iphones...
availability payload: { overlayInitiatedFromWarmStart: false,
viewMoreHoursLinkText: 'View more hours',
little: true,
errorMessage: 'Invalid Zip Code or City/State.',
location: '7030' }
TypeError: Cannot read property 'filter' of undefined
at axios.get.then (/usr/local/lib/node_modules/find-iphone-7/index.js:111:47)
at process._tickCallback (internal/process/next_tick.js:103:7)
⠦ Searching for iphones...^C⏎
~>
Above you can see two trials where I'm logging out the argv
variable and the api response. Only difference between the two trials is the second wraps the zip arg in single quotes. Both incorrectly parse the zip code and the error returned from the API refers to the incorrect zip code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.