Skip to content

majodev/sponsors-api

 
 

Repository files navigation

Sponsors API

Sponsors API is a GitHub Sponsors server for displaying your current sponsor avatars in your project Readme. It looks like this:

Deploying

We build and publish a minimal docker image via GitHub Actions. See Packages docker pull ghcr.io/majodev/sponsors-api:<tag>.

The following environment variables are supported:

  • GITHUB_TOKEN the (classic!) GitHub API token (the 'read:org' scope is required)
  • PORT the server port (defaults to 3000)
  • URL the url to your endpoint such as https://sponsors.mranftl.com (optional)
  • CACHE_TTL the cache TTL (go duration, sponsors are cached for an hour by default (1h))

Usage

/markdown

e.g. https://sponsors.mranftl.com/markdown

Visit the /markdown path for the markdown to copy/paste into readmes.

/json

e.g. https://sponsors.mranftl.com/json

{
    "login": "your_username",
    "sponsors": [
        {
            "login": "sponsor_username",
            "url": "sponsor_picture.png",
            "type": "User" // or "Organization"
        },
        [...]
    ]
}

/txt

e.g. https://sponsors.mranftl.com/txt

List in the following format:

<type> <login> <url>

/

e.g. https://sponsors.mranftl.com

Serves a minimal HTML with sponsors images + links to the sponsor profiles. Mostly useful for debugging.

About

GitHub Sponsor avatar listings in your Readme.md

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

  • Go 57.0%
  • Dockerfile 38.5%
  • Shell 4.5%