badges / shields

Concise, consistent, and legible badges in SVG and raster format
https://shields.io
Creative Commons Zero v1.0 Universal
23.6k stars 5.5k forks source link

Badge request: Microsoft Edge Addons #4690

Open capachow opened 4 years ago

capachow commented 4 years ago

: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/

capachow commented 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" ðŸĪŠðŸ˜….

PyvesB commented 4 years ago

Hi @capachow , thanks for the suggestion! Is there an API available to get the version number?

capachow commented 4 years ago

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. ðŸĪŠ.

paulmelnikow commented 4 years ago

Happy to reopen this if an API is made available!

gera2ld commented 4 years ago

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

PyvesB commented 4 years ago

@gera2ld interesting! How did you find this API endpoint? Do you know if it's documented anywhere? A quick Google search returned nothing.

gera2ld commented 4 years ago

@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. 😄

PyvesB commented 4 years ago

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.

gera2ld commented 4 years ago

Yeah I'll try. BTW it seems that the Chrome Web Store API this repo relies on is also undocumented.

https://github.com/badges/shields/blob/f9d5f57f496538ade8117b520adbe27bec404f59/services/chrome-web-store/chrome-web-store-base.js#L3

PyvesB commented 4 years ago

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.

j3soon commented 4 years ago

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.

gera2ld commented 3 years ago

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. 👀

sigv commented 3 years ago

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".

avi12 commented 3 years ago

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.

j3soon commented 3 years ago

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.

avi12 commented 3 years ago
[![](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: image

j3soon commented 3 years ago
[![](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: image

Yeah, seems like the Edge API reports the exact number of users. The Edge listing will reformat the number to a more readable format.

avi12 commented 3 years ago

There is no accuracy equivalent on the Chrome Web Store side as far as I'm aware

JohnyP36 commented 3 years ago

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?

PedroS11 commented 2 years ago

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.