Created
December 11, 2016 11:06
-
-
Save nitincoded/dcada9a08b826af394daffe14be75139 to your computer and use it in GitHub Desktop.
Read GitHub Events (Ruby sample code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'zlib' | |
require 'yajl' | |
gz = open('http://data.githubarchive.org/2015-01-01-12.json.gz') #Date range 1-12 | |
js = Zlib::GzipReader.new(gz).read | |
Yajl::Parser.parse(js) do |event| | |
print event | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment