https://github.com/tjx666/fetch-github-trending
fetch github trending easily
https://github.com/tjx666/fetch-github-trending
Last synced: about 1 month ago
JSON representation
fetch github trending easily
- Host: GitHub
- URL: https://github.com/tjx666/fetch-github-trending
- Owner: tjx666
- License: mit
- Created: 2024-01-23T02:30:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-24T07:39:13.000Z (over 1 year ago)
- Last Synced: 2025-03-13T01:37:11.410Z (about 1 month ago)
- Language: TypeScript
- Size: 76.2 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# fetch-github-trending
[](https://npmjs.com/package/fetch-github-trending) [](https://npmjs.com/package/fetch-github-trending) [](https://github.com/tjx666/fetch-github-trending/actions/workflows/test.yml)
fetch github trending easily
## Install
```bash
npm install fetch-github-trending
```## Usage
```typescript
import fetchGithubTrending, { ProgramLanguage, SpokenLanguage } from 'fetch-github-trending';const { repositories } = await fetchGithubTrending({
spokenLanguage: SpokenLanguage.English,
programLanguage: ProgramLanguage.TypeScript,
dateRange: 'monthly',
});console.log(repositories);
```output:
```javascript
[
{
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](https://github.com/tjx666/fetch-github-trending/blob/main/src/types/Options.ts) for latest options:
```typescript
interface Options {
spokenLanguage?: SpokenLanguage;
programLanguage?: ProgramLanguage | ProgramLanguage[];
dateRange?: 'daily' | 'weekly' | 'monthly';
}
```