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: Combined NuGet downloads for all of a user's packages #6387

Open
WhiteBlackGoose opened this issue Apr 15, 2021 · 3 comments
Open
Labels
service-badge New or updated service badge

Comments

@WhiteBlackGoose
Copy link

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

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

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

@WhiteBlackGoose WhiteBlackGoose added the service-badge New or updated service badge label Apr 15, 2021
@calebcartwright
Copy link
Member

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

paulmelnikow commented Jul 9, 2021

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

@paulmelnikow paulmelnikow changed the title The number of NuGet downloads for a user Badge request: Combined NuGet downloads for all of a user's packages Jul 9, 2021
@WhiteBlackGoose
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

3 participants