ahmadawais / corona-cli

🦠 Track the Coronavirus disease (COVID-19) in the command line. Worldwide for all countries, for one country, and the US States. Fast response time (< 100ms). https://x.com/MrAhmadAwais
https://NodeCLI.com
MIT License
1.85k stars 191 forks source link

Add "last updated" date to data returned from REST endpoint #18

Closed smbyers closed 4 years ago

smbyers commented 4 years ago

Include the date when the data was last updated in the response from the REST endpoint at ttps://corona.lmao.ninja

floturcocantsee commented 4 years ago

Pull #20 adds this functionality at the end of the program's output. @smbyers

smbyers commented 4 years ago

I was interested in seeing the last updated from data source (https://corona.lmao.ninja) endpoint that is called by the CLI to understand when that data point came in. It may also be valuable to see when the CLI was called but that does not tell the age of the actual data that is from the endpoint.

floturcocantsee commented 4 years ago

@smbyers the code gets the updated time from the API at this endpoint: https://corona.lmao.ninja/all. Most of the code is just formatting and converting it out of the UNIX time stamp.

smbyers commented 4 years ago

@floturcocantsee I had been looking specifically by country and did not see a date. I guess technically the date at the /all endpoint would be the last updated for all the data (meaning data does not come in at different times per country).

floturcocantsee commented 4 years ago

There is the endpoint provided for the data from John Hopkins University: https://corona.lmao.ninja/jhucsse. Problem is I don't know if the data provided there is actually related to what the /countries endpoint produces.

ahmadawais commented 4 years ago

🐛 FIXED

🔗 https://github.com/ahmadawais/corona-cli/releases/tag/3.3.0 🔗 https://www.npmjs.com/package/corona-cli