-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Announcing the Endpoint badge (beta) #2838
Comments
Good work on shipping this 👍 I think this really opens the door to more of a "plugin" style architecture - users will be able to enjoy a wider range of more esoteric integrations and use-cases without us necessarily having to host a service integration in core for every single programming based service under the sun. Sorry I didn't get a chance to raise this at the review stage, but one thing that I think is likely to be a point of confusion is the cache key. I think some users will try to set it to 0 and get unexpected results. It would be useful to more clearly communicate that there is a floor on the cache length (but as I remember it, its a bit fiddly to surface the value because the variable isn't set when we build the front-end). Is there a way we can more clearly communicate this in the docs? |
Yea, good shout. The Endpoint service has its own floor of 300 seconds that's defined in the service, independent of anything that's configured at runtime. At least that's how I think it's implemented. (That work went on a while so TBH I don't completely remember.) This is what I wrote in the docs: I agree it's not totally clear; it doesn't mention the 300-second floor at all. |
Ah yea, I agree it's a confusing for Shields users that the parameters aren't the same. That said I think I'd like to change the global query parameters to match what's being used here. We can continue to support the old options on the query string, probably forever, or implement something like #2340 to gently encourage people to switch over. Whoa, how'd you pull that off?!
I think failing loudly is better because that way you know you have spelled something wrong. If it silently fails until you get it right it's harder to troubleshoot. There is a |
Why not.. that's what most users will do :D
👍 I'd rather see us become more consistent by using |
Yes, definitely. It makes it easier for people implementing and endpoint or redirects to know what to include and what not. I.e. I have a short-URL which I can format like the badges URL:
We can have both: There are required fields. If they are not there, one can fail loudly. All other fields can be tested. That is, if the specification is fixed. But if the specification changes, it might be good to fail strictly, so people can get notified. Another idea to think about: Easy embedding of endpoint badges into shields.ioI provide the endpoint you mentioned:
However, I would still like to give the users the ability in shields.io style, to customize the badge. |
It's awesome that you're using this! I hadn't considered the possibility that you'd want to redirect to the endpoint badge. Interesting! It looks like the user overrides are working, e.g. your are redirecting to That's exactly correct. If the user happens to be specify some bad values, currently we're silently ignoring them, though if that behavior changes, it can be our responsibility to provide the user a helpful error message. Pointing users to the styles section on https://shields.io/ probably is the best thing you can do. Validating the parameters before the redirect wouldn't help. |
Hi @paulmelnikow, thanks for this feature, it's a really nice addition! I've just open-sourced a Patreon endpoint: https://github.com/endel/shieldsio-patreon Endpoint: https://shieldsio-patreon.herokuapp.com/endel |
Neat! It's working right now. "Vendor unresponsive" appears after 30 seconds without a response, so probably your server is taking too long to respond. Are you using a Free dyno on heroku? They go to sleep after a while, and after that do take a while to boot up. |
@paulmelnikow thanks a lot, I've edited my original post 😅 it was a silly mistake, forgot to use |
Aha! That sounds about right. Glad you got it working! |
To keep the URLs concise, I'm thinking we should remove Now that #2340 is merged we can add redirects without cluttering up our service implementations, so there would be little cost to providing backward compatibility. |
@paulmelnikow sounds good! let us know when you apply this change :) |
If a |
No, that sounds like a bug. |
Cool, I've opened a new issue, Also it may be good to figure out if we are going to support other formats (#2964) or not before #2838 (comment) is implemented, as that might change things. Edit: Although even if we do support other formats we could still have the base endpoint default to json. |
I've setup a little demo website over here with a few more endpoint examples 😃 |
@endel and others following this thread: wanted to let you know that the URL change from If you update your URLs if will avoid a redirect, speeding up your badge slightly and avoiding making an unnecessary request to our server. |
Just found this thread and updated my endpoint at https://github.com/Cherry/shieldsio-steam-workshop. Thanks! |
This feature seems to be stable. Feel like we may as well take this out of beta! |
Hi all, Shields has launched a beta features: the Endpoint badge.
What is the Endpoint badge?
The endpoint badge is a new kind of dynamic badge endpoint which renders a badge from a JSON endpoint.
What is it useful for?
How does it work?
Where can I host the JSON endpoint?
Literally anywhere that supports HTTPS.
Feedback
Your feedback on the new feature is much appreciated! Please feel free to comment in this issue with feedback or questions about how to use it. The #support room in Discord is also a great place to discuss it.
Known issues
logoSvg
is specified the user cannot override the logo #2998The text was updated successfully, but these errors were encountered: