Created
September 27, 2018 12:01
-
-
Save astagi/10c0d78ed43a140d4f0d1fa563ce842d to your computer and use it in GitHub Desktop.
Try ansa gem
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 'ansa' | |
puts "\n⚽️ SOCCER NEWS ⚽️\n\n" | |
begin | |
Ansa::get_soccer_news.each do |news| | |
puts "🥅 [#{news.date.strftime("%d/%m %H:%M:%S")}] #{news.title}" | |
puts news.description | |
puts "\n" | |
end | |
rescue Ansa::AnsaError | |
puts "🚨 Something went wrong, news not available" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment