hcloud-js
Version:
A Node.js module for the Hetzner Cloud API
21 lines (16 loc) • 382 B
JavaScript
class SSHKey {
constructor (endpoint, sshKey) {
this.endpoint = endpoint
this.id = sshKey.id
this.name = sshKey.name
this.fingerprint = sshKey.fingerprint
this.publicKey = sshKey.public_key
}
changeName (name) {
return this.endpoint.changeName(this.id, name)
}
delete () {
return this.endpoint.delete(this.id)
}
}
module.exports = SSHKey