Class: AlfrescoAPI::TagsApi
- Inherits:
-
Object
- Object
- AlfrescoAPI::TagsApi
- Defined in:
- lib/alfresco_api/api/tags_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_tag_for_node(node_id, tag_body_create, opts = {}) ⇒ TagEntry
Create a tag for a node Creates a tag on the node nodeId.
-
#create_tag_for_node_with_http_info(node_id, tag_body_create, opts = {}) ⇒ Array<(TagEntry, Fixnum, Hash)>
Create a tag for a node Creates a tag on the node nodeId.
-
#delete_tag_from_node(node_id, tag_id, opts = {}) ⇒ nil
Delete a tag from a node Deletes tag tagId from node nodeId.
-
#delete_tag_from_node_with_http_info(node_id, tag_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a tag from a node Deletes tag tagId from node nodeId.
-
#get_tag(tag_id, opts = {}) ⇒ TagEntry
Get a tag Get a specific tag with tagId.
-
#get_tag_with_http_info(tag_id, opts = {}) ⇒ Array<(TagEntry, Fixnum, Hash)>
Get a tag Get a specific tag with tagId.
-
#initialize(api_client = ApiClient.default) ⇒ TagsApi
constructor
A new instance of TagsApi.
-
#list_tags(opts = {}) ⇒ TagPaging
List tags Gets a list of tags in this repository.
-
#list_tags_for_node(node_id, opts = {}) ⇒ TagPaging
List tags for a node Gets a list of tags for node nodeId.
-
#list_tags_for_node_with_http_info(node_id, opts = {}) ⇒ Array<(TagPaging, Fixnum, Hash)>
List tags for a node Gets a list of tags for node nodeId.
-
#list_tags_with_http_info(opts = {}) ⇒ Array<(TagPaging, Fixnum, Hash)>
List tags Gets a list of tags in this repository.
-
#update_tag(tag_id, tag_body_update, opts = {}) ⇒ TagEntry
Update a tag Updates the tag tagId.
-
#update_tag_with_http_info(tag_id, tag_body_update, opts = {}) ⇒ Array<(TagEntry, Fixnum, Hash)>
Update a tag Updates the tag tagId.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/alfresco_api/api/tags_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_tag_for_node(node_id, tag_body_create, opts = {}) ⇒ TagEntry
Create a tag for a node Creates a tag on the node nodeId. You specify the tag in a JSON body like this: “‘JSON { "tag":"test-tag-1" } “` Note: You can create more than one tag by specifying a list of tags in the JSON body like this: “`JSON [ { "tag":"test-tag-1" }, { "tag":"test-tag-2" } ] “` 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/tags_api.rb', line 30 def create_tag_for_node(node_id, tag_body_create, opts = {}) data, _status_code, _headers = create_tag_for_node_with_http_info(node_id, tag_body_create, opts) return data end |
#create_tag_for_node_with_http_info(node_id, tag_body_create, opts = {}) ⇒ Array<(TagEntry, Fixnum, Hash)>
Create a tag for a node Creates a tag on the node nodeId. You specify the tag in a JSON body like this: ```JSON { "tag":"test-tag-1" } ``` Note: You can create more than one tag by specifying a list of tags in the JSON body like this: ```JSON [ { "tag":"test-tag-1" }, { "tag":"test-tag-2" } ] ``` 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 83 84 85 |
# File 'lib/alfresco_api/api/tags_api.rb', line 42 def create_tag_for_node_with_http_info(node_id, tag_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagsApi.create_tag_for_node ..." 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 TagsApi.create_tag_for_node" end # verify the required parameter 'tag_body_create' is set if @api_client.config.client_side_validation && tag_body_create.nil? fail ArgumentError, "Missing the required parameter 'tag_body_create' when calling TagsApi.create_tag_for_node" end # resource path local_var_path = "/nodes/{nodeId}/tags".sub('{' + 'nodeId' + '}', node_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 = @api_client.object_to_http_body(tag_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 => 'TagEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagsApi#create_tag_for_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_tag_from_node(node_id, tag_id, opts = {}) ⇒ nil
Delete a tag from a node Deletes tag tagId from node nodeId.
93 94 95 96 |
# File 'lib/alfresco_api/api/tags_api.rb', line 93 def delete_tag_from_node(node_id, tag_id, opts = {}) delete_tag_from_node_with_http_info(node_id, tag_id, opts) return nil end |
#delete_tag_from_node_with_http_info(node_id, tag_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a tag from a node Deletes tag tagId from node nodeId.
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 143 144 145 |
# File 'lib/alfresco_api/api/tags_api.rb', line 104 def delete_tag_from_node_with_http_info(node_id, tag_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagsApi.delete_tag_from_node ..." 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 TagsApi.delete_tag_from_node" end # verify the required parameter 'tag_id' is set if @api_client.config.client_side_validation && tag_id.nil? fail ArgumentError, "Missing the required parameter 'tag_id' when calling TagsApi.delete_tag_from_node" end # resource path local_var_path = "/nodes/{nodeId}/tags/{tagId}".sub('{' + 'nodeId' + '}', node_id.to_s).sub('{' + 'tagId' + '}', tag_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: TagsApi#delete_tag_from_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_tag(tag_id, opts = {}) ⇒ TagEntry
Get a tag Get a specific tag with tagId.
153 154 155 156 |
# File 'lib/alfresco_api/api/tags_api.rb', line 153 def get_tag(tag_id, opts = {}) data, _status_code, _headers = get_tag_with_http_info(tag_id, opts) return data end |
#get_tag_with_http_info(tag_id, opts = {}) ⇒ Array<(TagEntry, Fixnum, Hash)>
Get a tag Get a specific tag with tagId.
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 197 198 199 200 201 202 203 |
# File 'lib/alfresco_api/api/tags_api.rb', line 164 def get_tag_with_http_info(tag_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagsApi.get_tag ..." end # verify the required parameter 'tag_id' is set if @api_client.config.client_side_validation && tag_id.nil? fail ArgumentError, "Missing the required parameter 'tag_id' when calling TagsApi.get_tag" end # resource path local_var_path = "/tags/{tagId}".sub('{' + 'tagId' + '}', tag_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 => 'TagEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagsApi#get_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_tags(opts = {}) ⇒ TagPaging
List tags Gets a list of tags in this repository.
212 213 214 215 |
# File 'lib/alfresco_api/api/tags_api.rb', line 212 def (opts = {}) data, _status_code, _headers = (opts) return data end |
#list_tags_for_node(node_id, opts = {}) ⇒ TagPaging
List tags for a node Gets a list of tags for node nodeId.
279 280 281 282 |
# File 'lib/alfresco_api/api/tags_api.rb', line 279 def (node_id, opts = {}) data, _status_code, _headers = (node_id, opts) return data end |
#list_tags_for_node_with_http_info(node_id, opts = {}) ⇒ Array<(TagPaging, Fixnum, Hash)>
List tags for a node Gets a list of tags for node nodeId.
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/alfresco_api/api/tags_api.rb', line 292 def (node_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagsApi.list_tags_for_node ..." 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 TagsApi.list_tags_for_node" 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 TagsApi.list_tags_for_node, 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 TagsApi.list_tags_for_node, must be greater than or equal to 1.' end # resource path local_var_path = "/nodes/{nodeId}/tags".sub('{' + 'nodeId' + '}', node_id.to_s) # 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[:'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 => 'TagPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagsApi#list_tags_for_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_tags_with_http_info(opts = {}) ⇒ Array<(TagPaging, Fixnum, Hash)>
List tags Gets a list of tags in this repository.
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 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/alfresco_api/api/tags_api.rb', line 224 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagsApi.list_tags ..." 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 TagsApi.list_tags, 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 TagsApi.list_tags, must be greater than or equal to 1.' end # resource path local_var_path = "/tags" # 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[:'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 => 'TagPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagsApi#list_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_tag(tag_id, tag_body_update, opts = {}) ⇒ TagEntry
Update a tag Updates the tag tagId.
350 351 352 353 |
# File 'lib/alfresco_api/api/tags_api.rb', line 350 def update_tag(tag_id, tag_body_update, opts = {}) data, _status_code, _headers = update_tag_with_http_info(tag_id, tag_body_update, opts) return data end |
#update_tag_with_http_info(tag_id, tag_body_update, opts = {}) ⇒ Array<(TagEntry, Fixnum, Hash)>
Update a tag Updates the tag tagId.
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/alfresco_api/api/tags_api.rb', line 362 def update_tag_with_http_info(tag_id, tag_body_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagsApi.update_tag ..." end # verify the required parameter 'tag_id' is set if @api_client.config.client_side_validation && tag_id.nil? fail ArgumentError, "Missing the required parameter 'tag_id' when calling TagsApi.update_tag" end # verify the required parameter 'tag_body_update' is set if @api_client.config.client_side_validation && tag_body_update.nil? fail ArgumentError, "Missing the required parameter 'tag_body_update' when calling TagsApi.update_tag" end # resource path local_var_path = "/tags/{tagId}".sub('{' + 'tagId' + '}', tag_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 = @api_client.object_to_http_body(tag_body_update) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TagEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagsApi#update_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |