fetch-github-trending
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

fetch-github-trending

npm downloads Test

fetch github trending easily

Install

npm install fetch-github-trending

Usage

import fetchGithubTrending, { ProgramLanguage, SpokenLanguage } from 'fetch-github-trending';

const { repositories } = await fetchGithubTrending({
  spokenLanguage: SpokenLanguage.English,
  programLanguage: ProgramLanguage.TypeScript,
  dateRange: 'monthly',
});

console.log(repositories);

output:

[
  {
    owner: 'freeCodeCamp',
    name: 'freeCodeCamp',
    description: "freeCodeCamp.org's open-source codebase and curriculum. Learn to code for free.",
    programLanguage: 'TypeScript',
    programLanguageColor: '#3178c6',
    starCount: 382086,
    starCountInDateRange: 151,
    forkCount: 35617,
    contributors: ['raisedadead', 'ojeytonwilliams', 'camperbot', 'renovate-bot', 'sahat'],
  },
  // ...
];

Options

view source for latest options:

interface Options {
  spokenLanguage?: SpokenLanguage;
  programLanguage?: ProgramLanguage | ProgramLanguage[];
  dateRange?: 'daily' | 'weekly' | 'monthly';
}

Package Sidebar

Install

npm i fetch-github-trending

Weekly Downloads

6

Version

0.1.3

License

none

Unpacked Size

96 kB

Total Files

10

Last publish

Collaborators

  • yutengjing