shields icon indicating copy to clipboard operation
shields copied to clipboard

Badge Request - Dynamic Bluesky Badges for Users

Open xubiod opened this issue 1 year ago • 3 comments

📋 Description

Mostly as another variation on a social follower/post count badges similar to other services.

Utilizing the static generator for a personal examples:

Possible follower example: Static Badge Possible post count example: Static Badge

I can see some use with a badge for a specific feed as well, but I have not looked into this matter deeply enough to give a confident use case.

🔗 Data

The Bluesky API for this data is publicly available and accessible with no API keys.

The documentation is available on docs.bsky.app as app-bsky-actor-get-profile.

It seems that just using https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile/?actor=[HANDLE / DID] is all that's needed for the required data as JSON, accessible with the keys followersCount and postsCount for the examples I gave above. The usage of the handle key can be used as the username of the account in the badge.

Only main issue I can foresee is handles changing, but that can be resolved by using the DID of the user, which for convenience can be captured at the time with the did key.

🎤 Motivation

More social badges would be helpful, especially for people who operate either solely or majorly on Bluesky over other services. I can see this being used on GitHub accounts' README.md as a social media tie, and generally used as a way to encourage support of developers and projects outside of GitHub, Bitbucket, any other Git repository service, or webpage in general.

As a personal motivation, Bluesky is my only main social media platform I actively use, but I know that the developer presence on Bluesky is generally substantial.

xubiod avatar Jan 03 '25 15:01 xubiod

Raw URL, since GitHub caches images and I can't see the dynamic JSON URL you've used.

https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpublic.api.bsky.app%2Fxrpc%2Fapp.bsky.actor.getProfile%2F%3Factor%3Dcad.cx&query=%24.followersCount&style=social&logo=bluesky&label=Follow%20%40cad.cx

yields

@cad.cx BlueSky followers

colindean avatar Jan 10 '25 22:01 colindean

@chris48s Can I take this on?

erayerdin avatar Jun 09 '25 19:06 erayerdin

Feel free. I will aim to pick up a review for you

chris48s avatar Jun 11 '25 17:06 chris48s