DigitalOceanPHP / Client

DigitalOcean API v2 client for PHP
MIT License
709 stars 205 forks source link

Fixed updating and deleting ssh keys to work with fingerprints as ids #143

Closed dmyers closed 8 years ago

dmyers commented 8 years ago

The DO v2 API says you can pass in a fingerprint for an SSH key in the API URL and in place of an API, however this library currently casts the ID as an int when I think a string would be just as sufficient to allow for passing in both an ID int or fingerprint string into the argument to support both use cases without duplicate/redundant methods (updateById and updateByFingerprint) so I've updated the update and delete methods.

https://developers.digitalocean.com/documentation/v2/#update-a-key https://developers.digitalocean.com/documentation/v2/#destroy-a-key

What do you think @yassirh?

yassirh commented 8 years ago

LGTM. I will merge it later today!

dmyers commented 8 years ago

Thanks @yassirh! Looking forward to using it in my app.

yassirh commented 8 years ago

Thanks

dmyers commented 8 years ago

@yassirh Did you change your mind on merging?

yassirh commented 8 years ago

@dmyers Just merged. thank you!

dmyers commented 8 years ago

Thanks @yassirh. I appreciate it. I'm hoping there might be another release soon. 👍