1.2.1 • Published 5 months ago

@sliit-foss/leaderboard v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@sliit-foss/leaderboard

A utility package for fetching a list of contributor scores to a GitHub organization or repository

Installation

# using npm
npm install @sliit-foss/leaderboard

# using yarn
yarn add @sliit-foss/leaderboard

Usage

# using require
const leaderboard = require('@sliit-foss/leaderboard').default;

# using import
import leaderboard from '@sliit-foss/leaderboard';

Example

leaderboard.initialize("GITHUB_ACCESS_TOKEN");

// Fetch organization leaderboard
leaderboard
  .getOrganizationLeaderboard({
    orgs: "sliit-foss",
    filters: {
      between: "2021-10-14..2021-10-31",
      label: "hacktoberfest-accepted"
    }
  })
  .then((results) => console.log(results));

// Fetch repository leaderboard
leaderboard
  .getRepositoryLeaderboard({
    owner: "sliit-foss",
    repository: "sliitfoss",
    filters: {
      between: "2021-10-14..2021-10-31",
      label: "hacktoberfest-accepted"
    }
  })
  .then((results) => console.log(results));

// With Page Size and Page Limit
leaderboard
  .getOrganizationLeaderboard({
    orgs: "sliit-foss",
    filters: {
      pageSize: 10,
      pageLimit: 2
    }
  })
  .then((results) => console.log(results)); //returns 20 results
1.2.1

5 months ago

1.2.0

6 months ago

1.2.0-blizzard.0

12 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

0.0.8

1 year ago

1.0.0

1 year ago

0.0.6

1 year ago

0.0.7

1 year ago

0.0.5

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago