[Note] A GitHub's public APIs that retrieve repository information and commits, save the data in a persistent store (am using Postgres), and continuously monitor the repository for changes (am using Cronjob).
# development
$ yarn dev
# production mode
$ yarn start
http://localhost:9100/api/v1
GET
/repo/fresh/{owner}/{repo}
(Fetches repo and its commits from Git hub database)
name |
status |
type |
description |
owner |
required |
parameter (String) |
Owner of the repo |
repo |
required |
parameter (String) |
Name of the repo |
page |
Optional |
query string (String) |
Page to start paginating in the commits |
date |
Optional |
query string (String) |
the date to start fetching the commits |
http code |
content-type |
response |
201 |
text/plain;charset=UTF-8 |
successfully |
500 |
application/json |
{"code":"500","message":"Bad Request"} |
curl -X POST -H "Content-Type: application/json" --data @post.json http://localhost:9100/api/v1/repo/fresh/chubukas/pageme
GET
/repo/stored/{name}
(Fetch stored repo from database)
name |
status |
type |
description |
name |
required |
parameter (String) |
Name of the repo |
page |
Optional |
query string (String) |
Page to start paginating in the commits |
date |
Optional |
query string (String) |
the date to start fetching the commits |
http code |
content-type |
response |
302 |
text/plain;charset=UTF-8 |
successfully |
500 |
application/json |
{"code":"500","message":"Bad Request"} |
curl -X POST -H "Content-Type: application/json" --data @post.json http://localhost:9100/api/v1/repo/stored/pageme
GET
/commit/repo/{repoName}
(Fetch commits from a particular repo from database)
name |
status |
type |
description |
repoName |
required |
parameter (String) |
Name of the repo |
page |
Optional |
query string (String) |
Page to start paginating in the commits |
date |
Optional |
query string (String) |
the date to start fetching the commits |
http code |
content-type |
response |
302 |
text/plain;charset=UTF-8 |
successfully |
500 |
application/json |
{"code":"500","message":"Bad Request"} |
curl -X POST -H "Content-Type: application/json" --data @post.json http://localhost:9100/api/v1/commit/repo/pageme
GET
/commit/top-authors
(Fetch top authors from all commits in database)
name |
status |
type |
description |
page |
Optional |
query string (String) |
Page to start paginating in the commits |
date |
Optional |
query string (String) |
the date to start fetching the commits |
http code |
content-type |
response |
302 |
text/plain;charset=UTF-8 |
successfully |
500 |
application/json |
{"code":"500","message":"Bad Request"} |
curl -X POST -H "Content-Type: application/json" --data @post.json http://localhost:9100/api/v1/commit/top-authors
GET
/commit/repo-top-authors/{repoName}
(Fetch top authors from commits from a particular repo in the database)
name |
status |
type |
description |
repoName |
required |
parameter (String) |
Name of the repo |
page |
Optional |
query string (String) |
Page to start paginating in the commits |
date |
Optional |
query string (String) |
the date to start fetching the commits |
http code |
content-type |
response |
302 |
text/plain;charset=UTF-8 |
successfully |
500 |
application/json |
{"code":"500","message":"Bad Request"} |
curl -X POST -H "Content-Type: application/json" --data @post.json http://localhost:9100/api/v1/commit/repo-top-authors/pageme
If you have any questions or need assistance, please reach out to our support team:
ExpressJS is MIT licensed.