Closed karthik closed 10 years ago
Probably should return $droplets
- I think it's reasonable to return a list of length 0 when you have no running droplets.
Okay, so return $droplets
and perhaps a message stating no droplets ?
I don't think you should have any message.
In fact, I think the general pattern for all API functions should be that do_GET()
handles the status message (if needed), and the API function only returns the component of the list that's actually informative.
Okay, no message it is
In fact, I think the general pattern for all API functions should be that do_GET() handles the status message (if needed), and the API function only returns the component of the list that's actually informative.
I agree here and an list of len 0 sounds fine by me. I don't disagree here. In general I agree that API calls should return easy to parse (in R) objects and I can imagine one can check to see if droplets are running and act accordingly (either kill or spin up more). But in the spirit of returning user friendly error messages and warnings (quite like asserthat), returning $droplets
is better than the current return object.
instead of a list. When I have no running droplets: