Class: AlfrescoAPI::SharedlinksApi
- Inherits:
-
Object
- Object
- AlfrescoAPI::SharedlinksApi
- Defined in:
- lib/alfresco_api/api/sharedlinks_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_shared_link(shared_link_body_create, opts = {}) ⇒ SharedLinkEntry
Create a shared link to a file Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#create_shared_link_with_http_info(shared_link_body_create, opts = {}) ⇒ Array<(SharedLinkEntry, Fixnum, Hash)>
Create a shared link to a file Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#delete_shared_link(shared_id, opts = {}) ⇒ nil
Deletes a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#delete_shared_link_with_http_info(shared_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Deletes a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#email_shared_link(shared_id, shared_link_body_email, opts = {}) ⇒ nil
Email shared link Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#email_shared_link_with_http_info(shared_id, shared_link_body_email, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Email shared link Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_shared_link(shared_id, opts = {}) ⇒ SharedLinkEntry
Get a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_shared_link_content(shared_id, opts = {}) ⇒ nil
Get shared link content Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_shared_link_content_with_http_info(shared_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get shared link content Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_shared_link_rendition(shared_id, rendition_id, opts = {}) ⇒ RenditionEntry
Get shared link rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_shared_link_rendition_content(shared_id, rendition_id, opts = {}) ⇒ nil
Get shared link rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_shared_link_rendition_content_with_http_info(shared_id, rendition_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get shared link rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_shared_link_rendition_with_http_info(shared_id, rendition_id, opts = {}) ⇒ Array<(RenditionEntry, Fixnum, Hash)>
Get shared link rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#get_shared_link_with_http_info(shared_id, opts = {}) ⇒ Array<(SharedLinkEntry, Fixnum, Hash)>
Get a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#initialize(api_client = ApiClient.default) ⇒ SharedlinksApi
constructor
A new instance of SharedlinksApi.
-
#list_shared_link_renditions(shared_id, opts = {}) ⇒ RenditionPaging
List renditions for a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#list_shared_link_renditions_with_http_info(shared_id, opts = {}) ⇒ Array<(RenditionPaging, Fixnum, Hash)>
List renditions for a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#list_shared_links(opts = {}) ⇒ SharedLinkPaging
List shared links Note: this endpoint is available in Alfresco 5.2 and newer versions.
-
#list_shared_links_with_http_info(opts = {}) ⇒ Array<(SharedLinkPaging, Fixnum, Hash)>
List shared links Note: this endpoint is available in Alfresco 5.2 and newer versions.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SharedlinksApi
Returns a new instance of SharedlinksApi.
19 20 21 |
# File 'lib/alfresco_api/api/sharedlinks_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/sharedlinks_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_shared_link(shared_link_body_create, opts = {}) ⇒ SharedLinkEntry
Create a shared link to a file Note: this endpoint is available in Alfresco 5.2 and newer versions. Create a shared link to the file nodeId in the request body. Also, an optional expiry date could be set, so the shared link would become invalid when the expiry date is reached. For example: “‘JSON { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-3333333333", "expiresAt": "2017-03-23T23:00:00.000+0000" } “` Note: You can create shared links to more than one file specifying a list of **nodeId**s in the JSON body like this: “`JSON [ { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-4444444444" }, { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-5555555555" } ] “` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: “`JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } “`
30 31 32 33 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 30 def create_shared_link(shared_link_body_create, opts = {}) data, _status_code, _headers = create_shared_link_with_http_info(shared_link_body_create, opts) return data end |
#create_shared_link_with_http_info(shared_link_body_create, opts = {}) ⇒ Array<(SharedLinkEntry, Fixnum, Hash)>
Create a shared link to a file Note: this endpoint is available in Alfresco 5.2 and newer versions. Create a shared link to the file nodeId in the request body. Also, an optional expiry date could be set, so the shared link would become invalid when the expiry date is reached. For example: ```JSON { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-3333333333", "expiresAt": "2017-03-23T23:00:00.000+0000" } ``` Note: You can create shared links to more than one file specifying a list of **nodeId**s in the JSON body like this: ```JSON [ { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-4444444444" }, { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-5555555555" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } ```
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 82 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 42 def create_shared_link_with_http_info(shared_link_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.create_shared_link ..." end # verify the required parameter 'shared_link_body_create' is set if @api_client.config.client_side_validation && shared_link_body_create.nil? fail ArgumentError, "Missing the required parameter 'shared_link_body_create' when calling SharedlinksApi.create_shared_link" end # resource path local_var_path = "/shared-links" # query parameters query_params = {} query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 = @api_client.object_to_http_body(shared_link_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, :return_type => 'SharedLinkEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SharedlinksApi#create_shared_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_shared_link(shared_id, opts = {}) ⇒ nil
Deletes a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Deletes the shared link with identifier sharedId.
89 90 91 92 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 89 def delete_shared_link(shared_id, opts = {}) delete_shared_link_with_http_info(shared_id, opts) return nil end |
#delete_shared_link_with_http_info(shared_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Deletes a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Deletes the shared link with identifier sharedId.
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/alfresco_api/api/sharedlinks_api.rb', line 99 def delete_shared_link_with_http_info(shared_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.delete_shared_link ..." end # verify the required parameter 'shared_id' is set if @api_client.config.client_side_validation && shared_id.nil? fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.delete_shared_link" end # resource path local_var_path = "/shared-links/{sharedId}".sub('{' + 'sharedId' + '}', shared_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(:DELETE, 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: SharedlinksApi#delete_shared_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#email_shared_link(shared_id, shared_link_body_email, opts = {}) ⇒ nil
Email shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Sends email with app-specific url including identifier sharedId. The client and recipientEmails properties are mandatory in the request body. For example, to email a shared link with minimum info: “‘JSON { "client": "myClient", "recipientEmails": ["[email protected]", "[email protected]"] } “` A plain text message property can be optionally provided in the request body to customise the sent email. Also, a locale property can be optionally provided in the request body to send the emails in a particular language (if the locale is supported by Alfresco). For example, to email a shared link with a messages and a locale: “`JSON { "client": "myClient", "recipientEmails": ["[email protected]", "[email protected]"], "message": "myMessage", "locale":"en-GB" } “` Note: The client must be registered before you can send a shared link email. See [server documentation]. However, out-of-the-box share is registered as a default client, so you could pass share as the client name: “`JSON { "client": "share", "recipientEmails": ["[email protected]"] } “`
144 145 146 147 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 144 def email_shared_link(shared_id, shared_link_body_email, opts = {}) email_shared_link_with_http_info(shared_id, shared_link_body_email, opts) return nil end |
#email_shared_link_with_http_info(shared_id, shared_link_body_email, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Email shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Sends email with app-specific url including identifier sharedId. The client and recipientEmails properties are mandatory in the request body. For example, to email a shared link with minimum info: ```JSON { "client": "myClient", "recipientEmails": ["[email protected]", "[email protected]"] } ``` A plain text message property can be optionally provided in the request body to customise the sent email. Also, a locale property can be optionally provided in the request body to send the emails in a particular language (if the locale is supported by Alfresco). For example, to email a shared link with a messages and a locale: ```JSON { "client": "myClient", "recipientEmails": ["[email protected]", "[email protected]"], "message": "myMessage", "locale":"en-GB" } ``` Note: The client must be registered before you can send a shared link email. See [server documentation]. However, out-of-the-box share is registered as a default client, so you could pass share as the client name: ```JSON { "client": "share", "recipientEmails": ["[email protected]"] } ```
155 156 157 158 159 160 161 162 163 164 165 166 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 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 155 def email_shared_link_with_http_info(shared_id, shared_link_body_email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.email_shared_link ..." end # verify the required parameter 'shared_id' is set if @api_client.config.client_side_validation && shared_id.nil? fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.email_shared_link" end # verify the required parameter 'shared_link_body_email' is set if @api_client.config.client_side_validation && shared_link_body_email.nil? fail ArgumentError, "Missing the required parameter 'shared_link_body_email' when calling SharedlinksApi.email_shared_link" end # resource path local_var_path = "/shared-links/{sharedId}/email".sub('{' + 'sharedId' + '}', shared_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(shared_link_body_email) 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: SharedlinksApi#email_shared_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_shared_link(shared_id, opts = {}) ⇒ SharedLinkEntry
Get a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets minimal information for the file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.
204 205 206 207 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 204 def get_shared_link(shared_id, opts = {}) data, _status_code, _headers = get_shared_link_with_http_info(shared_id, opts) return data end |
#get_shared_link_content(shared_id, opts = {}) ⇒ nil
Get shared link content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the content of the file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.
263 264 265 266 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 263 def get_shared_link_content(shared_id, opts = {}) get_shared_link_content_with_http_info(shared_id, opts) return nil end |
#get_shared_link_content_with_http_info(shared_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get shared link content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the content of the file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 275 def get_shared_link_content_with_http_info(shared_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.get_shared_link_content ..." end # verify the required parameter 'shared_id' is set if @api_client.config.client_side_validation && shared_id.nil? fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.get_shared_link_content" end # resource path local_var_path = "/shared-links/{sharedId}/content".sub('{' + 'sharedId' + '}', shared_id.to_s) # query parameters query_params = {} query_params[:'attachment'] = opts[:'attachment'] if !opts[:'attachment'].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: SharedlinksApi#get_shared_link_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_shared_link_rendition(shared_id, rendition_id, opts = {}) ⇒ RenditionEntry
Get shared link rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets rendition information for the file with shared link identifier sharedId. This API method returns rendition information where the rendition status is CREATED, which means the rendition is available to view/download. Note: No authentication is required to call this endpoint.
322 323 324 325 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 322 def get_shared_link_rendition(shared_id, rendition_id, opts = {}) data, _status_code, _headers = get_shared_link_rendition_with_http_info(shared_id, rendition_id, opts) return data end |
#get_shared_link_rendition_content(shared_id, rendition_id, opts = {}) ⇒ nil
Get shared link rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the rendition content for file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.
385 386 387 388 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 385 def get_shared_link_rendition_content(shared_id, rendition_id, opts = {}) get_shared_link_rendition_content_with_http_info(shared_id, rendition_id, opts) return nil end |
#get_shared_link_rendition_content_with_http_info(shared_id, rendition_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get shared link rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the rendition content for file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 398 def get_shared_link_rendition_content_with_http_info(shared_id, rendition_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.get_shared_link_rendition_content ..." end # verify the required parameter 'shared_id' is set if @api_client.config.client_side_validation && shared_id.nil? fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.get_shared_link_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 SharedlinksApi.get_shared_link_rendition_content" end # resource path local_var_path = "/shared-links/{sharedId}/renditions/{renditionId}/content".sub('{' + 'sharedId' + '}', shared_id.to_s).sub('{' + 'renditionId' + '}', rendition_id.to_s) # query parameters query_params = {} query_params[:'attachment'] = opts[:'attachment'] if !opts[:'attachment'].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: SharedlinksApi#get_shared_link_rendition_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_shared_link_rendition_with_http_info(shared_id, rendition_id, opts = {}) ⇒ Array<(RenditionEntry, Fixnum, Hash)>
Get shared link rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets rendition information for the file with shared link identifier sharedId. This API method returns rendition information where the rendition status is CREATED, which means the rendition is available to view/download. Note: No authentication is required to call this endpoint.
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 333 def get_shared_link_rendition_with_http_info(shared_id, rendition_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.get_shared_link_rendition ..." end # verify the required parameter 'shared_id' is set if @api_client.config.client_side_validation && shared_id.nil? fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.get_shared_link_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 SharedlinksApi.get_shared_link_rendition" end # resource path local_var_path = "/shared-links/{sharedId}/renditions/{renditionId}".sub('{' + 'sharedId' + '}', shared_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: SharedlinksApi#get_shared_link_rendition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_shared_link_with_http_info(shared_id, opts = {}) ⇒ Array<(SharedLinkEntry, Fixnum, Hash)>
Get a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets minimal information for the file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 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 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 215 def get_shared_link_with_http_info(shared_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.get_shared_link ..." end # verify the required parameter 'shared_id' is set if @api_client.config.client_side_validation && shared_id.nil? fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.get_shared_link" end # resource path local_var_path = "/shared-links/{sharedId}".sub('{' + 'sharedId' + '}', shared_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 => 'SharedLinkEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SharedlinksApi#get_shared_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_shared_link_renditions(shared_id, opts = {}) ⇒ RenditionPaging
List renditions for a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for the file with shared link identifier sharedId. This API method returns rendition information, including the rendition id, for each rendition where the rendition status is CREATED, which means the rendition is available to view/download. Note: No authentication is required to call this endpoint.
448 449 450 451 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 448 def list_shared_link_renditions(shared_id, opts = {}) data, _status_code, _headers = list_shared_link_renditions_with_http_info(shared_id, opts) return data end |
#list_shared_link_renditions_with_http_info(shared_id, opts = {}) ⇒ Array<(RenditionPaging, Fixnum, Hash)>
List renditions for a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for the file with shared link identifier sharedId. This API method returns rendition information, including the rendition id, for each rendition where the rendition status is CREATED, which means the rendition is available to view/download. Note: No authentication is required to call this endpoint.
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 458 def list_shared_link_renditions_with_http_info(shared_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.list_shared_link_renditions ..." end # verify the required parameter 'shared_id' is set if @api_client.config.client_side_validation && shared_id.nil? fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.list_shared_link_renditions" end # resource path local_var_path = "/shared-links/{sharedId}/renditions".sub('{' + 'sharedId' + '}', shared_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 => 'RenditionPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: SharedlinksApi#list_shared_link_renditions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_shared_links(opts = {}) ⇒ SharedLinkPaging
List shared links Note: this endpoint is available in Alfresco 5.2 and newer versions. Get a list of links that the current user has read permission on source node. The list is ordered in descending modified order. Note: The list of links is eventually consistent so newly created shared links may not appear immediately.
507 508 509 510 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 507 def list_shared_links(opts = {}) data, _status_code, _headers = list_shared_links_with_http_info(opts) return data end |
#list_shared_links_with_http_info(opts = {}) ⇒ Array<(SharedLinkPaging, Fixnum, Hash)>
List shared links Note: this endpoint is available in Alfresco 5.2 and newer versions. Get a list of links that the current user has read permission on source node. The list is ordered in descending modified order. Note: The list of links is eventually consistent so newly created shared links may not appear immediately.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 |
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 521 def list_shared_links_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SharedlinksApi.list_shared_links ..." end if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling SharedlinksApi.list_shared_links, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling SharedlinksApi.list_shared_links, must be greater than or equal to 1.' end # resource path local_var_path = "/shared-links" # query parameters query_params = {} query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 => 'SharedLinkPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: SharedlinksApi#list_shared_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |