NuGetGallery icon indicating copy to clipboard operation
NuGetGallery copied to clipboard

Badges API

Open yishaigalatzer opened this issue 9 years ago • 10 comments

ported from: https://github.com/NuGet/Home/issues/2113

Currently using GitHub badges for my projects: https://github.com/bchavez/RethinkDb.Driver

The service I'm using to render badges is http://shields.io/. The problem is shields.io constantly offline or inaccessible. I've had so many problems getting NuGet metadata for the project.

screen603

Would be nice if NuGet provided an API to render badges directly:

  • Total Downloads.
  • Download Count of current version.
  • Last published date.

Thanks, Brian

CC @bchavez

yishaigalatzer avatar Feb 16 '16 20:02 yishaigalatzer

Thank you. For comparison, here's what it looks like when the badges actually work:

screen608

bchavez avatar Feb 16 '16 20:02 bchavez

@yishaigalatzer is there a designer we can talk to to create the badges?

maartenba avatar Feb 17 '16 07:02 maartenba

Should the NuGetGallery use the NuGet V3 itself to expose such badges? I have a similar (but simpler idea) to provide a simple Atom/RSS feed for packages - back in the old days (2 years ago or so) I tried it by accessing the database via EF, but I was told I shouldn't do it this way and wait for a more stable api, which doesn't hammer the database.

robertmuehsig avatar Apr 07 '16 08:04 robertmuehsig

For the badges, the gallery can make use of the search service (much like what the package details page does to check if the package was indexed or not)

maartenba avatar Apr 07 '16 14:04 maartenba

Is this still relevant? If so, please reopen.

skofman1 avatar Feb 04 '17 01:02 skofman1

@skofman1 Yes, it's still relevant. I would reopen but I don't have that option here.

bchavez avatar Feb 04 '17 01:02 bchavez

@bchavez , can you please provide more details? Is http://shields.io/ continues to be offline frequently?

skofman1 avatar Feb 04 '17 04:02 skofman1

@skofman1 , http://shields.io uptime has improved since we made this issue. However, shields.io has reduced the number of NuGet badges that it supports. I do not know the reasoning behind the reduced NuGet support.

Originally, we could obtain the download total :1234: badge (seen here), but the download total badge is not available from http://shields.io anymore. Now, we've only got the NuGet package :package: :label: version number.

:cry:

bchavez avatar Feb 04 '17 05:02 bchavez

May I suggest to use BuildStats.info for the NuGet badge? It's already widely used for many .NET projects hosted on GitHub (e.g. see the NUnit, Serilog, Microsoft BotBuilder, etc.).

The documentation is found in the project's README.

Let me know what you think, but if you're ok to add a small section somewhere on the DisplayPackage.cshtml page with the badge and a HTML and Markdown snippet then I'd be happy to send a PR with that change!

dustinmoris avatar Oct 28 '18 09:10 dustinmoris

BuildStats.info has been shut down now 😞

Looks like shields.io now supports both versions and downloads for NuGet packages.

martincostello avatar Sep 04 '24 17:09 martincostello