Skip to content
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

Badge Request - Dynamic Bluesky Badges for Users #10788

Open
xubiod opened this issue Jan 3, 2025 · 1 comment
Open

Badge Request - Dynamic Bluesky Badges for Users #10788

xubiod opened this issue Jan 3, 2025 · 1 comment
Labels
good first issue New contributors, join in! service-badge New or updated service badge

Comments

@xubiod
Copy link

xubiod commented Jan 3, 2025

📋 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 xubiod added the service-badge New or updated service badge label Jan 3, 2025
@chris48s chris48s added the good first issue New contributors, join in! label Jan 4, 2025
@colindean
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

3 participants