Fill out partNumbers json file with complete data for the x model

This commit is contained in:
Carlos E Silva
2017-11-10 00:15:52 -05:00
parent be97fbe7ce
commit a7e7ac23eb
2 changed files with 39 additions and 16 deletions

View File

@ -19,7 +19,8 @@ const optionDefinitions = [
const options = commandLineArgs(optionDefinitions);
// Get part number for the specified device.
const partNumber = partNumbers[options.model][options.color][options.storage];
const partNumber =
partNumbers[options.model][options.carrier.toUpperCase()][options.color][options.storage];
// Construct the endpoint url with the options selected.
const endpoint = `https://www.apple.com/shop/retail/pickup-message?pl=true&cppart=${options.carrier}/US&parts.0=${partNumber}&location=${options.zip}`;