mas-cli / mas

:package: Mac App Store command line interface
MIT License
10.94k stars 275 forks source link

iTunes Search API issues #561

Closed rgoldberg closed 1 month ago

rgoldberg commented 1 month ago

mas Install Method

Describe the Bug

There are numerous problems with the integration with the iTunes Search API.

  1. Add & use Entity.desktopSoftware instead of macSoftware. Former returns info (including version & description) that aligns with what is displayed in the App Store, while latter is at least sometimes out of alignment. Latter also seems to return any software that can run on a Mac (e.g., iOS, iPadOS, etc. software for Apple Silicon), seeming to default to iOS info. Probably better to get versions for each platform separately so we know what's for what platform.
  2. Update iTunes Search API documentation URL to https://performance-partners.apple.com/search-api.
  3. Add media=software query item to lookup URL to improve results.
  4. Refactor StoreSearch.lookup(…) & StoreSearch.search(…) to share implementation, which deduplicates code & allows lookup to accept an Entity argument to get an app version for a specific platform instead of being hardcoded to desktopSoftware. Will help allow flags in the future to specify what platforms to check for apps.
  5. Misc cleanup