The Light at the End of the Tunnel — CLI Project: Date Night Trivia

uri = URI("https://opentdb.com/api.php?amount=20")
uri = URI('https://example.com/')
Net::HTTP.get(uri) # => String
trivia_array = JSON.parse(response)["results"]
trivia_array.each do |trivia|
Trivia.new(trivia)
end

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store