Class: DockerCloud::RegistryAPI

Inherits:
API
  • Object
show all
Defined in:
lib/docker_cloud/api/registry_api.rb

Constant Summary collapse

TYPE =
'Registry'.freeze

Constants inherited from API

API::API_VERSION, API::BASE_API_PATH

Instance Attribute Summary

Attributes inherited from API

#client, #headers, #type

Instance Method Summary collapse

Methods inherited from API

#get_from_uri, #http_delete, #http_get, #http_patch, #http_post, #initialize, #parse, #url

Constructor Details

This class inherits a constructor from DockerCloud::API

Instance Method Details

#all(params = {}) ⇒ Object



9
10
11
12
# File 'lib/docker_cloud/api/registry_api.rb', line 9

def all(params = {})
  response = http_get(resource_url, params)
  format_object(response, TYPE)
end

#get(host) ⇒ Object



14
15
16
17
# File 'lib/docker_cloud/api/registry_api.rb', line 14

def get(host)
  response = http_get(resource_url(host))
  format_object(response, TYPE)
end

#resource_url(host = '') ⇒ Object



5
6
7
# File 'lib/docker_cloud/api/registry_api.rb', line 5

def resource_url(host = '')
  "/registry/#{host}"
end