Class: Dock::Api::Registries
- Inherits:
-
Base
- Object
- Base
- Dock::Api::Registries
show all
- Defined in:
- lib/dock/api/endpoints/registries.rb
Constant Summary
collapse
- NAMESPACE =
'/registries'
Class Method Summary
collapse
Methods inherited from Base
connection, delete, get, patch, post
Class Method Details
.create(attrs = {}) ⇒ Object
21
22
23
|
# File 'lib/dock/api/endpoints/registries.rb', line 21
def create(attrs = {})
post(NAMESPACE, attrs)
end
|
.destroy(id) ⇒ Object
17
18
19
|
# File 'lib/dock/api/endpoints/registries.rb', line 17
def destroy(id)
delete("#{NAMESPACE}/#{id}")
end
|
.find(id) ⇒ Object
13
14
15
|
# File 'lib/dock/api/endpoints/registries.rb', line 13
def find(id)
get("#{NAMESPACE}/#{id}")
end
|
.list ⇒ Object
9
10
11
|
# File 'lib/dock/api/endpoints/registries.rb', line 9
def list
get(NAMESPACE)
end
|
.revoke(id, credential_ids:) ⇒ Object
25
26
27
|
# File 'lib/dock/api/endpoints/registries.rb', line 25
def revoke(id, credential_ids:)
post("#{NAMESPACE}/#{id}", action: :revoke, credentialIds: credential_ids)
end
|
.unrevoke(id, credential_ids:) ⇒ Object
29
30
31
|
# File 'lib/dock/api/endpoints/registries.rb', line 29
def unrevoke(id, credential_ids:)
post("#{NAMESPACE}/#{id}", action: :unrevoke, credentialIds: credential_ids)
end
|