aj0strow / carbonmap

Carbon Savings Energy Map
0 stars 0 forks source link

GET /buildings #1

Open jacobpdq opened 10 years ago

jacobpdq commented 10 years ago
[ { building } ]

2

aj0strow commented 10 years ago

Tried it out locally, and content-length: 17006, so it weighs around 17006 / 1024 = 16.6 kB. Would it be possible to lose any fields for the full collection?

Maybe it's not an issue? I've never sent back a large JSON response like this before.

jacobpdq commented 10 years ago

We could lose everything except for the coordinates and the change in energy- that's all we need for the map's initial view. After that I can query a single building, no problem.

jacobpdq commented 10 years ago

We'll also need the total savings, though (which is displayed on the side)..

aj0strow commented 10 years ago

What about:

{
  buildings: [ { building } ],
  savings: '500.00'
}
jacobpdq commented 10 years ago

As in the total savings? Sure.

4-09-10, at 12:47 PM, AJ notifications@github.com wrote:

What about:

{ buildings: [ { building } ], savings: '500.00' } — Reply to this email directly or view it on GitHub.

aj0strow commented 10 years ago

Much better at 2.8 kB now.