I needed something similar. After trial and error and multiple google searches I came away with this curl method:
curl -s "https://api.github.com/users/GITHUB_USERNAME/events" | jq '[.[] | select(.type=="PushEvent") | .payload.commits[].url] | .[]' | xargs curl -s | jq '[.files[].additions, .files[].deletions] | add'
parsing it with jq was what really helped.