Skip to content

MatthewMSaucedo/CoronaStateInfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoronaVirus State Info

Purpose


API

(GET) getHistoricalData(state: string, daysBack: number): StateCoronaInformation
This endpoint returns the cumulative number of CoronaVirus cases and deaths for each day in the range of
daysBack to the time of calling the API.


Models

StateCoronaInformation {
    name: string,
    days: DailyCoronaInformation[]
}

DailyCoronaInformation {
    mm/dd-1/yy: Day,
    mm/dd-2/yy: Day,
    ...
    mm/dd-{daysBack}/yy: Day
}

Day {
    cases: number,
    deaths: number
}

Run and Query Application

To run this application, perform the following actions.

  • Clone this repo
  • Navigate to the repo folder via the command line
  • Assuming you have Node installed (if not, go do that!): run `npm i`
  • Run `npm run start`

This application will now be running locally. To query the endpoint, use the following url:

  • localhost:3000/coronastateinfo/gethistoricaldata
  • Simply perform an HTTP GET request, with the request body detailed in the API section of this documentation. A curl request would look like the following:

    curl --location --request GET 'http://localhost:3000/coronastateinfo/gethistoricaldata' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    	"state": "florida",
    	"daysBack": 2
    }'
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published