shiftdsm / Galavanting-Gnome

0 stars 1 forks source link

Gnome status API for front end #24

Open tegandbiscuits opened 5 years ago

tegandbiscuits commented 5 years ago

The status should be

I'm thinking both times could be the same. Maybe 8, 12, or 24 hours.

codebycliff commented 5 years ago

What value do you want returned if either of those states aren't true?

tegandbiscuits commented 5 years ago

Thinking about this a bit, it might be good to just modify the GET /locations endpoint so it returns something like this.

{
  "status": "dead" || "abandoned" || "alive",
  "locations": [
    { "lat": "100.0000", "lon": "100.0000", "published_at": "..." } // + other things
  ]
}

It might not be the most semantic, but it would let us figure the status, and where it was.

Arguably this could also just be figured on the front end as well.

codebycliff commented 5 years ago

Yeah, I like that better. Probably better off as one endpoint. I think the logic based on location will be advanced enough to keep it on the backend.

codebycliff commented 5 years ago

How large do you think the move radius should be?

tegandbiscuits commented 5 years ago

Pretty arbitrary but maybe ~2-8km (geolib uses SI)?

I think 2km would be pretty safe, so it'd probably just go with that, at least to get the logic in.