GithubHelp home page GithubHelp logo

kawarimidoll / deno-github-contributions-api Goto Github PK

View Code? Open in Web Editor NEW
153.0 2.0 7.0 605 KB

The unofficial get api of GitHub contributions with Deno ๐Ÿฆ•

Home Page: https://github-contributions-api.deno.dev/

License: MIT License

TypeScript 100.00%
deno github github-api curl contributions typescript deno-deploy contribution-graph

deno-github-contributions-api's Introduction

deno-github-contributions-api

ci deno deploy deno.land vr scripts LICENSE

Get your GitHub contributions data powered by Deno!

gif

Usage

as API

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

as deno module

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

Extra

If you are using GitHub CLI, you can call this API from gh-graph.

Acknowledgements tweet

if (this.repo.isAwesome || this.repo.isHelpful) {
  star(this.repo);
}

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.