StoreDev / StoreLib

Storelib is a DotNet library that provides APIs to interact with the various Microsoft Store endpoints.
Mozilla Public License 2.0
152 stars 50 forks source link

Allow MSA token to be changed when fetching packages #12

Closed rtm516 closed 2 years ago

rtm516 commented 3 years ago

This allows you to pass a token in to fetch betas of apps like Minecraft.

I also load in the ApplicabilityBlob and UpdateId for later checking of if the file. (I generated the classes using https://json2csharp.com/ so may not be perfect)

Also fixed a bug with packages getting mapped incorrectly in 6371b78 And ARM support

Example:

DisplayCatalogHandler dcathandler = DisplayCatalogHandler.ProductionConfig();
await dcathandler.QueryDCATAsync("9nblggh2jhxj", IdentiferType.ProductID, "Bearer WLID1.0=REDACTED");
foreach (PackageInstance package in await dcathandler.GetPackagesForProductAsync("<User>REDACTED</User>"))
{
    Console.WriteLine("{0}\t{1}\t{2}", package.PackageMoniker, package.PackageType, package.PackageUri);
}
TitleOS commented 2 years ago

Awesome work! Everything seems to work on my end. I'll go ahead and merge it. Thank you for your contribution.