Class: IronTitan::ImagesApi
- Inherits:
-
Object
- Object
- IronTitan::ImagesApi
- Defined in:
- lib/iron_titan/api/images_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#images_get(opts = {}) ⇒ ImagesWrapper
Get all image names.
-
#images_get_with_http_info(opts = {}) ⇒ Array<(ImagesWrapper, Fixnum, Hash)>
Get all image names.
-
#images_name_get(name, opts = {}) ⇒ ImageWrapper
Get image by name.
-
#images_name_get_with_http_info(name, opts = {}) ⇒ Array<(ImageWrapper, Fixnum, Hash)>
Get image by name.
-
#initialize(api_client = ApiClient.default) ⇒ ImagesApi
constructor
A new instance of ImagesApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/iron_titan/api/images_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#images_get(opts = {}) ⇒ ImagesWrapper
Get all image names. TODO: Using images for lack of a better term. See github.com/iron-io/titan/issues/43 for discussion.
27 28 29 30 |
# File 'lib/iron_titan/api/images_api.rb', line 27 def images_get(opts = {}) data, status_code, headers = images_get_with_http_info(opts) return data end |
#images_get_with_http_info(opts = {}) ⇒ Array<(ImagesWrapper, Fixnum, Hash)>
Get all image names. TODO: Using images for lack of a better term. See github.com/iron-io/titan/issues/43 for discussion.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/iron_titan/api/images_api.rb', line 36 def images_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ImagesApi#images_get ..." end # resource path local_var_path = "/images".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ImagesWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#images_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#images_name_get(name, opts = {}) ⇒ ImageWrapper
Get image by name. NOT IMPLEMENTED YET. This gives more details about on image, such as statistics and what not.
83 84 85 86 |
# File 'lib/iron_titan/api/images_api.rb', line 83 def images_name_get(name, opts = {}) data, status_code, headers = images_name_get_with_http_info(name, opts) return data end |
#images_name_get_with_http_info(name, opts = {}) ⇒ Array<(ImageWrapper, Fixnum, Hash)>
Get image by name. NOT IMPLEMENTED YET. This gives more details about on image, such as statistics and what not.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/iron_titan/api/images_api.rb', line 93 def images_name_get_with_http_info(name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ImagesApi#images_name_get ..." end # verify the required parameter 'name' is set fail "Missing the required parameter 'name' when calling images_name_get" if name.nil? # resource path local_var_path = "/images/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ImageWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#images_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |