badges / shields

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

Badge request: Combined NuGet downloads for all of a user's packages #6387

Open WhiteBlackGoose opened 3 years ago

WhiteBlackGoose commented 3 years ago

:clipboard: This badge would show the total number of downloads of NuGet packages published by the specified user

:link: if there's no API for this one, it's possible to just add all downloads of all packages of a user

:microphone: Motivation... so that authors could put this badge on their profile (username/username repo in case of Github)

calebcartwright commented 3 years ago

Hi thanks for reaching out.

If this is something you'd like to see it would be great if you could do some of the legwork to figure out some more of the specifics asked as part of the issue template, particularly as it relates to retrieving the data, what if any sort of options may exist between different nuget providers like nuget.org, myget, or even the GitHub package registry.

The more information made available the more likely someone will consider implementation.

Please also note that there's a very narrow window in which the entire badge request/response flow has to complete in order for the badges to actually render. This limit (the strictest of which is enforced by GitHub for badges in files like READMEs) can often prevent badges where our servers have to make multiple, particularly progressive/sequential, API calls to fetch the data need to build out the badges.

paulmelnikow commented 3 years ago

Something similar was requested at #204 and our suggested workaround was to use the Endpoint badge.

For npm, @FezVrasta created a similar endpoint using RunKit.

These requests were both for a specific list of packages, though something similar could be done to aggregate all packages for a user.

Added: Also related: #5417

WhiteBlackGoose commented 3 years ago

Done via endpoint by @paulmelnikow 's advice here. Example:

https://img.shields.io/badge/dynamic/json?url=https%3A//morebadges.tk/%3fbadge=nugetdownloads%26user%3ddsyme&query=Short&label=Nuget+downloads&color=purple&style=flat-square&logo=nuget

Shows the number of downloads of all packages in total which are owned by Don Syme.