Code Monkey home page Code Monkey logo

gh-sponsors-api's Introduction

GitHub Sponsors API

A REST API for GitHub Sponsors, if you need a GraphQL one, there is an official API. Some links and examples can be found in the Notes section.

Endpoints

/v2/count/user/

Get the count of people who sponsor user. Includes private sponsors.

Example query: https://ghs.vercel.app/v2/count/filiptronicek/

Example response:
{
  "status": "success",
  "sponsors": {
    "current": 4,
    "past": 10
  }
}

/v2/sponsors/user/

Get details of people who sponsor user. Does not include private sponsors.

Example query: https://ghs.vercel.app/v2/sponsors/filiptronicek

Example response:
{
  "status": "success",
  "sponsors": {
    "current": [
      {
        "username": "aellopos",
        "avatar": "https://avatars.githubusercontent.com/u/39790985?s=60&v=4"
      },
      {
        "username": "mosh98",
        "avatar": "https://avatars.githubusercontent.com/u/48658042?s=60&v=4"
      },
      {
        "username": "kahy9",
        "avatar": "https://avatars.githubusercontent.com/u/48121432?s=60&v=4"
      },
      {
        "username": "0ndras3k",
        "avatar": "https://avatars.githubusercontent.com/u/57116019?s=60&v=4"
      },
      {
        "username": "AdamSchinzel",
        "avatar": "https://avatars.githubusercontent.com/u/66002635?s=60&v=4"
      },
      {
        "username": "czM1K3",
        "avatar": "https://avatars.githubusercontent.com/u/45005362?s=60&v=4"
      },
      {
        "username": "svobodavl",
        "avatar": "https://avatars.githubusercontent.com/u/58887042?s=60&v=4"
      },
      {
        "username": "bigint",
        "avatar": "https://avatars.githubusercontent.com/u/69431456?s=60&v=4"
      },
      {
        "username": "anuraghazra",
        "avatar": "https://avatars.githubusercontent.com/u/35374649?s=60&v=4"
      }
    ],
    "past": [
      {
        "username": "scraptechguy",
        "avatar": "https://avatars.githubusercontent.com/u/75474651?s=60&v=4"
      },
      {
        "username": "bdougie",
        "avatar": "https://avatars.githubusercontent.com/u/5713670?s=60&v=4"
      },
      {
        "username": "kdaigle",
        "avatar": "https://avatars.githubusercontent.com/u/2501?s=60&v=4"
      }
    ]
  }
}

/sponsoring/user/

Get all users who are sponsored by user.

Example query: https://ghs.vercel.app/sponsoring/svobodavl

Example response:
{
  "sponsorees": [
    {
      "handle": "filiptronicek",
      "avatar": "https://avatars.githubusercontent.com/u/29888641?s=88&u=152b134e3e6e3d003ecd55fdde31c4171144c771&v=4",
      "profile": "https://github.com/filiptronicek"
    }
  ]
}

Notes

  • The /sponsors/user/ and /count/user/ endpoints got themselves an official API (as of June of 2021)! you can use them like this: (community/community#3818)
query {
  user(login: "filiptronicek") {
    ... on Sponsorable {
      sponsors(first: 100) {
        totalCount
        nodes {
          ... on User { login }
          ... on Organization { login }
        }
      }
    }
  }
}
query {
  user(login: "cheshire137") {
    sponsoring(first: 10) {
      totalCount
      nodes {
        ... on User { login }
        ... on Organization { login }
      }
    }
  }
}

gh-sponsors-api's People

Contributors

filiptronicek avatar dependabot[bot] avatar dependabot-preview[bot] avatar fayasnoushad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.