GithubHelp home page GithubHelp logo

storedev / storelib Goto Github PK

View Code? Open in Web Editor NEW
132.0 8.0 46.0 6.84 MB

Storelib is a DotNet library that provides APIs to interact with the various Microsoft Store endpoints.

License: Mozilla Public License 2.0

C# 100.00%

storelib's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

storelib's Issues

Does not work for xbox.com links

As mentioned in the title, the search does not return results for links that have xbox.com (still works on microsoft.com links).
Many new packages are only available at the xbox.com link. I don't know if this is fixable or not, just noting this here.

Generating authentication tokens

What's the best way of generating authentication tokens to query DCAT? I have tried using OpenXbox.XboxWebApi with no luck (I could just be passing the wrong token/format)

Currently, I use a token helper dll that uses windows to generate a new token but that only works on machines with windows 10+ and its not cross-platform.
https://github.com/MCMrARM/mc-w10-version-launcher/tree/master/WUTokenHelper

My code using the token from that dll is below

await dcathandler.QueryDCATAsync("9NBLGGH2JHXJ", IdentiferType.ProductID, "Bearer WLID1.0=" + Convert.FromBase64String(token));
packages = await dcathandler.GetPackagesForProductAsync($"<User>{token}</User>");

[API] Use explicit search endpoint instead of autosuggest

Autosuggest only returns maximum of 10 entries.
The actual search endpoint returns everything it can find.

Currently search endpoint is defined here:

public static readonly Uri DisplayCatalogSearch = new Uri("https://displaycatalog.mp.microsoft.com/v7.0/productFamilies/autosuggest?market=US&languages=en-US&query=");
public static readonly Uri DisplayCatalogSearchInt = new Uri("https://displaycatalog-int.mp.microsoft.com/v7.0/productFamilies/autosuggest?market=US&languages=en-US&query=");

The search endpoint is:

/// productFamily: "Games" or "Apps" ... maybe comma separated is possible too?
var DisplayCatalogSearch = $"https://displaycatalog.mp.microsoft.com/v7.0/productFamilies/{productFamily}/products?query={searchQuery}&market=US&languages=en-US&fieldsTemplate=details&platformdependencyname=windows.xbox";

Old endpoint could be renamed to DisplayCatalogAutosuggest or something along those lines.

Any suggestions?

The order is all wrong,The file name and link all do not match(文件名和链接全部不对应)

Use Nuget Package,Through Debug WriteLine (download. PackageMoniker);

Debug WriteLine (download. PackageUri);

Taking Microsoft's "Media Player" as an example, it was found that the actual file and description names downloaded from the download link were inconsistent and all were incorrect. Downloading the application package resulted in a framework package, while downloading the framework package resulted in an application package.

Code, both initialization methods have been tried:
使用nuget包,顺序都是错的
通过Debug.WriteLine(download.PackageMoniker);
Debug.WriteLine(download.PackageUri);
以微软“媒体播放器”为例,发现下载链接下载的实际文件和描述名称不一致,全部都是错的,下载应用包得到的是框架包,下载框架包得到应用包。
代码,两种初始化方式都试过了:
DisplayCatalogHandler dcathandler = new DisplayCatalogHandler(DCatEndpoint.Production, new Locale(Market.US, Lang.en, true)); IList<PackageInstance> r; await dcathandler.QueryDCATAsync(productId); r=await dcathandler.GetPackagesForProductAsync(); List<packlink> ret = new List<packlink>(); foreach (var download in r) { ret.Add(new packlink(download.PackageMoniker + ".Appx", download.PackageUri.ToString())); Debug.WriteLine(download.PackageMoniker); Debug.WriteLine(download.PackageUri); }

Could we borrow anything from the "winget" command?

Good Day,

Plenty of apps available on MS Store seemed to contain Product IDs that would begin with XP but unfortunately neither https://xwebstore.herokuapp.com nor https://store.rg-adguard.net could support them at the moment, a handful of examples are listed below:

Title Product ID
KoordASIO Universal Driver XP9CSS6NZBDV21
Discord XPDC2RH70K22MN
WinZip 26 XPDNXDPXBRSVXT
Adobe Acrobat Reader DC XPDP273C0XHQH2
Microsoft Edge Browser XPFFTQ037JWMHS

Then I checked the following page linked below and found that Discord could be installed via Windows Package Manager CLI / the winget command:

https://github.com/Yetenol/Setup-Computer#communication

Title Install command
Discord winget install -e XPDC2RH70K22MN --accept-package-agreements

Just wondering if there were any useful codes that could be borrowed from 'winget' by any chance?

For instance, we could take a quick look at their codes and find the string Url easily, here's one of them:

https://github.com/microsoft/winget-cli/blob/master/src/AppInstallerCommonCore/Manifest/ManifestYamlPopulator.cpp

Of course that might not be very helpful at all, that's why I hope that maybe someone else already figured out how to grab a copy of anything that's starting with XP.

About http/2 in fe3.delivery.mp.microsoft.com

hello! This is a very amazing project. Appreciate it.

I tried to catch the Microsoft store app install request with Fiddler, BurpSuite...to many tools.

But I always got errors about fe3cr.delivery.mp.microsoft.com, it's a http/2 connection, I tried to set system proxy to get the request. But however, if I try to catch it, it always failed, it only succeed when I remove the proxy.

So I want to know how do you resolve this problem? could you help me.
Thanks.

Open in this format?

How do I summon a package with this? It's not working with
'DisplayCatalogHandler dcathandler = new DisplayCatalogHandler(DCatEndpoint.Production, new Locale(Market.US, Lang.en, true));
'
-a, --authtoken Auth-token header value (e.g. "XBL3.0=123;xyz")

-m, --market (Default: US) Market (e.g. US)

-l, --lang (Default: en) Language (e.g. EN)

-e, --env (Default: Production) Environment (e.g. Production)

-t, --idtype (Default: ProductID) IdentifierType

-f, --devicefamily (Default: Desktop) Device Family (used for search)

--help Display this help screen.

--version Display version information.

command (pos. 0) Required. Command to execute
Available commands: packages, query, search, convert

id (pos. 1) Required. Id or Search-query

Can I download old packages?

Like WindowsCalculator_1.0.0.0.AppX or whatever it could be called.

Also it's AppX/EAppX not Appx, appx or eappx.

public class ProductDetails : Payload appears to be an incorrect mapping for RevisionId

Changing the following in ProductDetails corrects JSON conversion exceptions when getting data back from the store:

        // MP! was:
        //public DateTimeOffset RevisionId { get; set; }
        // MP! changed: To resolve JSON conversion exception.
        //             Type mapping was probably incorrect.
        public string RevisionId { get; set; }

RevisionId does not sound like a DateTimeOffset value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.