Logo Count LOC

Logo Count LOC

ADD

API doc (version 0.4.2)

Description
- Tool for counting lines of code from github repositories.
- File max size 100mb

- Limit : 1 request every 5 seconds. Once reached subsequent requests will result in error 429 (too many requests) until your quota is cleared.
Endpoint - Get Lines of Code from GitHub repo
This endpoint retrieves LOC from any github repo based on programming language.
http Request : GET https://api.codetabs.com/count-loc/get?repo=username/reponame
example :
https://api.codetabs.com/count-loc/get?repo=jolav/codetabs
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
}] 
      
Endpoint - Get Lines of Code from an zipped directory
This endpoint retrieves LOC from any zipped directory
http Request : POST https://api.codetabs.com/count-loc/upload
parameter : Form Data
Content-Disposition: form-data; name="inputFile"; filename="yourRarZipFolder.zip"
response : Same as Endpoint - Get Lines of Code from GitHub repo