Class: DigitalOcean::Resource::SSHKey
- Inherits:
-
Base
- Object
- Base
- DigitalOcean::Resource::SSHKey
show all
- Defined in:
- lib/digital_ocean/resource/ssh_key.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#add(args) ⇒ Object
16
17
18
19
20
|
# File 'lib/digital_ocean/resource/ssh_key.rb', line 16
def add(args)
@connection.get('/ssh_keys/new') do |query|
apply_params(query, args)
end.body
end
|
#delete(id) ⇒ Object
12
13
14
|
# File 'lib/digital_ocean/resource/ssh_key.rb', line 12
def delete(id)
@connection.get("/ssh_keys/#{id}/destroy").body
end
|
#edit(id, args) ⇒ Object
22
23
24
25
26
|
# File 'lib/digital_ocean/resource/ssh_key.rb', line 22
def edit(id, args)
@connection.get("/ssh_keys/#{id}/edit") do |query|
apply_params(query, args)
end.body
end
|
#list ⇒ Object
4
5
6
|
# File 'lib/digital_ocean/resource/ssh_key.rb', line 4
def list
@connection.get('/ssh_keys').body
end
|
#show(id) ⇒ Object
8
9
10
|
# File 'lib/digital_ocean/resource/ssh_key.rb', line 8
def show(id)
@connection.get("/ssh_keys/#{id}").body
end
|