curl Request : add -L flag
curl -L https://api.codetabs.com/v1/loc?source=username/reponame
http Request :
GET https://api.codetabs.com/v1/loc?github=username/reponame
GET https://api.codetabs.com/v1/loc?gitlab=username/reponame
Select branchIf you want a different branch than master
https://api.codetabs.com/v1/loc?SOURCE=USERNAME/REPONAME&branch=branchName
Ignore files or directoriesCan ignore files or directories using param ignored
https://api.codetabs.com/v1/loc?SOURCE=USERNAME/REPONAME&ignored=DIRNAME1,DIRNAME2,FILENAME
example :
https://api.codetabs.com/v1/loc?github=jolav/betazone
https://api.codetabs.com/v1/loc?gitlab=jolav/chuletas
https://api.codetabs.com/v1/loc?github=imageMagick/imageMagick&branch=gh-pages
https://api.codetabs.com/v1/loc?github=jolav/betazone&ignored=www,main.go
response :
[{
"language": "JavaScript",
"files": 1,
"lines": 176,
"blanks": 14,
"comments": 6,
"linesOfCode": 156
},
... more languages
{
"language": "Total",
"files": 8,
"lines": 921,
"blanks": 148,
"comments": 46,
"linesOfCode": 743
}]