-
Notifications
You must be signed in to change notification settings - Fork 26
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
Provide an endpoint to create shields.io badges #122
base: main
Are you sure you want to change the base?
Conversation
This is great! Should we maybe provide data for all sub-crates and all the data, not just the message? |
I've opened a PR at badges/shields#7219 for an implementation on their side. |
Hey thanks for letting me know. Almost forgot about this PR, haha 😅. If they decide to not implement it, then just tell me what else you need on this PR and I'll get it added here. |
Greetings from the Shields.io side of this equation 👋 Definitely want to echo and underscore this point. Our Endpoint badges are really intended to support use cases that need more power/programmable control atop our standard Dynamic badge offering. Think of it being more for individual use, and not what we want/are typically willing to utilize for our first-class/native badge offerings for services. We have a very strong preference for consuming standard API surfaces that provide the raw data so that we can provide badges with defaults that are both consistent with our other offerings and adhere to our specification, while at the same time still supporting the configurability options. The Endpoint badge route dictates many of the rendering concerns (for good reason given its target pattern) which make it a very poor fit for native service badges. A deps.rs json API that provides the raw, relevant dependency data would be a prerequisite for our ability to directly offer deps.rs based badges in Shields |
This gonna happen? 😂 |
@dnaka91 Are you keen on implementing an API to get all the available data, in JSON format? |
Ah sorry, I thought to wait on @Icelk to decide whether to create this API or not. Not sure when I will start on this though. |
Deps.rs already has its own badge but shields.io allows for a wider variety of themes and customizations. That service has an endpoint feature that gives the option to generate badges for systems that are not natively supported by them.
There are several additional features that can be defined in the data for the endpoint but for now I kept it simple and only provided the basic information that is equivalent to the self-generated badge.
The badge can be easily tested by using a service like
ngrok
:Currently I'm just not sure where to inform about this feature on the deps page, therefore I made this a draft.