Created
June 2, 2011 01:48
-
-
Save bradylove/1003768 to your computer and use it in GitHub Desktop.
This file contains 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 "typhoeus" | |
require "json" | |
require "./Constants" | |
include Constants | |
include Typhoeus | |
class Github | |
def auth | |
request = Request.new("https://api.github.com", | |
:username => USERNAME, | |
:password => PASSWORD) | |
hydra = Hydra.new | |
hydra.queue(request) | |
hydra.run | |
response = request.response | |
puts response.code | |
puts response.time | |
puts response.headers | |
puts response.headers_hash | |
puts response.body | |
end | |
end | |
github = Github.new | |
github.auth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment