Be able to iterate through the nested JSON responses that most APIs will return
Performance Objectives
After completing this assignment, you be able to effectively use
HTTParty (or similar) for making requests
Parsed JSON responses
Details
Deliverables
A script github-stats.rb
Requirements
Running ruby github-stats.rb should:
Prompt the user for an auth token (could be passed in the environment, via ARGV, or using gets)
Prompt the user for a github organization to report on
Produce a table of contributions
Normal Mode
Get the list of all members in that organization, and then aggregate the addition, deletion and change counts (as returned from the contributors endpoint) for all public repositories for each user (note: not just contributions to repos for the organization).
The script should produce a table something like
Additions Deletions Changes
User 1 13534 2954 6249
User 2 6940 913 1603
...
(or may produce a CSV output).
Hard Mode
Save data locally so that repeated runs of the script don't need to fetch all the stats each time
Allow the user to specify a time frame and only report on commits in that time frame
Due on Feb 19 @ 09:00am
Description
Pull and aggregate commit statistics from Github
Objectives
Learning Objectives
After completing this assignment, you should…
Performance Objectives
After completing this assignment, you be able to effectively use
Details
Deliverables
github-stats.rb
Requirements
Running
ruby github-stats.rb
should:ARGV
, or usinggets
)Normal Mode
Get the list of all members in that organization, and then aggregate the
addition
,deletion
andchange
counts (as returned from the contributors endpoint) for all public repositories for each user (note: not just contributions to repos for the organization).The script should produce a table something like
(or may produce a CSV output).
Hard Mode