Closed glerchundi closed 4 years ago
Thanks for pointing it out!
I do rely on SVG scraping for some things, but I tend to de-prioritize implementing that, since it can be brittle and requires more work later. It seems they use Shields.io internally.
If you can ask the quay folks whether they plan on adding an API, I would be very grateful!
Quay dev here: What kind of API do you guys expect? We'd love to be able to be officially supported by shields.io instead of just hosting our own SVGs.
@jzelinskie A common strategy is to download the badge you wish for from http://img.shields.io/badge/insert-text-green.svg
and serve it to users.
If you wish the badges to be available under the img.shields.io domain, we need an API, preferably JSON, that gives us enough information to construct the badge.
@espadrine we currently do the former (hosting of SVGs we downloaded from you guys), but we have an API that exposes this info: the phase
attribute returned by this API call http://docs.quay.io/api/swagger/#!//getRepoBuilds
An example value to put in the repository field is jzelinskie/chihaya
Neat!
Any progress on this? The API of quay.io has been changed, not sure if the method proposed above is still feasible.
Just wanted to put out there that Shields is a community project, and that means you can help make this happen! 👐 We have a great tutorial and welcome anyone who would like to dig into this! Our maintainer team is happy to provide guidance on the API design and provide assistance with the implementation. We've had many first-time contributors who don't use JavaScript and have tried to make the first-time contributing experience as straightforward as possible.
@paulmelnikow Thanks for the prompt reply! Yeah, I'd be really excited to contribute to this great project. Specifically on this issue, my concern is that quay.io might not be providing sufficient information through their endpoints to build such a badge at the moment 🤔 Let me do some research and see if I could try to make this happen!
Sounds great!
Another thing to keep in mind whether there is an authentication requirement. As a rule we don't allow passing read-write credentials to the server for security reasons. We can install a production API token, though it won't be specific to any particular projects.
Also, if you want to, you could play around with a live implementation using RunKit and our beta Endpoint badge: #2838.
Notice this was tagged good first issue, though I removed that tag since I'm not sure whether we have the upstream API we need.
I would really like to have quay.io badges for image size, pulls, and stars. Should I open another issue?
This is a docker image builder service:
They dont't seem to provide public API access, just a svg url, is this enough? For example: https://quay.io/repository/glerchundi/parkeeper/status.
Thanks!