HaxeFoundation / haxelib

The Haxe library manager
https://lib.haxe.org/
MIT License
173 stars 78 forks source link

shields.io badges #308

Open Gama11 opened 8 years ago

Gama11 commented 8 years ago

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:

Some also have daily / weekly downloads.

nadako commented 8 years ago

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.

ibilon commented 8 years ago

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.

nadako commented 8 years ago

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 commented 8 years ago

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

vladimyr commented 4 years ago

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? 😉