···303031313. set environment variable `GITHUB_TOKEN` to the personal access token you created in step 1
32323333-4. get the url of the deployed function and use it in your application, by sending a GET request to the url (if no user is given, returns the data of the user that owns the token):
3333+4. get the url of the deployed function and use it in your application, by sending a GET request to the url (if no user is given, returns the data of the user that owns the token, user selection by default is disabled, see below how to enable it):
34343535-```
3636-https://<your-deployment-url>/api/github-data?user=<github-username>
3535+```http
3636+// get data of user that owns the token
3737+https://<your-deployment-url>/api/github-data
3838+3939+// get data of a specific user (disabled by default, see below how to enable it)
4040+https://<your-deployment-url>/api/github-data?user=<username>
3741```
384239435. simple example using fetch:
···475148527. it's recommended to remove data points you don't need, to reduce the size of the response and speed up the request
49535050-8. if you want to disallow querying users other than yourself, change line 9 in `api/github-data.ts` to:
5454+8. if you want to allow querying users other than yourself, change line 9 in `api/github-data.ts` to:
51555256```ts
5353- const allowUserSelection = false;
5757+ const allowUserSelection = true;
5458```
55595660## development
···8791export type GitHubResponse = {
8892 user: {
8993 login: string;
9494+ avatarUrl: string;
9095 contributionsCollection: {
9196 totalCommitContributions: number;
9297 totalIssueContributions: number;