WORK IN PROGRESS
+---------------+
| +-----------+ |
| | Database | | --------+
| +-----------+ | <-----+ |
| | GH | | DB Processing
Cron Trigger | | Stats | | Trigger
+--------+ <------------- | +-----------+ | ------+ |
| GitHub | | | OpenWhisk | | <-------+
+--------+ -------------> | +-----------+ | ------+
Traffic Stats | | |
| | | Update Dashboard
| +-----------+ | |
| | Dashboard | | <-----+
| +-----------+ |
+---------------+
- OpenWhisk cron trigger sends request for traffic statistics to GitHub
- GitHub Returns traffic statistics
- OpenWhisk sends GitHub Statistics to database
- If database receives new statistics:
- Trigger OpenWhisk to process data
- Send newly processed data to dashboard
- Dashboard displays reports
To use the sample python script, you will need to create a personal access token with public_repo access:

Then, run example/gh_traffic.py, entering your personal access token and repo path when asked:
$ $(which python) example/gh_traffic.py
GitHub personal access token: ****************************************
GitHub repo (username_or_orgname/reponame): IBM/github-traffic-stats-collector
...
# Data Snippeted for concisity
...NOTE:
- Treat your personal access token like a password and keep it secure as such
- You will be able to pull traffic statistics for any repository you are not an admin of
- If you are not an admin, you are not able to pull traffic statistics