phillbaker / digitalocean-node

Unofficial node client for the v2 DigitalOcean API
http://phillbaker.github.io/digitalocean-node
MIT License
67 stars 16 forks source link

Actions on volumes by name instead of ID #11

Closed omgimanerd closed 6 years ago

omgimanerd commented 7 years ago

Will this be implemented in the future? Would you be open to accepting a pull request with this implemented?

phillbaker commented 7 years ago

I haven't started on this, a PR would be great!

omgimanerd commented 7 years ago

In the interest of backward-compatibility, I'll make the new methods:

It might take me a while to look through the codebase and understand it :)

phillbaker commented 7 years ago

Ah, so the getByName is actually just a variation on list(), it just accepts the name as a query param, similar to the listing images by types. That's documented here: https://github.com/phillbaker/digitalocean-node/#image-resource. So no need to implement a separate function for that one.