Open NorskNoobing opened 1 week ago
Hi. Happy to look at a PR for this the information is available via the API.
We don't take new badges that rely on scraping. Keeping them working is too high-maintenance. From https://github.com/badges/shields/blob/master/CONTRIBUTING.md#badge-guidelines
Badges should not obtain data by scraping web pages - these are likely to break frequently. Whereas API publishers are incentivised to maintain a stable platform for their users, authors of web pages have no such incentive.
📋 Description
This badge would dynamically get the "Total downloads of packages", which is displayed on a PSGallery profile. I'd want it to look something like this static badge mockup, together with a link to the profile when you press the badge:
You can see the total downloads value on any PSGallery profile, but here's a link to mine for reference: https://www.powershellgallery.com/profiles/NorskNoobing
🔗 Data
There's already another badge called
PowerShell Gallery Downloads
, but it seems to be limited to only a single package, and therefore can't fetch the downloads of all your packages combined. It seems to be using the following API: https://www.powershellgallery.com/api/v2Alternatively you could also scrape the profile website i.e. my profile on the following XPaths:
or
🎤 Motivation
I'd want this to display the total downloads across all my PSGallery modules/packages on my GitHub profile README.