Class: AlfrescoAPI::RenditionsApi
- Inherits:
-
Object
- Object
- AlfrescoAPI::RenditionsApi
- Defined in:
- lib/alfresco_api/api/renditions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_rendition(node_id, rendition_body_create, opts = {}) ⇒ nil
Create rendition Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#create_rendition_with_http_info(node_id, rendition_body_create, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create rendition Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_rendition(node_id, rendition_id, opts = {}) ⇒ RenditionEntry
Get rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_rendition_content(node_id, rendition_id, opts = {}) ⇒ nil
Get rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_rendition_content_with_http_info(node_id, rendition_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_rendition_with_http_info(node_id, rendition_id, opts = {}) ⇒ Array<(RenditionEntry, Fixnum, Hash)>
Get rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#initialize(api_client = ApiClient.default) ⇒ RenditionsApi
constructor
A new instance of RenditionsApi.
-
#list_renditions(node_id, opts = {}) ⇒ RenditionPaging
List renditions Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#list_renditions_with_http_info(node_id, opts = {}) ⇒ Array<(RenditionPaging, Fixnum, Hash)>
List renditions Note: this endpoint is available in Alfresco 5.2 and newer versions.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RenditionsApi
Returns a new instance of RenditionsApi.
19 20 21 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_rendition(node_id, rendition_body_create, opts = {}) ⇒ nil
Create rendition Note: this endpoint is available in Alfresco 5.2 and newer versions. An asynchronous request to create a rendition for file nodeId. The rendition is specified by name id in the request body: “‘JSON { "id":"doclib" } “`
29 30 31 32 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 29 def create_rendition(node_id, rendition_body_create, opts = {}) create_rendition_with_http_info(node_id, rendition_body_create, opts) return nil end |
#create_rendition_with_http_info(node_id, rendition_body_create, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create rendition Note: this endpoint is available in Alfresco 5.2 and newer versions. An asynchronous request to create a rendition for file nodeId. The rendition is specified by name id in the request body: ```JSON { "id":"doclib" } ```
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 77 78 79 80 81 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 40 def create_rendition_with_http_info(node_id, rendition_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RenditionsApi.create_rendition ..." end # verify the required parameter 'node_id' is set if @api_client.config.client_side_validation && node_id.nil? fail ArgumentError, "Missing the required parameter 'node_id' when calling RenditionsApi.create_rendition" end # verify the required parameter 'rendition_body_create' is set if @api_client.config.client_side_validation && rendition_body_create.nil? fail ArgumentError, "Missing the required parameter 'rendition_body_create' when calling RenditionsApi.create_rendition" end # resource path local_var_path = "/nodes/{nodeId}/renditions".sub('{' + 'nodeId' + '}', node_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(rendition_body_create) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: RenditionsApi#create_rendition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_rendition(node_id, rendition_id, opts = {}) ⇒ RenditionEntry
Get rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the rendition information for renditionId of file nodeId.
89 90 91 92 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 89 def get_rendition(node_id, rendition_id, opts = {}) data, _status_code, _headers = get_rendition_with_http_info(node_id, rendition_id, opts) return data end |
#get_rendition_content(node_id, rendition_id, opts = {}) ⇒ nil
Get rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the rendition content for renditionId of file nodeId.
153 154 155 156 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 153 def get_rendition_content(node_id, rendition_id, opts = {}) get_rendition_content_with_http_info(node_id, rendition_id, opts) return nil end |
#get_rendition_content_with_http_info(node_id, rendition_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the rendition content for renditionId of file nodeId.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 167 def get_rendition_content_with_http_info(node_id, rendition_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RenditionsApi.get_rendition_content ..." end # verify the required parameter 'node_id' is set if @api_client.config.client_side_validation && node_id.nil? fail ArgumentError, "Missing the required parameter 'node_id' when calling RenditionsApi.get_rendition_content" end # verify the required parameter 'rendition_id' is set if @api_client.config.client_side_validation && rendition_id.nil? fail ArgumentError, "Missing the required parameter 'rendition_id' when calling RenditionsApi.get_rendition_content" end # resource path local_var_path = "/nodes/{nodeId}/renditions/{renditionId}/content".sub('{' + 'nodeId' + '}', node_id.to_s).sub('{' + 'renditionId' + '}', rendition_id.to_s) # query parameters query_params = {} query_params[:'attachment'] = opts[:'attachment'] if !opts[:'attachment'].nil? query_params[:'placeholder'] = opts[:'placeholder'] if !opts[:'placeholder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: RenditionsApi#get_rendition_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_rendition_with_http_info(node_id, rendition_id, opts = {}) ⇒ Array<(RenditionEntry, Fixnum, Hash)>
Get rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the rendition information for renditionId of file nodeId.
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 137 138 139 140 141 142 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 100 def get_rendition_with_http_info(node_id, rendition_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RenditionsApi.get_rendition ..." end # verify the required parameter 'node_id' is set if @api_client.config.client_side_validation && node_id.nil? fail ArgumentError, "Missing the required parameter 'node_id' when calling RenditionsApi.get_rendition" end # verify the required parameter 'rendition_id' is set if @api_client.config.client_side_validation && rendition_id.nil? fail ArgumentError, "Missing the required parameter 'rendition_id' when calling RenditionsApi.get_rendition" end # resource path local_var_path = "/nodes/{nodeId}/renditions/{renditionId}".sub('{' + 'nodeId' + '}', node_id.to_s).sub('{' + 'renditionId' + '}', rendition_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] 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 => 'RenditionEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: RenditionsApi#get_rendition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_renditions(node_id, opts = {}) ⇒ RenditionPaging
List renditions Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for each rendition of the the file nodeId, including the rendition id. Each rendition returned has a status: CREATED means it is available to view or download, NOT_CREATED means the rendition can be requested. You can use the where parameter to filter the returned renditions by status. For example, the following where clause will return just the CREATED renditions: “‘ (status=’CREATED’) “‘
219 220 221 222 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 219 def list_renditions(node_id, opts = {}) data, _status_code, _headers = list_renditions_with_http_info(node_id, opts) return data end |
#list_renditions_with_http_info(node_id, opts = {}) ⇒ Array<(RenditionPaging, Fixnum, Hash)>
List renditions Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for each rendition of the the file nodeId, including the rendition id. Each rendition returned has a status: CREATED means it is available to view or download, NOT_CREATED means the rendition can be requested. You can use the where parameter to filter the returned renditions by status. For example, the following where clause will return just the CREATED renditions: ``` (status='CREATED') ```
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/alfresco_api/api/renditions_api.rb', line 230 def list_renditions_with_http_info(node_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RenditionsApi.list_renditions ..." end # verify the required parameter 'node_id' is set if @api_client.config.client_side_validation && node_id.nil? fail ArgumentError, "Missing the required parameter 'node_id' when calling RenditionsApi.list_renditions" end # resource path local_var_path = "/nodes/{nodeId}/renditions".sub('{' + 'nodeId' + '}', node_id.to_s) # query parameters query_params = {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] 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 => 'RenditionPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: RenditionsApi#list_renditions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |