A simple API that returns number of Github trending repositories and developers.
See the full API documentation in Apiary.
Receive an array of trending repositories.
URL Endpoint:
https://github-trending-api.now.sh/repositories?language=javascript&since=weekly
Parameters:
language
: optional, list trending repositories of certain programming languages, possible values are listed here.since
: optional, default todaily
, possible values:daily
,weekly
andmonthly
.
Response:
[
...
{
"author": "google",
"name": "gvisor",
"url": "https://github.com/google/gvisor",
"description": "Container Runtime Sandbox",
"language": "Go",
"languageColor": "#3572A5",
"stars": 3320,
"forks": 118,
"currentPeriodStars": 1624,
"builtBy": [
{
"href": "https://github.com/viatsko",
"avatar": "https://avatars0.githubusercontent.com/u/376065",
"username": "viatsko"
}
]
}
...
]
Receive an array of trending developers.
URL Endpoint:
https://github-trending-api.now.sh/developers?language=javascript&since=weekly
Parameters:
language
: optional, list trending repositories of certain programming languages, possible values are listed here.since
: optional, default todaily
, possible values:daily
,weekly
andmonthly
.
Response:
[
...
{
"username": "google",
"name": "Google",
"url": "https://github.com/google",
"avatar": "https://avatars0.githubusercontent.com/u/1342004",
"repo": {
"name": "traceur-compiler",
"description":
"Traceur is a JavaScript.next-to-JavaScript-of-today compiler",
"url": "https://github.com/google/traceur-compiler"
}
}
...
]
Receive popular languages and all languages.
URL Endpoint:
https://github-trending-api.now.sh/languages
Response:
{
"popular": [
...
{
"urlParam": "html",
"name": "HTML"
}
...
],
"all": [
...
{
"urlParam": "javascript",
"name": "JavaScript"
}
...
]
}
You could also use the API as a NPM package.
$ npm install --save @huchenme/github-trending
import {
fetchAllLanguages,
fetchRepositories,
fetchDevelopers,
} from '@huchenme/github-trending';
fetchAllLanguages().then(languages => {
console.log(languages);
});
fetchRepositories({ language: 'ruby', since: 'monthly' }).then(repositories => {
console.log(repositories);
});
fetchDevelopers({ language: 'javascript' }).then(developers => {
console.log(developers);
});
Return popular languages and all languages.
{
popular: [
...
{
urlParam: 'html',
name: 'HTML'
}
...
],
all: [
...
{
urlParam: 'javascript',
name: 'JavaScript'
}
...
]
}
Receive an array of trending repositories.
params:
language
: possible values are the the ones fromfetchAllLanguages()
or just find here.since
:daily
,weekly
ormonthly
, default todaily
.
[
...
{
author: 'google',
name: 'gvisor',
url: 'https://github.com/google/gvisor',
description: 'Container Runtime Sandbox',
language: 'Go',
languageColor: '#3572A5',
stars: 3320,
forks: 118,
currentPeriodStars: 1624,
"builtBy": [
{
"href": "https://github.com/viatsko",
"avatar": "https://avatars0.githubusercontent.com/u/376065",
"username": "viatsko"
}
]
}
...
]
Receive an array of trending developers.
params:
language
: possible values are the the ones fromfetchAllLanguages()
or just find here.since
:daily
,weekly
ormonthly
, default todaily
.
[
...
{
username: 'google',
name: 'Google',
url: 'https://github.com/google',
avatar: 'https://avatars0.githubusercontent.com/u/1342004',
repo: {
name: 'traceur-compiler',
description:
'Traceur is a JavaScript.next-to-JavaScript-of-today compiler',
url: 'https://github.com/google/traceur-compiler'
}
}
...
]
MIT