Laeyoung / COVID-19-API

API Service for tracking the COVID-19
https://ainize.ai/laeyoung/covid-19-api
MIT License
121 stars 32 forks source link

Feature Request: Add ISO code property to country's object #4

Closed yastrebovb closed 4 years ago

yastrebovb commented 4 years ago

Hi there, thanks for providing such a cool solution.

I'm currently playing around with your API trying to implement map visualization via https://www.react-simple-maps.io/.

The problem I'm facing right now is that I can't match some of the countries. It would be mad cool if you could add ISO property to the country's object for such cases as well as unification in general.

Best wishes ✌️

yastrebovb commented 4 years ago

A quick example of possible variant:

{
  provincestate: "Guizhou",
  countryregion: "Mainland China",
  ISO_A2: "CN",
  ISO_A3: "CHN",
  lastupdate: "2020-03-03T11:42:00.006Z",
  location: {
    lat: 26.8154,
    lng: 106.8748
  },
  confirmed: 146,
  deaths: 2,
  recovered: 114
},

Also, please let me know if you have time for this feature, in case if you're busy I'll be more than happy to help you out by submitting a pull request with the updated object model.

Laeyoung commented 4 years ago

Thank you for the feature request.

I am going to do it ASAP!

Laeyoung commented 4 years ago

@yastrebovb new feature has been added 😃

  {
    "provincestate": "Anhui",
    "countryregion": "Mainland China",
    "lastupdate": "2020-02-29T07:21:21.001Z",
    "confirmed": 990,
    "deaths": 6,
    "recovered": 821,
    "location": {
      "lat": 31.8257,
      "lng": 117.2264
    },
    "countrycode": {
      "iso2": "CN",
      "iso3": "CHN"
    }
  }
yastrebovb commented 4 years ago

@Laeyoung Thank you 😊