fetch-github-trending
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';
}