def recovered(): return jsonify({ 'source': 'https://github.com/ManjurHKhan/coronavirus-tracker-api', 'comment': 'Forked from https://github.com/ExpDev07/coronavirus-tracker-api', 'recovered': get_data('recovered') })
def all(): # Get all the categories. confirmed = get_data('confirmed') deaths = get_data('deaths') recovered = get_data('recovered') return jsonify({ # Data. 'confirmed': confirmed, 'deaths': deaths, 'recovered': recovered, # Latest. 'latest': { 'confirmed': confirmed['latest'], 'deaths': deaths['latest'], 'recovered': recovered['latest'], } })
def all(): # Get all the categories. confirmed = get_data('confirmed') deaths = get_data('deaths') recovered = get_data('recovered') return jsonify({ # Data. 'confirmed': confirmed, 'deaths': deaths, 'recovered': recovered, 'source': 'https://github.com/ManjurHKhan/coronavirus-tracker-api', 'comment': 'Forked from https://github.com/ExpDev07/coronavirus-tracker-api', # Latest. 'latest': { 'confirmed': confirmed['latest'], 'deaths': deaths['latest'], 'recovered': recovered['latest'], } })
def confirmed(): return jsonify(get_data('confirmed'))
def recovered(): return jsonify(get_data('recovered'))
def deaths(): return jsonify(get_data('deaths'))