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

NuGet badges for multiple packages #204

Closed
adamralph opened this issue Jun 26, 2014 · 8 comments
Closed

NuGet badges for multiple packages #204

adamralph opened this issue Jun 26, 2014 · 8 comments
Labels
service-badge New or updated service badge

Comments

@adamralph
Copy link

Some projects/repos, e.g. https://github.com/scriptcs/scriptcs, produce a number of NuGet packages, e.g. https://www.nuget.org/profiles/scriptcs/.

It would be nice to be have NuGet badges which took all packages into account, certainly for download count.

Version would also work if the versions of all the packages are the same. If they differ, perhaps the badge could display the latest version, a version range, or just '4 packages'.

I think the name of each package would have to be specified in the URL, e.g. http://img.shields.io/nuget/multi/dt/shields.svg?ScriptCs.Contracts&ScriptCs.Core&ScriptCs.Engine.Roslyn&ScriptCs.Hosting

Specifying the packages using a filter is difficult since the only options are search, author and tags. The only one under definitive control of the publisher is author, but even that will only be narrowly useful since most projects don't create an author specifically for their package publishing. Even if they did, it would be fairly common that they would publish packages from many repos which means the badge wouldn't be useful for puttting on a repo specific readme. Still, that could also provided as an option, e.g. http://img.shields.io/nuget/profile/dt/scriptcs.svg.

I guess another badge could give package count, e.g. http://img.shields.io/nuget/multi/pc/shields.svg?ScriptCs.Contracts&ScriptCs.Core&ScriptCs.Engine.Roslyn&ScriptCs.Hosting and http://img.shields.io/nuget/profile/pc/scriptcs.svg.

@espadrine
Copy link
Member

It seems hard to integrate well with the rest of the REST design, but I'll think about it.

@paulmelnikow paulmelnikow added the service-badge New or updated service badge label Apr 18, 2017
@jnm2
Copy link

jnm2 commented Jan 3, 2018

I've had several uses for this.

@paulmelnikow
Copy link
Member

Hi, could you provide links?

@Giorgi
Copy link

Giorgi commented Dec 6, 2018

Can we have an option to show the nuget package in the badge ? This way we could at least add different badges and it would be easy to identify which one is which

@paulmelnikow
Copy link
Member

Yup, you can do that with the query string! e.g.

https://img.shields.io/nuget/dt/Microsoft.AspNet.Mvc.svg?label=aspnet.mvc%20downloads

@paulmelnikow paulmelnikow mentioned this issue Jan 4, 2019
10 tasks
@paulmelnikow
Copy link
Member

I think we are not going to provide this because it requires too much bandwidth and time for a single badge render. However we're working on an endpoint badge #2473 which will make it easy to write your own Runkit endpoint to perform the logic, and then the badge can point to that.

@paulmelnikow
Copy link
Member

Shields is now offing a workaround: the Endpoint badge. You can use it with tools like RunKit and Jupyter Kernel Gateway to implement the exact badge content and logic you want, while letting Shields take care of formatting, rendering, and caching.

If you decide to use the new feature, your feedback is much appreciated! Please feel free to comment on the Endpoint beta issue if you have feedback or questions about how to use it.

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

5 participants