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

feat : add badges #9

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

feat : add badges #9

wants to merge 39 commits into from

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented May 2, 2023

Fix #7

Space

Active proposals count

GET http://localhost:3000/badges/space/cakevote.eth

proposal-active eth

Closed proposals count

GET http://localhost:3000/badges/space/cakevote.eth?state=closed

proposal-closed

Pending proposals count

GET http://localhost:3000/badges/space/cakevote.eth?state=pending

proposal-pending

Followers count

GET http://localhost:3000/badges/space/cakevote.eth?field=followersCount

follows-count

Proposal

GET http://localhost:3000/badges/proposal/0x013f763e92d253926bc7f04d79138593a1b31c969a34db7f0955e46850c796d9

proposal-votes

TODO

  • Some proposals counter does not appear on png
  • Image seem low-res, and not crisp enough, shields.io seems to have the same issue (e.g. https://raster.shields.io/badge/proposal-1,790-green). Tried to pass the SVG to different SVG->PNG libraries, as well as online services such as https://svgtopng.com/, everything return a low res picture. We could just abandon the .png route (and leave the low res image), and commit to svg format, like pretty much all the badge services

After a market research, all badges provider are returning badge as SVG. We will only support and drop png support, due to issue with png image low resolution

Queue system enable back the cache file generation on demand when cache is not available on fetch
@wa0x6e wa0x6e self-assigned this May 2, 2023
@wa0x6e wa0x6e marked this pull request as ready for review May 2, 2023 15:51
@wa0x6e wa0x6e mentioned this pull request May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Serve badges with active proposals
1 participant