class Covidstats::API

Public Class Methods

get_reports() click to toggle source
# File lib/covidstats/api.rb, line 2
def self.get_reports
 site = HTTParty.get("https://covid19api.io/api/v1/AllReports")
 reports = site["reports"]
 reports = reports[0]["table"][0] #array of hashes that are all the reports/stats per country
end