https://legend-of-github-api.herokuapp.com/
GET:
https://legend-of-github-api.herokuapp.com/repository/format?username={username}&stars=10&forks=5
stars: optional Stars to define a relevant repository, the default is >= 5.
forks: optional Forks to define a relevant repository, the default is >= 2.
{
"stars": 152,
"forks": 18,
"language": "C#",
"bestRepositoty": {
"name": "Chocobo-Date-Range-Picker",
"language": "JavaScript",
"stars": 24,
"forks": 6
},
"repositories": {
"relevants": [
{
"name": "Vue-Dual-List",
"language": "Vue",
"stars": 16,
"forks": 4
}
],
"full": [
{
"name": "github-scrap-api",
"language": "JavaScript",
"stars": 5,
"forks": 0
},
{
"name": "legend_of_github",
"language": "JavaScript",
"stars": 0,
"forks": 0
}
]
}
}
GET:
https://legend-of-github-api.herokuapp.com/user/full?username={username}
{
"stars": 312,
"followers": 34,
"following": 63,
"commits": 1567,
"organizations": 4,
"commitsAverage": 4.3
}
GET:
https://legend-of-github-api.herokuapp.com/streak/quantity?username={username}
{
"streak": "365"
}
GET:
https://legend-of-github-api.herokuapp.com/contributor?username={username}
{
"forks": 1,
"contrinutions": [
{
"isContributor": true,
"repository": "relato-express"
}
],
"contributionsAmount": 1
}
GET:
https://legend-of-github-api.herokuapp.com/repository/full?username={username}
[
{
"name": "github-scrap-api",
"language": "JavaScript",
"stars": 6,
"forks": 0
},
{
"name": "legend_of_github",
"language": "JavaScript",
"stars": 0,
"forks": 0
},
{
"name": "coolvalidator",
"language": "C#",
"stars": 6,
"forks": 0
}
]
GET:
https://legend-of-github-api.herokuapp.com/repository/stars?username={username}
{
"stars": 153
}
GET:
https://legend-of-github-api.herokuapp.com/repository/forks?username={username}
{
"forks": 18
}
GET:
https://legend-of-github-api.herokuapp.com/repository/best?username={username}
{
"bestRepositoty": {
"name": "Chocobo-Date-Range-Picker",
"language": "JavaScript",
"stars": 24,
"forks": 6
}
}
GET:
https://legend-of-github-api.herokuapp.com/repository/favorite/language?username={username}
{
"language": "C#"
}
GET:
https://legend-of-github-api.herokuapp.com/repository/languages?username={username}
{
"repositories": [
{
"language": "C#"
},
{
"language": "C#"
},
{
"language": "C#"
},
{
"language": "C#"
},
{
"language": "C#"
}]
}
GET:
https://legend-of-github-api.herokuapp.com/repository/names?username={username}
{
"repositories": [
{
"name": "AbstractFactory"
},
{
"name": "AprendendoAjaxComAsp.NetMVC5"
},
{
"name": "AspNetCoreTutorial"
},
{
"name": "BeaconMusic"
},
{
"name": "CadastroDePedidos"
}]
}
GET:
https://legend-of-github-api.herokuapp.com/user/stars?username={username}
{
"stars": 312
}
GET:
https://legend-of-github-api.herokuapp.com/user/followers?username={username}
{
"followers": 34
}
GET:
https://legend-of-github-api.herokuapp.com/user/following?username={username}
{
"following": 63
}
GET:
https://legend-of-github-api.herokuapp.com/user/commits/average?username={username}
{
"commitsAverage": 4.3
}
GET:
https://legend-of-github-api.herokuapp.com/user/commits?username={username}
{
"commits": 1573
}
GET:
https://legend-of-github-api.herokuapp.com/user/organizations?username={username}
{
"organizations": 4
}
GET:
https://legend-of-github-api.herokuapp.com/streak/maxcommit?username={username}
{
"date": "2016-10-29",
"commit": 64
}
GET:
https://legend-of-github-api.herokuapp.com/streak/full?username={username}
[
{
"date": "2016-10-09",
"commit": 0
},
{
"date": "2016-10-10",
"commit": 0
},
{
"date": "2016-10-11",
"commit": 0
},
{
"date": "2016-10-12",
"commit": 0
},
{
"date": "2016-10-13",
"commit": 0
}
]
On the client side.
const getCurrentStreak = axios.get(`https://legend-of-github-api.herokuapp.com/streak/full?username={username}`)
.then(res => {
let currentStreak = []
let lastCommit = 0
res.data.forEach(function (data, index) {
const date = data.date
const currentCommit = data.commit
if (new Date(data.date.replace('-', '/')).getTime() <= new Date().getTime()) {
if (currentCommit > 0 && (lastCommit > 0 || currentStreak.length === 0)) {
currentStreak.push({
date: date,
commit: currentCommit
})
} else {
currentStreak = []
}
}
lastCommit = data.commit
})
return currentStreak.length
}).catch(e => {
console.log(e)
})
GET:
https://legend-of-github-api.herokuapp.com/contributor/contributions?username={username}
{
"information": [
{
"isContributor": true,
"repository": "relato-express"
}
]
}
GET:
https://legend-of-github-api.herokuapp.com/contributor/amount?username={username}
{
"contributionsAmount": 1
}
GET:
https://legend-of-github-api.herokuapp.com/contributor/forks/names?username={username}
{
"forks": [
{
"name": "relato-express"
}
]
}
It is available under the MIT license. License