Professional Documents
Culture Documents
Assignment 4
Use Postman and generate ten (10) unique API calls (using a different
route each time).
1) Get global COVID-19 totals for today, yesterday and two days ago
URL: https://disease.sh/v3/covid-19/all
Method: GET
Method: GET
3) Get COVID-19 totals for specific US State(s)
URL: https://disease.sh/v3/covid-19/states/California
Method: GET
4) Get COVID-19 totals for all continents
URL: https://disease.sh/v3/covid-19/continents
Method: GET
5) Get COVID-19 totals for a specific continent
URL: https://disease.sh/v3/covid-19/continents/ASIA?strict=true
Method: GET
Method: GET
7) Get COVID-19 totals for a specific country
URL: https://disease.sh/v3/covid-19/countries/India?strict=true
Method: GET
8) Get COVID-19 totals for a specific set of countries
URL: https://disease.sh/v3/covid-19/countries/India%2C%20Canada
Method: GET
URL: https://disease.sh/v3/covid-19/jhucsse
Method: GET
10) Get COVID-19 time series data for all states, with an entry for each day since the pandemic
began
URL: https://disease.sh/v3/covid-19/nyt/states?lastdays=30
Method: GET
Create and run Python scripts of the above
1) Get global COVID-19 totals for today, yesterday and two days ago
import requests
url = "https://disease.sh/v3/covid-19/all"
headers = {}
response = requests.request("GET", url, headers=headers)
print(response.text)
PyTest
1) test_covid_status.py
2) test_covid_states.py
3) test_covid_states_single.py
4) test_covid_contenent.py
5) test_covid_contenent_Asia.py
6) test_covid_countries.py
7) test_covid_countries_India.py
8) test_covid_countries_India_Canada
9) test_covid_jhucsse.py
10) test_covid_nyt_states.py
11) test_covid_gov.py
12) test_covid_gov_Canada
13) test_covid_apple_countries
14) test_covid_apple_countries_India
15) test_covid_apple_countries_India_Delhi.py
16) test_covid_jhucsse_country.py
17) test_covid_jhucsse_country_US.py
18) test_covid_hist.py
19) test_covid_hist_alabama.py