在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:mikemajesty/github-scrap-api开源软件地址:https://github.com/mikemajesty/github-scrap-api开源编程语言:JavaScript 99.0%开源软件介绍:The simplest github scrap API.API link.https://legend-of-github-api.herokuapp.com/ Custom repository informationRequest
stars: optional Stars to define a relevant repository, the default is >= 5. Response{
"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
}
]
}
} Custom user informationRequest
Response{
"stars": 312,
"followers": 34,
"following": 63,
"commits": 1567,
"organizations": 4,
"commitsAverage": 4.3
} Custom streak informationRequest
Response{
"streak": "365"
} Custom contributions informationRequest
Response{
"forks": 1,
"contrinutions": [
{
"isContributor": true,
"repository": "relato-express"
}
],
"contributionsAmount": 1
} Repository informationGet all repositoriesRequest
Response[
{
"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
}
] Gets all stars from the repositoriesRequest
Response{
"stars": 153
} Gets all forks from the repositoriesRequest
Response{
"forks": 18
} Gets the best repositoryRequest
Response{
"bestRepositoty": {
"name": "Chocobo-Date-Range-Picker",
"language": "JavaScript",
"stars": 24,
"forks": 6
}
} Gets the favorite languageRequest
Response{
"language": "C#"
} Gets all languages from repositoriesRequest
Response{
"repositories": [
{
"language": "C#"
},
{
"language": "C#"
},
{
"language": "C#"
},
{
"language": "C#"
},
{
"language": "C#"
}]
} Gets all names from repositoriesRequest
Response{
"repositories": [
{
"name": "AbstractFactory"
},
{
"name": "AprendendoAjaxComAsp.NetMVC5"
},
{
"name": "AspNetCoreTutorial"
},
{
"name": "BeaconMusic"
},
{
"name": "CadastroDePedidos"
}]
} User informationGets all stars in other repositoriesRequest
Response{
"stars": 312
} Get all your followersRequest
Response{
"followers": 34
} Get user followingRequest
Response{
"following": 63
} Gets the average of the commitRequest
Response{
"commitsAverage": 4.3
} Gets the amount of commitsRequest
Response{
"commits": 1573
} Gets the amount of organizationsRequest
Response{
"organizations": 4
} Get streak informationGets the day with more commitsRequest
Response{
"date": "2016-10-29",
"commit": 64
} Gets all streak informationRequest
Response[
{
"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
}
] How to solve the locale problem when I get the streak?Using VUE with axiosOn 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({
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论