Open capachow opened 4 years ago
Thought it was a duplicated request/issue, but apparently "Microsoft Store" != "Microsoft Edge Addons". The word store threw me off because of "Chrome Web Store" ðĪŠð .
Hi @capachow , thanks for the suggestion! Is there an API available to get the version number?
I am not 100% sure; couldn't find any when I checked a few days ago. I would be surprised if they didn't, but you know... Microsoft. ðĪŠ.
Happy to reopen this if an API is made available!
Hi, I found this API using by the official edge addon page, is it possible to add to shields?
https://microsoftedge.microsoft.com/addons/getproductdetailsbycrxid/eeagobfjdenkkddmbclomhiblgggliao
Currently this works for me:
https://img.shields.io/badge/dynamic/json?label=microsoft%20edge%20add-on&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Feeagobfjdenkkddmbclomhiblgggliao
@gera2ld interesting! How did you find this API endpoint? Do you know if it's documented anywhere? A quick Google search returned nothing.
@PyvesB It's not documented. I just opened the official edge add-on webstore and found this API being called for detail of an extension. A quick test with cURL worked. ð
Relying on an undocumented API is not ideal. At any point, Microsoft can rightfully change it, block requests from external sources, etc. If this would happen, the only alternatives would be to deprecate the badge or try switching to costly website scrapping, which really isn't ideal. Maybe you could contact someone from the Edge team to get clarification on this API?
Reopening so that we can track this investigation.
Yeah I'll try. BTW it seems that the Chrome Web Store API this repo relies on is also undocumented.
Actually our Chrome Web Store badges don't rely on any API, they perform website scrapping (i.e. parsing of the HTML document). We want to avoid this kind of approach, as it's significantly more CPU intensive and less maintainable. In this case we're lucky that the Chrome Web Store hasn't changed much in years and that someone wrote a module to do the parsing. However, we don't want to introduce any more of these for the aforementioned reasons, this one kind of got through when we weren't paying attention. ð
Here the situation is different given that there is a proper JSON API - which is a good start, but there is no documentation about it.
Based on @gera2ld's API, below is a short guide for add-on/extension developers who stumbled upon this issue and want a temporary badge for edge extensions.
Assuming you have the extensions uploaded to chrome, firefox, and edge with the following add-on ID and URL:
Chrome ID: mnhdpeipjhhkmlhlcljdjpgmilbmehij
Chrome URL: https://chrome.google.com/webstore/detail/arxiv-utils/mnhdpeipjhhkmlhlcljdjpgmilbmehij
Firefox ID: arxiv-utils
Firefox URL: https://addons.mozilla.org/en-US/firefox/addon/arxiv-utils/
Edge ID: ngjpcfjabahdoadnajbhnikbemhmemdg
Edge URL: https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg
// Badges for chrome
[![](https://img.shields.io/chrome-web-store/v/mnhdpeipjhhkmlhlcljdjpgmilbmehij.svg)](https://chrome.google.com/webstore/detail/arxiv-utils/mnhdpeipjhhkmlhlcljdjpgmilbmehij)
[![](https://img.shields.io/chrome-web-store/rating/mnhdpeipjhhkmlhlcljdjpgmilbmehij.svg)](https://chrome.google.com/webstore/detail/arxiv-utils/mnhdpeipjhhkmlhlcljdjpgmilbmehij)
[![](https://img.shields.io/chrome-web-store/users/mnhdpeipjhhkmlhlcljdjpgmilbmehij.svg)](https://chrome.google.com/webstore/detail/arxiv-utils/mnhdpeipjhhkmlhlcljdjpgmilbmehij)
// Badges for firefox
[![](https://img.shields.io/amo/v/arxiv-utils.svg)](https://addons.mozilla.org/en-US/firefox/addon/arxiv-utils/)
[![](https://img.shields.io/amo/rating/arxiv-utils.svg)](https://addons.mozilla.org/en-US/firefox/addon/arxiv-utils/)
[![](https://img.shields.io/amo/users/arxiv-utils.svg)](https://addons.mozilla.org/en-US/firefox/addon/arxiv-utils/)
// Temporary badges for edge
[![](https://img.shields.io/badge/dynamic/json?label=edge%20add-on&prefix=v&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fngjpcfjabahdoadnajbhnikbemhmemdg)](https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg)
[![](https://img.shields.io/badge/dynamic/json?label=rating&suffix=/5&query=%24.averageRating&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fngjpcfjabahdoadnajbhnikbemhmemdg)](https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg)
[![](https://img.shields.io/badge/dynamic/json?label=users&query=%24.activeInstallCount&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fngjpcfjabahdoadnajbhnikbemhmemdg)](https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg)
You can simply copy & replace the code above to get your add-on's badge, as shown below.
Note that the edge add-on API doesn't have the "users" entry yet.
15 Jul. 2021 Update: Edge now has the "users" entry.
I've created a request at https://microsoftedge.uservoice.com/forums/928828-developer/suggestions/42220513-provide-open-apis-to-query-web-extension-details for this API. Please upvote for it so that Microsoft can see it. ð
I've created a request at https://microsoftedge.uservoice.com/forums/928828-developer/suggestions/42220513-provide-open-apis-to-query-web-extension-details for this API. Please upvote for it so that Microsoft can see it. ð
The link provided gives me "This site is not currently active".
The Edge store has recently started showing relative user counts, similar to how CWS shows it (flooring to the nearest thousand). Funny enough, unlike the Chrome Developer Dashboard, which has the exact number updated for that week, the Edge Dashboard doesn't have a Statistics tab yet.
I just found that Edge now has active user information, and we can make a custom badge with it.
I have updated my comments above.
[![](https://img.shields.io/badge/dynamic/json?label=users&query=%24.activeInstallCount&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fngjpcfjabahdoadnajbhnikbemhmemdg)](https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg)
Interesting, turns out that the badge retrieves the specific number of users of that extension For example, if I replace the ID with the ID of my popular extension, This is, compared to the Edge listing itself:
[![](https://img.shields.io/badge/dynamic/json?label=users&query=%24.activeInstallCount&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fngjpcfjabahdoadnajbhnikbemhmemdg)](https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg)
Interesting, turns out that the badge retrieves the specific number of users of that extension For example, if I replace the ID with the ID of my popular extension, This is, compared to the Edge listing itself:
Yeah, seems like the Edge API reports the exact number of users. The Edge listing will reformat the number to a more readable format.
There is no accuracy equivalent on the Chrome Web Store side as far as I'm aware
Edge ID: ngjpcfjabahdoadnajbhnikbemhmemdg Edge URL: https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg
```lisp // Temporary badges for edge [![](https://img.shields.io/badge/dynamic/json?label=edge%20add-on&prefix=v&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fngjpcfjabahdoadnajbhnikbemhmemdg)](https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg) [![](https://img.shields.io/badge/dynamic/json?label=rating&suffix=/5&query=%24.averageRating&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fngjpcfjabahdoadnajbhnikbemhmemdg)](https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg) [![](https://img.shields.io/badge/dynamic/json?label=users&query=%24.activeInstallCount&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fngjpcfjabahdoadnajbhnikbemhmemdg)](https://microsoftedge.microsoft.com/addons/detail/arxivutils/ngjpcfjabahdoadnajbhnikbemhmemdg)
You can simply copy & replace the code above to get your add-on's badge, as shown below.
Note that the edge add-on API doesn't have the "users" entry yet.
15 Jul. 2021 Update: Edge now has the "users" entry.
How can you make the Edge Add-ons rating with stars?
Thank you @j3soon for this, it's working for me now! Can this be added to the website too or is it missing something? Really useful for those who create multi-platform extensions.
:clipboard: Extension version number (similar to the version tracking that shields provides for Chrome Web Store and Firefox Add-Ons extensions).
:link: https://microsoftedge.microsoft.com/addons/