Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Badge request: Microsoft Edge Addons #4690

Open
capachow opened this issue Feb 26, 2020 · 20 comments
Open

Badge request: Microsoft Edge Addons #4690

capachow opened this issue Feb 26, 2020 · 20 comments
Labels
needs-upstream-help Not actionable without help from a service provider service-badge New or updated service badge

Comments

@capachow
Copy link

📋 Extension version number (similar to the version tracking that shields provides for Chrome Web Store and Firefox Add-Ons extensions).

🔗 https://microsoftedge.microsoft.com/addons/

@capachow capachow added the service-badge New or updated service badge label Feb 26, 2020
@capachow capachow reopened this Feb 26, 2020
@capachow
Copy link
Author

capachow commented Feb 26, 2020

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
Copy link
Member

PyvesB commented Feb 26, 2020

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

@capachow
Copy link
Author

capachow commented Mar 3, 2020

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 paulmelnikow added the needs-upstream-help Not actionable without help from a service provider label Apr 5, 2020
@paulmelnikow
Copy link
Member

Happy to reopen this if an API is made available!

@paulmelnikow paulmelnikow changed the title Microsoft Edge Addons Badge request: Microsoft Edge Addons Apr 5, 2020
@gera2ld
Copy link

gera2ld commented Apr 26, 2020

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
Copy link
Member

PyvesB commented Apr 26, 2020

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

@gera2ld
Copy link

gera2ld commented Apr 26, 2020

@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
Copy link
Member

PyvesB commented Apr 26, 2020

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.

@PyvesB PyvesB reopened this Apr 26, 2020
@gera2ld
Copy link

gera2ld commented Apr 28, 2020

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

const chromeWebStore = require('chrome-web-store-item-property')

@PyvesB
Copy link
Member

PyvesB commented Apr 28, 2020

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
Copy link

j3soon commented Jun 22, 2020

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
Copy link

gera2ld commented Jan 29, 2021

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
Copy link

sigv commented Feb 21, 2021

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
Copy link

avi12 commented Jul 15, 2021

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
Copy link

j3soon commented Jul 15, 2021

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
Copy link

avi12 commented Jul 15, 2021

[![](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
Copy link

j3soon commented Jul 15, 2021

[![](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
Copy link

avi12 commented Jul 15, 2021

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

@JohnyP36
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-upstream-help Not actionable without help from a service provider service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

9 participants