fubuki
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Fubuki

Github GraphQL API Client

TypeScript NodeJs Fubuki

This package refers the following:

- Github GraphQL API

Generate Github Acess Token Here

Install

npm install --save fubuki

Usage

const { GithubClient } = require('fubuki')
// import { GithubClient } from 'fubuki'

const fubuki = new GithubClient(github_accessToken)

Get a user

const data = await fubuki.getUser('alensaito1')

console.log(data) /* {
    name: 'Alen Yohannan'
    login: 'alensaito1'
    pullRequests: {
        totalCount: 1400
    }...*/

Get a Repository

const data = await fubuki.getRepository({
    owner: 'alensaito1',
    repository: 'fubuki'
})

console.log(data) /* {
    description: 'Github GQL API Client'
    forks: {
         totalCount: 0
    }...*/

Get the contributions calender of a user

const data = await fubuki.getContributionsCalendar('alensaito1')

console.log(data) /*{
    weeks: {
        [contributionDays: [{
            color: '#ebedf0'
            contributionCount: 9
            contributionLevel:'FIRST_QUARTILE'
            date: '2021-07-13'
        }...]
    }...]
}*/

Readme

Keywords

Package Sidebar

Install

npm i fubuki

Weekly Downloads

4

Version

1.1.0

License

MIT

Unpacked Size

24.8 kB

Total Files

21

Last publish

Collaborators

  • alensaito1