rodrilima / corona-analytic-api

API that generates information about coronavirus (COVID19) cases in the states of Brazil and other parts of the world
https://api.coronaanalytic.com
GNU General Public License v3.0
169 stars 9 forks source link

Added history inside json response #5

Closed raphaelkieling closed 4 years ago

raphaelkieling commented 4 years ago

I added a attribute called history (to not break current users) that show the history by date.

brazil": {
    "date": "16/03/2020",
    "time": "15:50",
    "values": [
      {
        "uid": 11,
        "state": "Rondônia (RO)",
        "cases": 0,
        "deaths": 0,
        "suspects": 2,
        "refuses": 1,
        "broadcast": false,
        "comments": "",
+      "history": [
          {
            "date": "02/03/2020",
            "state_uid": 11,
            "cases": 0,
            "deaths": 0,
            "suspects": 0,
            "refuses": 0,
            "broadcast": false,
            "comments": ""
          },

This is very good to use on history charts or to track how much increased per day

rodrilima commented 4 years ago

Amazing. I'll check later and if it's all right I'll do the merge. Thanks !!

victorjordan95 commented 4 years ago

That's exactly what I was going to suggest! :D

raphaelkieling commented 4 years ago

Yes i can, i'll fix that later

raphaelkieling commented 4 years ago

I change:

raphaelkieling commented 4 years ago

i think that is important have a route to get history from a unique state or country but this can be on another issue to not grow up this

rodrilima commented 4 years ago

Nice. Thanks !!