Skip to content

Instantly share code, notes, and snippets.

@bradylove
Created June 2, 2011 01:48
Show Gist options
  • Save bradylove/1003768 to your computer and use it in GitHub Desktop.
Save bradylove/1003768 to your computer and use it in GitHub Desktop.
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