Reputation: 758
How do i get the github repository language tags. Is there any api to get those tags. i refereed there developer docs but no solution can anybody help on this.
Upvotes: 2
Views: 1596
Reputation: 34733
It's a bit hidden in the examples, but:
https://api.github.com/repos/<username>/<reponame>/languages
Gives a list of languages used, like this:
{
"Java": 123721,
"CSS": 1334
}
You get the URL from a repository get as explained here: https://developer.github.com/v3/repos/#get - it is the "languages_url"
, but unfortunately it returns an empty object for the hello world example that is used in the documentation. If you try it for an actual repository, it works.
Upvotes: 8