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')
    })
Ejemplo n.º 2
0
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'],
        }
    })
Ejemplo n.º 3
0
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'],
        }
    })
Ejemplo n.º 4
0
def confirmed():
    return jsonify(get_data('confirmed'))
Ejemplo n.º 5
0
def recovered():
    return jsonify(get_data('recovered'))
Ejemplo n.º 6
0
def deaths():
    return jsonify(get_data('deaths'))