Skip to content

Instantly share code, notes, and snippets.

@astagi
Created September 27, 2018 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astagi/10c0d78ed43a140d4f0d1fa563ce842d to your computer and use it in GitHub Desktop.
Save astagi/10c0d78ed43a140d4f0d1fa563ce842d to your computer and use it in GitHub Desktop.
Try ansa gem
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