Can you please help me convert following command to httparty.
curl -u username:token https://api.github.com/user
I tried following but i am getting Requires authentication error.
class GitApi
include HTTParty
base_uri 'https://api.github.com'
def initialize
@auth = { :username => "username", :token => "token" }
end
def user
self.class.get("/user", @auth)
end
end