A project which provides you a backend which fetches all information for the github sponsoring for you
- You need to get a application key here: https://github.com/settings/applications/new
- Best is to follow this guide, if you are unsure what you need to there https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app
- You need a way to provide a actual login for the user, you have actual three options which are all listed here: https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps
- Get a personal key https://github.com/settings/tokens/new, with the rights "user:read" and "org:read" at least
- Clone the project
- Get the latest node.js https://nodejs.org/en/download/
- Go into this project and hit "npm install" to install all dependencies
- After that execute "npm run build" to compile the ts code to js code
- Create in the root directory .env
- These are Environment variables which are only provided to the node.js instance
- PORT is the port where the backend should start
- ORIGIN is for cross origin, if you don't mind who access it, you can leave it with a *, otherwise here you find the options for origin https://github.com/expressjs/cors#configuration-options
- TOKEN this is your personal token which you generate in step 1
- Then you are ready to go and can start the Backend with
node dist/main
.
{
"tierSelectedAt": "dateTimeStringWhenTierWasSelected",
"tier": {
"id": "idOfTheTier",
"name": "NameOfTheTier",
"isOneTime": true,
"isCustomAmount": true,
"closestLesserValueTier": {
"id": "idOfTheTier",
"name": "NameOfTheTier",
}
},
"isOneTimePayment": true,
"sponsorEntity": {
"__typename": "ReturnUserOrOrganization",
"login": "usersLoginName",
"email": "publicEmailOfTheUser",
"name": "publicNameOfTheUser"
}
}
httpClient.get(backend_url:backend_port/viewer/sponsor/token?token=USER_TOKEN)
httpClient.get(backend_url:backend_port/viewer/sponsor/login?login=USER_LOGIN_NAME)
httpClient.get(backend_url:backend_port/viewer/sponsor/by?login=USER_LOGIN_NAME)
return boolean
httpClient.get(backend_url:backend_port/viewer/sponsor/to?login=USER_LOGIN_NAME)
returns boolean
httpClient.get(backend_url:backend_port/viewer/sponsor/all)
returns an array of the JSON