Reputation: 47
I'm trying to get number of repositories of user, without getting all repos using api.github.com/users/userName/repos. Is there any solution to do this?
Thanks
Upvotes: 0
Views: 378
Reputation: 31
Yes, you can do like this
Note: in this example i'm using javascript
fetch("https://api.github.com/users/YOUR_USERNAME")
.then((response) => response.json())
.then((data) => console.log(data.public_repos));
Upvotes: 0
Reputation: 5444
The data at https://api.github.com/users/userName
includes the key public_repos
that denotes the number of public repositories for the given user
Upvotes: 1