Get your GitHub contributions data powered by Deno!
In your terminal:
$ curl https://github-contributions-api.deno.dev
# Then follow the messages...
Of course, you can access the endpoint from the web browser: https://github-contributions-api.deno.dev
In your deno script file:
import { getContributions } from "https://github.com/kawarimidoll/deno-github-contributions-api/raw/main/mod.ts";
const username = "your-github-username";
const token = "xxxxxxxxxxxxxxxxxxxxxxx";
const contributions = await getContributions(username, token);
console.log(contributions.toTerm({ scheme: "random" }));
You can see an example in main.ts
The personal access token which has a "read:user" scope is required.
Generate your token from this page: https://github.com/settings/tokens/new
If you are using GitHub CLI, you can call this API from gh-graph.
if (this.repo.isAwesome || this.repo.isHelpful) {
star(this.repo);
}