Techeron / fvlr_api

0 stars 2 forks source link

Flattening stats object #6

Closed honjes closed 2 months ago

honjes commented 2 months ago

I think the data in

"stats": {
  "labels": [
      "Agent",
      "Use",
      "RND",
      "Rating",
      "ACS",
      "K:D",
      "ADR",
      "KAST",
      "KPR",
      "APR",
      "FKPR",
      "FDPR",
      "K",
      "D",
      "A",
      "FK",
      "FD"
  ],
  "time": "t60",
  "times": [
      "t30",
      "t60",
      "t90",
      "tall"
  ],
  "data": [
    {
      "Agent": "omen",
      "Use": "(31)",
      "RND": "649",
      "Rating": "1.14",
      "ACS": "214.0",
      "K:D": "1.17",
      "ADR": "136.7",
      "KAST": "77%",
      "KPR": "0.77",
      "APR": "0.47",
      "FKPR": "0.11",
      "FDPR": "0.08",
      "K": "499",
      "D": "428",
      "A": "306",
      "FK": "70",
      "FD": "49"
    }
 ]
}

Maybe labels could be removed because they can be requested with .keys() function Also, time could be saved as an ENUM so times array is given by the type.

What do you think ?

Codokk commented 2 months ago

Yeah, the labels can be removed, they were there as a reference for a frontend I was building.

I have no issues using an ENUM