Page weight formatting
sarahfossheim opened this issue · 2 comments
sarahfossheim commented
@maceto could you format the data the same as the other endpoints?
Current behavior
Currently it returns the data the same as in the JSON files:
[{
"date": "2023-07-01",
"technology": "WordPress",
"rank": "ALL",
"geo": "ALL",
"client": "desktop",
"median_bytes_total": "2600099",
"median_bytes_js": "652651",
"median_bytes_image": "1048110"
}]
Desired behavior
Something similar to the other endpoints, see for example: #4
Example format:
[{
"date": "2023-07-01",
"technology": "WordPress",
"rank": "ALL",
"geo": "ALL",
"pageWeight": [{ // Or "page-weight"
"name": "total", // Total, JS, Image
"mobile": {
"median_bytes": 1234
},
"desktop": {
"median_bytes": 567
},
}]
}]
maceto commented
Hello @sarahfossheim
I will work on this with @rviscomi I think the BQ query is not returning the correct data.
Thank you
rviscomi commented
Updated the query in #10 (comment) to return the expected format