haxelib icon indicating copy to clipboard operation
haxelib copied to clipboard

shields.io badges

Open Gama11 opened this issue 9 years ago • 5 comments

It would be nice if shields.io badges were available for haxelib - this is the case for a lot of other package managers like npm, NuGet, gem, etc..

There's usually a few different stats available:

  • current version npm
  • downloads/month npm
  • downloads/total npm

Some also have daily / weekly downloads.

Gama11 avatar Mar 29 '16 23:03 Gama11

I like this idea, considering hipster invasion in the today's internets! However, IIUC to do that, we need to implement a REST API for haxelib (and then use it in https://github.com/badges/shields/blob/master/server.js). Maybe we could somehow autogenerate REST handlers from our SiteApi though.

nadako avatar Mar 29 '16 23:03 nadako

It'd probably be a lot quicker/easier to make the REST API manually.

If we need only the current version, and total/per version download (that's all we have) it's only a couple of lines.

ibilon avatar Mar 30 '16 08:03 ibilon

I agree. Though that again raises the question of API design, since it'll be public, we may look into what NPM and others provide.

nadako avatar Mar 30 '16 08:03 nadako

OTOH, we could just quickly implement a v1 routes in the website just for mentioned things and think of "proper" API later (if ever) :)

nadako avatar Mar 30 '16 08:03 nadako

OTOH, we could just quickly implement a v1 routes in the website just for mentioned things and think of "proper" API later (if ever) :)

Or someone could transpile haxe.remoting.HttpAsyncConnection into js and use it to make generic RPC client for nodejs → https://npm.im/haxe-rpc-client

Then it could be used to fetch relevant data from haxelib registry https://github.com/badgen/badgen.net/pull/381

image

Yeah, I know that badgen.net isn't really shields.io but it is probably better than nothing, right? 😉

vladimyr avatar May 06 '20 11:05 vladimyr