pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
155 stars 24 forks source link

Remove `do_` prefix from droplets functions #2

Closed hadley closed 10 years ago

sckott commented 10 years ago

Yeah, probably not needed, though some fxns I worry may conflict like keys or regions

hadley commented 10 years ago

I'd make them start with droplet_ and take a droplet as first argument. e.g. do_droplets_power_on would become:

droplet_power_on <- function(droplet, ...) {
  path <- sprintf('droplets/%s/power_on', droplet$id)
  do_GET(path, ...)
}
hadley commented 10 years ago

To make the droplets functions even more useful, they should always return a droplet object. Then you could use %>% to pipe multiple operations together.

sckott commented 10 years ago

Starting with droplet makes sense. Good idea to facilitate use of %>%

sckott commented 10 years ago

closing this, opened new issue in #10