worthbak / inventory-checker-app

A macOS app for checking Apple Store inventory
https://worthbak.github.io/inventory-checker-app/
GNU General Public License v3.0
114 stars 24 forks source link

How to find specs for latest products to update the app #110

Closed travischapman closed 11 months ago

travischapman commented 1 year ago

Hello @worthbak!

I saw #106 and thought I would go ahead and create a PR to patch the bug.

1) I spent a little time this morning trying to add support for the latest M2 Macbook Pro models, but the biggest hurdle is getting the spec information right. Given a part number (i.e. MPHE3), how are you finding the exact spec information?

2) Dynamic fetching of products via some API may make it so that the app doesn't need to be updated each time Apple releases new products—have you found anything that could be used?

worthbak commented 1 year ago

Thanks @travischapman!

  1. There's no secret to matching specs to part numbers (that I know of) - you just have to go onto apple.com/store for each supported country and sniff the network traffic, looking for calls to Apple's fulfillment API with a verifiable part number. Some product pages have a PRODUCT_SELECTION_BOOTSTRAP JSON object embedded in them (iPhones and iPads, for example), which lay out all of the different product variants, so you can write a small script to iterate over that object to pull out all of the part numbers. But more complex BTO products (like most Macs) just require some brute force. Doing this for all 14 supports countries is tedious, to say the least :) in any case, I have a fix for #106 coming in an update fairly soon.
  2. That aforementioned update will have some news on this front - stay tuned!!