Skip to content

A lightweight .NET Framework library for interacting with the Microsoft Store.

License

Notifications You must be signed in to change notification settings

Aetopia/StoreEdge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StoreEdge

A lightweight .NET Framework library for interacting with the Microsoft Store.

Usage

Task<ReadOnlyCollection<Product>> GetProductsAsync(params string[] productIds)
  • Obtains products for the specified product IDs.
Task<ReadOnlyCollection<string>> GetPackageFamilyNamesAsync(params string[] packageFamilyNames)
  • Obtains product IDs for the specified package family names.
Task<string> GetUrlAsync(UpdateIdentity update)
  • Obtains the download URL for the specified update identity.
Task<ReadOnlyCollection<UpdateIdentity>> GetUpdatesAsync(Product product)
  • Gets updates for the specified product.

Example

using System;
using System.Threading.Tasks;
using StoreEdge;

static class Program
{
    static async Task Main()
    {
        // Get product IDs from package family names.
        var productIds = await Store.GetPackageFamilyNamesAsync(
            "Microsoft.MinecraftUWP_8wekyb3d8bbwe",
            "Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe");

        // Get product information from product IDs.
        var products = await Store.GetProductsAsync([.. productIds]);

        foreach (var product in products)
        {
            // Verify if a product supports an installed operating system's architecture.
            var supported = product.Architecture is not null;

            Console.WriteLine($"Title: {product.Title}");
            Console.WriteLine($"Supported: {supported}\n");

            // Get packages/updates for a product.
            foreach (var update in await Store.GetUpdatesAsync(product))
            {
                // Get a url for a package/update.
                var url = await Store.GetUrlAsync(update);

                Console.WriteLine($"\tUpdate Hash Code: {update.GetHashCode()}");
                Console.WriteLine($"\tUrl: {url}\n");
            }
        }
    }
}

Building

  1. Download the following:

  2. Run dotnet publish to compile & make a NuGet package.

About

A lightweight .NET Framework library for interacting with the Microsoft Store.

Resources

License

Stars

Watchers

Forks

Languages